public override void Update() { if (retryButton.OnMouseClick()) { ScorePointsSystem.ResetScore(); Game.ToPrevScene(); } if (quitButton.OnMouseClick()) { ScorePointsSystem.SaveRecordScore(); Game.Quit(); } }
public override void Update() { ScorePointsSystem.GameTimeUpdate(Game.window.deltaTime); EnemyMgr.Update(); if (IsPlayerAlive) { AudioMgr.Update("Game_ST"); } UpdateMgr.Update(); PhysicsMgr.Update(); PhysicsMgr.CheckCollision(); CameraMgr.Update(); }
void InitializingComponents() { CameraMgr.Init(Game.ScreenCenter, Game.ScreenCenter); ScorePointsSystem.Init(); ScorePointsSystem.LoadRecordScore(); EnemyMgr.Init(); BulletMgr.Init(); background = new Background("background"); Player = new Player(new Vector2(Game.ScreenCenter.X, 620)); }
public override void OnCollide(Collision collInfo) { if (collInfo.Collider is PlayerBullet) { GetHitted(1); ScorePointsSystem.IncreaseScore(1); } if (collInfo.Collider is Player) { if (!target.Invincibility) { GetHitted(LifePoints); } //ScorePointsSystem.IncreaseScore(1); } }
public override void OnDie() { base.OnDie(); EnemyMgr.RemoveEnemy(this); ScorePointsSystem.IncreaseScore(scoreValue * scoreMultiply); }