private void Awake() { transformer = new Transformer(transform); levelSerializer = GetComponent <ILevelSerializer>(); if (levelSerializer == null) { levelSerializer = gameObject.AddComponent <NullRoomSerializer>(); } foreach (IsoMonoBehaviour isoMonoBehaviour in GetComponents <IsoMonoBehaviour>()) { isoMonoBehaviour.OnInit(this); } if (loadOnStart) { LoadLevel(); } floorObserver = GetComponent <FloorObserver>(); wallObserver = GetComponent <WallObserver>(); itemObserver = GetComponent <ItemObserver>(); }
public void RegisterFloorObserver(FloorObserver observer) { floorObservers.Add(observer); }