Пример #1
0
 public Challenge(CycGame cg, Game1 g, int m)
 {
     cycGame = cg;
     game = g;
     state = ChallengeState.NotYet;
     Measure = m;
     beats = new List<ChallengeBeat>();
     enemiesIgnored = 0;
     enemiesKilled = 0;
     enemyCount = 0;
 }
Пример #2
0
 public JetpackGirl(Game1 game, CycGame cg)
     : base(game)
 {
     CycGame = cg;
     Dying = false;
     AttackRadius = 10;
     particles = new JetpackGirlPS(Game);
     Game.Components.Add(particles);
     ScaleFactor = 2.0f;
     assetName = "rockGirl";
     collisionStyle = CollisionStyle.Box;
     jetpack = new Jetpack(this);
     spriteWidth = 14;
     jumpReleased = true;
     attackCounter = 0;
     attackCooldown = 0;
     Attacking = false;
     GroundLoss = DefaultGroundLoss;
     bounds = new Rectangle(0, 0, 14, 16);
 }
Пример #3
0
 public HoverEnemyPool(CycGame game)
     : base(game)
 {
 }
Пример #4
0
 public RobotEnemyPool(CycGame game)
     : base(game)
 {
 }
Пример #5
0
 public EnemyPool(CycGame g)
 {
     cycGame = g;
     enemies = new List<CycSprite>();
 }
Пример #6
0
 public ShipEnemyPool(CycGame g)
     : base(g)
 {
 }
Пример #7
0
 public SpiderEnemyPool(CycGame game)
     : base(game)
 {
 }
Пример #8
0
 public BeamPool(CycGame g)
     : base(g)
 {
 }
Пример #9
0
 public JetpackEnemyPool(CycGame g)
     : base(g)
 {
     rgen = new Random();
 }
Пример #10
0
 public FrogEnemyPool(CycGame game)
     : base(game)
 {
 }
Пример #11
0
 public void RegisterDifficultyNotch(CycGame dst, int difficulty)
 {
     float triggerTime = ((((int)Game.CurrentMeasure) / 4) + 1) * 4 - 1;
     if (dst == TopGame)
     {
         //send a notch to the upper edge of the pipe
         //warning magic number
         EnemyNotch n = new EnemyNotch(this, UpPipeX, UpPipeStartY, 20);
         //assumption: notches have uniform height
         n.TargetY = topNotches.Count() * n.Height;
         if (topNotches.Count() == 0)
         {
             n.TargetX = DownPipeX;
         }
         n.Duration = (float)((triggerTime - Game.CurrentMeasure)*(4.0/3.0));
         topNotches.Add(n);
         n.Initialize();
         n.LoadContent();
     }
     else
     {
         //send a notch to the bottom edge of the pipe
         EnemyNotch n = new EnemyNotch(this, DownPipeX, DownPipeStartY, 20);
         n.TargetY = Height - bottomNotches.Count() * n.Height - 20 - PipeMargin;
         n.TargetX = DownPipeX;
         n.Duration = (float)((triggerTime - Game.CurrentMeasure) * (4.0 / 3.0));
         bottomNotches.Add(n);
         n.Initialize();
         n.LoadContent();
     }
 }
Пример #12
0
 public void ClearNotches(CycGame src, int amt)
 {
     if (src == TopGame)
     {
         for(int i = 0; i < amt; i++)
         {
             if (i >= topNotches.Count)
             {
                 break;
             }
             EnemyNotch n = topNotches[i];
             n.ShuffleOut((X == 0) ? this.Width : X - n.Width, 0);
         }
         if (topNotches.Count > 0)
         {
             topNotches.RemoveRange(0, Math.Min(topNotches.Count, amt));
         }
         for (int i = 0; i < topNotches.Count; i++)
         {
             EnemyNotch n = topNotches[i];
             if (i == 0)
             {
                 n.TargetX = DownPipeX;
             }
             n.TargetY = i * n.Height;
             n.Duration = 2.0f / 3.0f;
         }
     }
     else
     {
         for (int i = 0; i < amt; i++)
         {
             if (i >= bottomNotches.Count)
             {
                 break;
             }
             EnemyNotch n = bottomNotches[i];
             n.ShuffleOut((X == 0) ? this.Width : X - n.Width, this.Height - Width / 2 - n.Height);
         }
         if (bottomNotches.Count > 0)
         {
             bottomNotches.RemoveRange(0, Math.Min(bottomNotches.Count, amt));
         }
         for (int i = 0; i < bottomNotches.Count; i++)
         {
             EnemyNotch n = bottomNotches[i];
             n.TargetY = Height - i * n.Height - 12 - PipeMargin;
             n.Duration = 2.0f / 3.0f;
         }
     }
 }