CannonGame.GameLevel.GameLevel C# (CSharp) Метод

GameLevel() публичный Метод

public GameLevel ( SpriteBatch spriteBatch, Microsoft.Xna.Framework.Content.ContentManager content, int gameStateIndex ) : System
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
content Microsoft.Xna.Framework.Content.ContentManager
gameStateIndex int
Результат System
        public GameLevel(SpriteBatch spriteBatch, ContentManager content, int gameStateIndex)
            : base(spriteBatch, content, gameStateIndex)
        {
            Instance = this;

            // TODO: use Content to load your game content here

            score = 0;

            fireButtonTexture = Content.Load<Texture2D>(@"Images\fireButton");
            font = Content.Load<SpriteFont>("Font");

            win = Content.Load<SoundEffect>("Sound/Cannon_Game_Win");
            lose = Content.Load<SoundEffect>("Sound/Cannon_Game_Lose");

            niceCannon = new Cannon(Content.Load<Texture2D>("Images/kanon"), new Vector2(240, 784), new Vector2(0, -1));
            badCannon = new Cannon(Content.Load<Texture2D>("Images/slemKanon"), new Vector2(240, 16), new Vector2(0, 1));
            niceBall = new Ball(Content.Load<Texture2D>("Images/ball"));
            badBall = new Ball(Content.Load<Texture2D>("Images/slemBall"));
            target = new Target(Content.Load<Texture2D>("Images/mål"));
            shoot = new Rectangle(480 - 48, 450, 48, 48);

            Objects = new List<GameObject>();
        }