Esempio n. 1
0
 /// <summary>
 /// 进入下一个阶段
 /// </summary>
 public virtual void Next(GameCommand command)
 {
     command.GameState      = NextState;
     command.IsRunNextState = true;
 }
Esempio n. 2
0
 /// <summary>
 /// 构建
 /// </summary>
 /// <param name="groupInfo"></param>
 /// <returns></returns>
 public IGame Create(GameCommand gameCommand, IGroupInfo groupInfo)
 {
     return((IGame)Type.GetConstructor(new Type[] { typeof(GameCommand), typeof(IGroupInfo) }).Invoke(new object[] { gameCommand, groupInfo }));
 }
Esempio n. 3
0
 /// <summary>
 /// 是否需要空过
 /// </summary>
 /// <param name="command"></param>
 /// <returns></returns>
 public abstract bool IsEmpty(GameCommand command);
Esempio n. 4
0
 /// <summary>
 /// 阶段初始化
 /// </summary>
 /// <param name="command"></param>
 /// <returns></returns>
 public abstract Task Init(GameCommand command);
Esempio n. 5
0
 /// <summary>
 /// 获取初始化消息
 /// </summary>
 /// <returns></returns>
 public abstract string GetInitMessage(GameCommand command);
Esempio n. 6
0
 /// <summary>
 /// 执行动作
 /// </summary>
 /// <param name="command"></param>
 public abstract Task DoAction(GameCommand command);
Esempio n. 7
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="groupInfo"></param>
 public IGame(GameCommand gameCommand, IGroupInfo groupInfo)
 {
     GroupInfo = groupInfo;
 }