📄 lostorwin.cs
字号:
using System;
using DiamondPet.UserLayer;
namespace DiamondPet.LogicLayer.GameStateRunLogic.Pause
{
/// <summary>
/// LostOrWin 的摘要说明。
/// 输赢状态
/// </summary>
public class LostOrWin : Pause
{
/// <summary>
/// 图片有效时间
/// </summary>
private int liveTime;
public LostOrWin()
{}
public LostOrWin(RunStateManager r) : base(r)
{
liveTime = 100;
}
#region 游戏主循环
public override void RunStateLogic()
{
Draw.DrawImage(Pictures.picturesImage[GameConstResource.gameOverPic],
GameConstResource.gameOverPosX,
GameConstResource.gameOverPosY,
Pictures.picturesImage[GameConstResource.gameOverPic].Width,
Pictures.picturesImage[GameConstResource.gameOverPic].Height,
0,0,
Pictures.picturesImage[GameConstResource.gameOverPic].Width,
Pictures.picturesImage[GameConstResource.gameOverPic].Height);
if(--liveTime <= 0)
{
this.runStateManager.userLayerStateManager.diamondPet.hs.AddNewScore
(this.runStateManager.gameDate.gameScore.Score);
this.runStateManager.userLayerStateManager.AnotherChangeState
(UserLayerStateManager.GAMESTATESTART);
}
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -