Exemple #1
0
        public void RemoveActor(Actor actor)
        {
            if (!_actorList.ContainsKey(actor.tag))
                return;

            _actorList[actor.tag].Remove(actor);
        }
Exemple #2
0
        public void RegisterActor(Actor actor)
        {
            if (!_actorList.ContainsKey(actor.tag))
                _actorList[actor.tag] = new HashSet<Actor>();

            _actorList[actor.tag].Add(actor);

            // Playerだけは特別に保存しておく(アクセスが多いので)
            if (actor.tag == TagName.Player)
                SetPlayer(actor.gameObject.GetComponent<Player>());
        }