Exemplo 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 );
 }
Exemplo 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 );
     }
 }
Exemplo n.º 3
0
 public VacuumTankController( VacuumController owner )
     : base(-1)
 {
     this.owner = owner;
 }