Example #1
0
        public void Update(Level level)
        {
            if (position.X > GameCore.screenSize.Width | position.X < -sprite.imageRec.Width)
            {
                dead = true;
                //return;
            }
            if (position.Y > GameCore.screenSize.Height | position.Y < -sprite.imageRec.Height)
            {
                dead = true;
               // return;
            }

            if (playerIsOwner)
            {
                //if (level.npc.ship.HasHit(this))
                //{ dead = true; }
            }
            else
            {
                if (ModularShooter.gameCore.player.ship.HasHit(this))
                { dead = true; }
            }

            position = Trig.MoveTo(position, speed, angle);
        }
Example #2
0
 private void OnLoaded()
 {
     resources = new Resources();
     player = new Player(this);
     stars = new Stars(this);
     level = new Level(this, "resources/levels/level-1.lvl");
     gameState = GameState.LEVEL;
 }