public static void Draw() { if (animation.IsPlaying) { sprite.Draw(); } }
public virtual void Draw() { if (isAlive) { sprite.Draw(); } }
public virtual void Draw() { if (StillAlive() && isAlive) { sprite.Draw(); } }
public void Update() { //player move float deltaY = verticalSpeed * GfxTools.Win.deltaTime; float deltaX = horizontalSpeed * GfxTools.Win.deltaTime; position.X += deltaX; position.Y -= deltaY; force = (mass * verticalSpeed) / 100; sprite.Translate(deltaX, -deltaY); //force checker if (force < -80f) { danger.Draw(); } //heart checker int lifePoint = nrg * 50; //platform checker SpaceStation platform = Game.GetPlatform(); checkPlatform = platform.CheckAlive(); if (checkPlatform) { scoreWinner += GfxTools.Win.deltaTime; } //platform collision if (OnPlatformEnter()) { verticalSpeed = 0; horizontalSpeed = 0; Game.AddScore((int)scoreWinner + lifePoint); GUI gui = Game.GetGUI(); gui.YouWin(); Game.isPlayble = false; Game.isSavable = true; Game.Exit(); } //player score if (IsAlive && !OnPlatformEnter()) { counterScore += 0.9f * GfxTools.Win.deltaTime; if (counterScore >= 1) { Game.AddScore(1); counterScore = 0; } } }