Esempio n. 1
0
 public Fiende(Game1 game, Sprite spriteSheet)
     : base(game, spriteSheet)
 {
     this.gubbe = game.Player1;
     lever = true;
     drawLayer = 0.5f;
 }
Esempio n. 2
0
        public override void Initialize()
        {
            base.Initialize();

            gubbe = new Gubbe(game, spriteSheet);
            spelObjektLista.Add(gubbe);
            knappNerTryckt = 0;
        }
Esempio n. 3
0
        public override void Initialize()
        {
            base.Initialize();

            playState = PlayState.running;
            spelObjektLista.Clear();
            gubbe = game.Player1;
            gubbe.Initialize(this);
            spelObjektLista.Add(gubbe);
        }
Esempio n. 4
0
        //Detta sätter spelets startvärden
        protected override void Initialize()
        {
            base.Initialize();

            IsMouseVisible = true;

            spriteSheet = new Sprite(this.Content.Load<Texture2D>("FirstSpriteSheet"));

            font = this.Content.Load<SpriteFont>("vanligFont");

            graphics.PreferredBackBufferWidth = 900;
            graphics.PreferredBackBufferHeight = 700;
            graphics.ApplyChanges();

            Player1 = new Gubbe(this, spriteSheet);

            levelState = new LevelState(this, spriteSheet);
            levelState.Initialize();

            menyState = new MenyState(this, spriteSheet);
            menyState.Initialize();

            howToPlayState = new HowToPlayState(this, spriteSheet);
            howToPlayState.Initialize();

            levelMenyState = new LevelMenyState(this, spriteSheet);
            levelMenyState.Initialize();

            runningState = menyState;

            isMusicRunning = true;
            ControlMusic(isMusicRunning);

            backgroundManager = new BackgroundManager(this);
            backgroundManager.ChangeBackground(Background.grass);
        }