//=============================================================================
// BANTestGlobalA.
//=============================================================================
class BANTestGlobalA expands Actor;

var int		delta ;
var bool	changed_state ;

/*
function Tick( float deltaTime )

{

	delta ++ ;
	
	if ( delta > 3 && ! changed_state )
	 {
		
		changed_state = true ;

		log( "*** Global A: Going to state1" ) ;
		gotostate( 'state1' ) ;

	 }

}

*/

event touch( Actor other )
{

	log( "*** Global A: touched by " $ other ) ;
	
	fish() ;	

}



function fish()
{

local BANTestGlobalB	b ;

	log( "*** Global A: fish() called and in state " $ GetStateName() ) ;

	foreach AllActors( class 'BANTestGlobalB', b )
		b.loopback_call( Self ) ;	


}

function dog()
{

	log( "*** Global A: Global::dog() called, in state " $ GetStateName() ) ;
}


auto state state1
{

function dog()
{

	log( "*** Global A: State1::dog() called, in state " $ GetStateName() ) ;
}


Begin:	log( "*** Global A: Entering state1" ) ;

Loop:	sleep( 0.3 ) ;
		goto 'Loop' ;

}

defaultproperties
{
				Sprite=Texture'Editor.B_MenuDn'
				bCollideActors=True
				bBlockActors=True
}
