本游戏是微软SMART PHONE平台下的手机游戏

源代码在线查看: startcommand.cs

软件大小: 2309 K
上传用户: zaindyclg
关键词: SMART PHONE 微软 手机游戏
下载地址: 免注册下载 普通下载 VIP

相关代码

				using System;
				
				namespace DiamondPet.LogicLayer.GameStateStartLogic.StartCommand
				{
					#region 向上命令
					/// 
					/// UpCommand 的摘要说明。
					/// 
					public class UpCommand : Command
					{
						private SelectState selectState;
				
						public UpCommand(SelectState s)
						{
							selectState = s;
						}
				
						public override void ExecuteCommand()
						{
							if(this.selectState.SelectIndex == 0)
							{
								this.selectState.SelectIndex = GameConstResource.btNumbers - 1;
							}
							else
							{
								this.selectState.SelectIndex = (this.selectState.SelectIndex - 1) % GameConstResource.btNumbers; 
							}
						}
					}
				
					#endregion
				
					#region 向左向右命令
					/// 
					/// RightCommand 的摘要说明。
					/// 
					public class RightCommand : Command
					{
						public RightCommand()
						{
							//
							// TODO: 在此处添加构造函数逻辑
							//
						}
				
						public override void ExecuteCommand()
						{
				
						}
					}
				
				
					/// 
					/// LeftCommand 的摘要说明。
					/// 
					public class LeftCommand : Command
					{
						public LeftCommand()
						{
							//
							// TODO: 在此处添加构造函数逻辑
							//
						}
				
						public override void ExecuteCommand()
						{
				
						}
					}
					#endregion
				
					#region 确定命令
					/// 
					/// EnterCommand 的摘要说明。
					/// 
					public class EnterCommand : Command
					{
						private SelectState selectState;
				
						public EnterCommand(SelectState s)
						{
							this.selectState = s;
						}
				
						public EnterCommand(UserLayerStateManager u) : base(u)
						{}
				
						public override void ExecuteCommand()
						{
							//进入选择模式  先设为一个人做测试
				
							this.selectState.userLayerStateManager.AnotherChangeState(this.selectState.SelectIndex);
						}
					}
					#endregion
				
					#region 向下命令
					/// 
					/// DownCommand 的摘要说明。
					/// 
					public class DownCommand : Command
					{
						private SelectState selectState;
				
						public DownCommand(SelectState s)
						{
							selectState = s;
						}
				
						public override void ExecuteCommand()
						{
							this.selectState.SelectIndex = (this.selectState.SelectIndex + 1) % GameConstResource.btNumbers; 
						}
					}
					#endregion
				}
							

相关资源