コード例 #1
0
ファイル: Disabler.cs プロジェクト: nitzanbueno/TanksDropTwo
 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 );
 }
コード例 #2
0
ファイル: Rider.cs プロジェクト: nitzanbueno/TanksDropTwo
 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 );
     }
 }