コード例 #1
0
ファイル: Jet.cs プロジェクト: QuinnPainter/Choplifter
 public void Destroy()
 {
     if (state != JetStates.Dead)
     {
         (Scene as PlayScene).Score += 100;
     }
     state = JetStates.Dead;
     Explosion explosion = Scene.AddSprite<Explosion>();
     explosion.Scale = 3;
     explosion.BackgroundLayer = BackgroundLayer;
     explosion.StartExploding(Position, 1, false);
     Scene.Remove(this);
 }
コード例 #2
0
ファイル: Jet.cs プロジェクト: QuinnPainter/Choplifter
 public void init(int level)
 {
     int FlyDirection;
     if (Random.Next(1, 3) == 1)
     {
         FlyDirection = 0;
         X = (Scene as PlayScene).Background.MinScrollX - 160;
     }
     else
     {
         FlyDirection = 180;
         X = (Scene as PlayScene).Background.MaxScrollX + 160;
     }
     FlySpeed = (1f * level) + (float)Random.NextDouble() * 0.2f;
     state = JetStates.Starting;
     Direction = FlyDirection;
     Rotation = FlyDirection;
     FlyInBackground();
     Wait(0.5f, () =>
     {
         state = JetStates.FlyingInBackground;
     });
 }
コード例 #3
0
ファイル: Jet.cs プロジェクト: QuinnPainter/Choplifter
 void Fly()
 {
     Speed = FlySpeed;
     state = JetStates.Alive;
     Scale = 0.5f;
     Rotation += 180;
     Direction += 180;
 }