Exemplo n.º 1
0
 public Ship(string i_AssetName, Game i_InvadersGame, Vector2 i_Delta, PlayerIndex i_PlayerIndex, PlayScreen i_PlayScreens)
     : base(i_AssetName, i_InvadersGame, i_Delta)
 {
     m_TintColor     = Color.White;
     m_ScoreValue    = k_ShipScoreValue;
     r_PlayerIndex   = i_PlayerIndex;
     m_ShootAvailble = true;
     i_PlayScreens.Add(r_ShootingMachine = new ShootingMachine(i_InvadersGame, k_MaxBulletsOnScreen, Enums.eShooter.Ship, k_GunShootAsset));
     GameManager.LoadPlayerControls(i_PlayerIndex, out m_Leftkey, out m_Rightkey, out m_Shootingkey, out m_MouseMode);
 }
Exemplo n.º 2
0
 public EnemyMatrix(Game i_InvadersGame, int i_NumOfCols, int i_NumOfRows, int i_EnemiesAdditionalScore)
     : base(i_InvadersGame)
 {
     m_NumOfCols       = i_NumOfCols;
     r_NumOfRows       = i_NumOfRows;
     m_JumpingRight    = true;
     m_FrameTime       = TimeSpan.FromSeconds(0.5);
     m_JumpingDistance = k_StartingJumpingDistance;
     r_Random          = new Random();
     r_Enemies         = new List <Enemy>();
     createEnemies(i_EnemiesAdditionalScore);
     r_ShootingMachine = new ShootingMachine(i_InvadersGame, k_MaxBulletsOnScreen, Enums.eShooter.Enemy, k_GunShootAsset);
     this.Add(r_ShootingMachine);
 }