Пример #1
0
        /// <summary>
        /// 处理指定行动
        /// </summary>
        public virtual void processAction(RuntimeAction action)
        {
            if (!isMovable())
            {
                return;
            }

            action.makeResults();
            action.applyResults();

            on(BaseBattlerCallback.ActionEnd, action);
        }
Пример #2
0
 /// <summary>
 /// 增加行动
 /// </summary>
 /// <param name="action">行动</param>
 public RuntimeAction startAction(RuntimeAction action)
 {
     on(BaseBattlerCallback.ActionStart, action);
     return(action);
 }
Пример #3
0
 /// <summary>
 /// 增加行动
 /// </summary>
 /// <param name="action">行动</param>
 public RuntimeAction addAction(RuntimeAction action)
 {
     actions.Enqueue(action);
     on(BaseBattlerCallback.ActionAdded, action);
     return(action);
 }
Пример #4
0
 /// <summary>
 /// 行动结束回调
 /// </summary>
 /// <param name="action"></param>
 protected virtual void _onActionEnd(RuntimeAction action)
 {
 }
Пример #5
0
 /// <summary>
 /// 行动开始回调
 /// </summary>
 /// <param name="action"></param>
 protected virtual void _onActionStart(RuntimeAction action)
 {
 }
Пример #6
0
 /// <summary>
 /// 行动添加回调
 /// </summary>
 /// <param name="action"></param>
 protected virtual void _onActionAdded(RuntimeAction action)
 {
     Debug.Log(this + " addAction " + action?.toJson().ToJson());
 }
Пример #7
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public BaseRuntimeResult(RuntimeAction action, BaseRuntimeBattler _object)
 {
     this.action = action; this._object = _object;
 }