public static DungeonManagerNew GetInstance(string Id) { if (instance == null) { instance = new DungeonManagerNew(Id); } return(instance); }
void Start() { dungeonInfo = DungeonManagerNew.GetInstance("Stage1_1"); dungeonControl = new DungeonControlNew(); dungeonControl.InitializeDungeon(dungeonInfo.GetDungeonInfo()); CreateNewRoom(); CreateCoridor(); SetMapSize(); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); boardScript = GetComponent <DungeonManagerNew>(); }