Exemple #1
0
 public Enemy(GameScreen i_GameScreen, Color i_EnemyColor, int i_TextureStartIndex, int i_TextureEndIndex, string i_AssetName)
     : base(i_GameScreen, i_AssetName)
 {
     m_TintColor = i_EnemyColor;
     this.isDying = false;
     m_SpriteJump = new SpriteJump(this);
     r_TextureStartIndex = i_TextureStartIndex;
     r_TextureEndIndex = i_TextureEndIndex;
     m_ShootSound = SoundFactory.CreateSound(this.GameScreen, SoundFactory.eSoundType.EnemyGunShot) as Sound;
 }
Exemple #2
0
 public Enemy(GameScreen i_GameScreen, Color i_EnemyColor, int i_TextureStartIndex, int i_TextureEndIndex, string i_AssetName)
     : base(i_GameScreen, i_AssetName)
 {
     m_TintColor         = i_EnemyColor;
     this.isDying        = false;
     m_SpriteJump        = new SpriteJump(this);
     r_TextureStartIndex = i_TextureStartIndex;
     r_TextureEndIndex   = i_TextureEndIndex;
     m_ShootSound        = SoundFactory.CreateSound(this.GameScreen, SoundFactory.eSoundType.EnemyGunShot) as Sound;
 }
 private void jumpAllAliveEnemies(SpriteJump.eJumpDirection i_JumpDirection, float i_DistanceToJump, bool i_IsJumpingBackwards)
 {
     foreach (Enemy enemy in GetEnemysAsList())
     {
         if (!enemy.isDying)
         {
             enemy.SpriteJump.Jump(i_JumpDirection, i_DistanceToJump, i_IsJumpingBackwards);
         }
     }
 }