public void AddPlayerScore(TextAsSprite i_PlayrScore) { if (NotifyPlayerScoreHaveSet != null) { NotifyPlayerScoreHaveSet(i_PlayrScore); } }
private void AddPlayerScore(TextAsSprite i_PlayerScore) { TextAsSprite PlayerScoreClone = i_PlayerScore.ShallowClone() as TextAsSprite; PlayerScoreClone.Position = PlayersScoresPositions; PlayersScoresPositions = new Vector2(PlayersScoresPositions.X, PlayersScoresPositions.Y + 25); Add(PlayerScoreClone); PlayersScoresSprites.Add(PlayerScoreClone); }
private void onWhenSpacehipDie(TextAsSprite i_ScoreAsText) { SettingsManager.AddPlayerScore(i_ScoreAsText); if (SpaceShips.Where(spaceShip => spaceShip.Value.Enabled).Count() == 0) { if (NotifiyGameOver != null) { NotifiyGameOver(); } } }
public SpaceShip(GameStructure i_Game, ePlayerNumber i_PlayerNumber, string i_AssteName, SpaceShipsManager i_SpaceShipManager) : base(i_AssteName, i_Game) { SpaceShipManager = i_SpaceShipManager; Bullets = new List <Bullet>(); ScoreAsText = new TextAsSprite(i_Game); m_PlayerNumber = i_PlayerNumber; Score = 0; m_Speed = 145; m_AssteName = i_AssteName; IsShootableActive = true; m_SpaceShipSouls = new List <Sprite>(); initSouls(); m_ShootSound = SoundFactoryMethod.CreateSound(i_Game, eSoundName.SSGunShot); m_LifeDie = SoundFactoryMethod.CreateSound(Game as GameStructure, eSoundName.LifeDie); }
public GamePauseScreen(Game i_Game) : base(i_Game) { IsModal = true; IsOverlayed = true; UseGradientBackground = true; BlackTintAlpha = 0.55f; UseFadeTransition = true; m_Text = new TextAsSprite(i_Game as GameStructure); m_Text.Position = new Vector2(100, 300); m_Text.Text = @" [ Game Paused ] R - Resume Game"; this.ActivationLength = TimeSpan.FromSeconds(0.5f); this.DeactivationLength = TimeSpan.FromSeconds(0); Add(m_Text); }
public IntroToLevelScreen(GameStructure i_Game) : base(i_Game) { m_Background = new Background(i_Game, k_AssteNameForBackground, 1); m_HeadLine = new TextAsSprite(i_Game) { Position = new Vector2(250, 100), Scales = new Vector2(2, 2) }; m_CountDownText = new TextAsSprite(i_Game) { Position = new Vector2(265, 130), Scales = new Vector2(3, 3) }; m_TimeToCountDown = 0; ActivationLength = TimeSpan.FromSeconds(4); Add(m_Background); Add(m_HeadLine); Add(m_CountDownText); }