Esempio n. 1
0
 public override void InstantAction( TimeSpan gameTime )
 {
     // Suck all non-tank entities
     VacuumController d = new VacuumController( Owner, maxSpeed, x => !( x is Tank ), true, 1, true );
     d.Initialize( Game );
     Game.PutController( d );
 }
Esempio n. 2
0
 public override void Destroy( TimeSpan gameTime )
 {
     if ( !ControllerIsTripler || !isOtherRider && otherRiders.All( x => x.isDead ) )
     {
         base.Destroy( gameTime );
     }
     if ( isDead )
         return;
     isDead = true;
     owner.RemoveController( Controller );
     if ( !isOtherRider )
     {
         VacuumController v = new VacuumController( owner, Speed + 1, x => x is Rider && ( ( Rider )x ).owner == this.owner && ( ( Rider )x ).isOtherRider, false, Speed, true );
         v.Initialize( Game );
         Game.PutController( v );
     }
     if ( !didDestroyTank && otherRiders.All( x => !x.didDestroyTank ) && !isOtherRider && die )
     {
         owner.Destroy( gameTime );
     }
 }
 public VacuumTankController( VacuumController owner )
     : base(-1)
 {
     this.owner = owner;
 }