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); }
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; }