protected override void Init() { ActionQueue = new ARQueue <ARAction>(); ActionCombineTypeDic = new Dictionary <ActionLib, List <ActionLib> >(); isOnActionExcuting = false; currentExcutingAction = null; RegisterMsg((int)MsgLib.AddAction, this); RegisterMsg((int)MsgLib.ActionFinish, this); }
public void AddAction(ActionLib type, float time, int exp) { if (ActionQueue == null) { ActionQueue = new ARQueue <ARAction>(); } if (ActionQueue.Count >= 7) { Debug.Log("Current action queue is full"); return; } ARAction action = new ARAction(); action.InitAction(type, time, exp); TestButtons.Instance.AddActionItem(action, OnActionFinish); ActionQueue.EnQueue(action); }