本游戏是微软SMART PHONE平台下的手机游戏
源代码在线查看: judgestatechange.cs
using System;
using DiamondPet.UserLayer;
namespace DiamondPet.LogicLayer.GameStateRunLogic
{
///
/// JudgeStateChange 的摘要说明。
/// 状态转换
///
public class JudgeStateChange : RunningState
{
public JudgeStateChange(RunStateManager r) : base(r)
{}
#region 贴图
protected override void DrawAll()
{
this.DrawMainBg();
this.DrawMainBlock();
Draw.DrawTempToImage();
this.DrawScore();
this.DrawPropetyBar();
this.DrawLevel();
}
#endregion
#region 游戏主循环
public override void RunStateLogic()
{
DrawAll();
if(this.CheckClearBlock())
{
//累计连击次数
this.runStateManager.gameDate.gameScore.AccumulateNum();
this.runStateManager.ChangeState(RunStateManager.CLEARBLOCK);
}
else
{
//有升级
if(this.runStateManager.gameDate.updateOrWL.IsLevelUp(this.runStateManager.gameDate.gameScore.Score))
{
this.runStateManager.ChangeState(RunStateManager.LEVELUP);
}
else//没有升级
{
this.runStateManager.ChangeState(RunStateManager.SELECTBLOCK);
}
}
}
#endregion
}
}