public override void _Execute( object subject ) { Process p = new ProcessBook.Wait( 10 ); processManager.Add( p ); //p = p.Enqueue( new ProcessBook.AreaDamage( owner.spots.torso.position, 4, 4 ) ); Watcher w = new WatchingUnit<ProcessBook.UnitMoveAlongPath>( owner ); processManager += w; w.instances = 2; w.eventWillStart += delegate( Process process ) { Debug.LogWarning( ( (ProcessBook.UnitMoveAlongPath)process ).subjectUnit + " IS MOVING MOVING MOVING!!!!" ); Process p2 = new ProcessBook.Trace( "I'LL SHOOT HIM!!!!" ); Process p3 = new ProcessBook.UnitAttack( owner, ( (ProcessBook.UnitMoveAlongPath)process ).subjectUnit ); p2.Enqueue( p3 ); process.Enqueue( p2 ); //GodOfProcesses.JumpAdd( p3 ); }; owner.buffs += BuffBook.Bleeding( owner ); p = p.Enqueue( new ProcessBook.Wait( 10 ) ); p.eventEnded += Finish; }
public override void _Execute( object subject ) { if( subject is IDamageable ) { Process p; p = new ProcessBook.UnitAttack( owner, subject as Unit ); processManager.Add( p ); p.eventEnded += Finish; } else Debug.LogWarning( name.ToUpper() + " ACTION SUBJECT IS INCORRECT TYPE" ); }