public void RemoveActor(Actor actor) { if (!_actorList.ContainsKey(actor.tag)) return; _actorList[actor.tag].Remove(actor); }
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>()); }