Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
 public static void PlayAct(this Component gb, BaseAct action)
 {
     gb.gameObject.PlayAct(action);
 }
Esempio n. 4
0
 public static void PlayAct(this GameObject gb, BaseAct action)
 {
     ActMgr.Instance.AddAct(action, gb);
 }