示例#1
0
 public Mothership(GameWrapper i_Game)
     : base(i_Game)
 {
     this.TexturePath = @"Sprites\MotherShip_32x120";
     this.Color = Color.Red;
     this.Score = 750;
 }
示例#2
0
 public BlueAlien(GameWrapper i_Game)
     : base(i_Game)
 {
     this.Color = Color.LightBlue;
     this.Score = InitialScore;
     m_FrameOffset = 1;
 }
示例#3
0
 public Alien(GameWrapper i_Game)
     : base(i_Game)
 {
     TexturePath = @"Sprites\enemy_sprite";
     IsPartOfTexture = true;
     this.SourceRectangle = new Rectangle(m_FrameOffset * k_FrameWidth, 0, k_FrameWidth, k_FrameHeight);
 }
示例#4
0
 public PinkAlien(GameWrapper i_Game)
     : base(i_Game)
 {
     this.Color = Color.LightPink;
     this.Score = InitialScore;
     m_FrameOffset = 0;
 }
示例#5
0
 public YellowAlien(GameWrapper i_Game)
     : base(i_Game)
 {
     this.Color = Color.LightYellow;
     this.Score = InitialScore;
     m_FrameOffset = 2;
 }
示例#6
0
 public Barrier(GameWrapper i_Game)
     : base(i_Game)
 {
     UseTextureCopy = true;
     TexturePath = @"Sprites\Barrier_44x32";
     this.Color = Color.White;
     this.IsPixelCollidable = true;
 }
示例#7
0
 public BarriersManager(GameWrapper i_Game)
     : base(i_Game)
 {
     m_Game = i_Game;
     m_Barriers = new Barrier[k_AmountOfBarriers];
     m_DistanceTravelled = 0;
     m_Velocity = new Vector2(k_InitialVelocity, 0);
 }
示例#8
0
 public BackGround(GameWrapper i_Game)
     : base(i_Game)
 {
     this.TexturePath = @"Sprites\BG_Space01_1024x768";
     Vector4 backGroundTint = Vector4.One;
     backGroundTint.W = 1f;
     this.Color = new Color(backGroundTint);
     this.Position = Vector2.Zero;
 }
示例#9
0
 public Sprite(GameWrapper i_Game)
     : base(i_Game)
 {
     m_IsInitialized = false;
     m_Game = i_Game;
     Alpha = 1f;
     m_Scale = 1f;
     m_Rotation = 0f;
     m_Color = Color.White;
 }
示例#10
0
 public CalibriLabel(GameWrapper i_Game, eFontSize i_FontSize)
     : this(i_Game)
 {
     if (i_FontSize == eFontSize.Normal)
     {
         TexturePath = @"Fonts/Calibri";
     }
     else if (i_FontSize == eFontSize.Large)
     {
         TexturePath = @"Fonts/CalibriLarge";
     }
     else if (i_FontSize == eFontSize.Huge)
     {
         TexturePath = @"Fonts/CalibriHuge";
     }
 }
示例#11
0
        public PlayScreen(GameWrapper i_Game, bool i_TwoPlayers)
            : base(i_Game)
        {
            this.IsModal = true;
            this.BlendState = BlendState.NonPremultiplied;

            m_Game = i_Game;

            m_TwoPlayers = i_TwoPlayers;

            m_LoadingScreen = new LoadingScreen(i_Game, m_Level);
            m_PauseScreen = new PauseScreen(i_Game);
            m_GameOverScreen = new GameOverScreen(i_Game, new GameOverEventArgs(EventArgs.Empty));

            m_BackGround = new BackGround(this.Game as GameWrapper);
            m_BackGround.DrawOrder = 0;
            Add(m_BackGround);

            m_ShipsManager = new ShipsManager(i_Game, m_TwoPlayers);
            m_ShipsManager.DrawOrder = 10;
            m_ShipsManager.AlienHit += onGameOverRequested; // todo: if (*) is implemented then unsubscribe this
            m_ShipsManager.AllShipsDestroyed += onGameOverRequested;
            Add(m_ShipsManager);

            m_Enemies = new EnemyManager(i_Game);
            m_Enemies.DrawOrder = 10;
            m_Enemies.AliensReachedBottom += onGameOverRequested; // todo: (*) alien reached spaceships height, not bottom
            m_Enemies.AllAliensAreDead += onLevelWon;
            m_Enemies.AllAliensAreDead += playGameOverSound;
            Add(m_Enemies);

            m_ScoreBoard = new ScoreBoard(i_Game);
            m_ScoreBoard.DrawOrder = 20;
            Add(m_ScoreBoard);

            m_LivesDisplay = new LivesDisplay(i_Game);
            m_LivesDisplay.DrawOrder = 20;
            Add(m_LivesDisplay);

            m_BarriersManager = new BarriersManager(i_Game);
            m_ShipsManager.DrawOrder = 10;
            Add(m_BarriersManager);
        }
示例#12
0
 public CalibriLabel(GameWrapper i_Game)
     : base(i_Game)
 {
     TexturePath = @"Fonts/Calibri";
 }
示例#13
0
 public CollidableSprite(GameWrapper i_Game)
     : base(i_Game)
 {
     m_CollidingPoints = new List<Point>(); // added this as a result on restart level bug
 }
示例#14
0
 public Bullet(GameWrapper i_Game)
     : base(i_Game)
 {
     this.TexturePath = @"Sprites\Bullet";
 }