public void DelAction(ChaActionType type) { if (mContainer != null) { mContainer.DelAction(type); } }
public static T CreateAction <T>(ChaActionType type) where T : IAction, new() { Queue <IAction> pool = null; if (!ActionPool.TryGetValue(type, out pool)) { pool = new Queue <IAction>(); ActionPool.Add(type, pool); } IAction action = null; if (pool.Count == 0) { action = new T(); action.SetType(type); } else { action = pool.Dequeue(); } if (action != null) { return(action as T); } return(null); }
public bool HasAction(ChaActionType type) { if (mContainer != null) { return(mContainer.HasAction(type)); } return(false); }
public IAction GetAcion(ChaActionType type) { if (mContainer != null) { return(mContainer.GetAction(type)); } return(null); }
public static void DeleteAction(IAction action) { ChaActionType type = action.mType; Queue <IAction> pool = null; if (!ActionPool.TryGetValue(type, out pool)) { return; } pool.Enqueue(action); }
public void DelAction(ChaActionType type) { IAction action = mActions[(int)type]; if (action == null) { return; } action.Exit(); mActions[(int)type] = null; IAction.DeleteAction(action); }
public virtual void SetType(ChaActionType etype) { mType = etype; }
public override void SetType(ChaActionType etype) { base.SetType(ChaActionType.SkillMove); }
public bool HasAction(ChaActionType type) { return(mContainer.HasAction(type)); }
public IAction GetAcion(ChaActionType type) { return(mContainer.GetAction(type)); }
public void DelAction(ChaActionType type) { mContainer.DelAction(type); }
public bool HasAction(ChaActionType type) { IAction action = mActions[(int)type]; return(action != null); }
public IAction GetAction(ChaActionType type) { return(mActions[(int)type]); }
public IAction(ChaActionType type) { mType = type; }