internal void RemoveAct(BaseAct baseAction) { int index = baseAction.InstanceID; if (!_dict.ContainsKey(index)) { return; } _dict[index].Remove(baseAction); if (_dict[index].Count == 0) { _dict.Remove(index); } }
public void AddAct(BaseAct act, GameObject tar) { if (tar == null) { return; } act.SetGameObject(tar); int instanceID = act.InstanceID; if (!_dict.ContainsKey(instanceID)) { _dict.Add(instanceID, new HashSet <BaseAct>()); } _dict[instanceID].Add(act); act.StartPlay(); }
public static void PlayAct(this Component gb, BaseAct action) { gb.gameObject.PlayAct(action); }
public static void PlayAct(this GameObject gb, BaseAct action) { ActMgr.Instance.AddAct(action, gb); }