public bool DesignateRoomBehavior(RoomBehavior objInstance) { if (objInstance == null) { return(false); } if (RoomBehaviors.ContainsKey(objInstance.Type)) { return(false); } if (objInstance.IsValidRoom(this) == false) { UnityDebugger.Debugger.LogError("Tile", "Trying to assign a RoomBehavior to a room that isn't valid!"); return(false); } objInstance.Control(this); RoomBehaviors.Add(objInstance.Type, objInstance); return(true); }
public bool HasRoomBehavior(string behaviorKey) { return(RoomBehaviors.ContainsKey(behaviorKey)); }