예제 #1
0
    // Use this for initialization
    void Start()
    {
        if (Instance != null)
        {
            Debug.Log("There should never be more than one GameManager.");
            Destroy(this.gameObject);
            return;
        }
        Instance = this;
        GameObject.DontDestroyOnLoad(this.gameObject);

        // Set up MonsterData config file for use
        MonsterDataReader.SetUp();
        MonsterDataReader.ReadData();
        ConsumableDataReader.SetUp();
        ConsumableDataReader.ReadData();

        // Game loads Hero Data from save file,
        // IF NewGame - this save file is set to default in Launch-Menu Scene
        LoadGameData();
        AssignPlayerMonsterParty();


        //if (BSP_MapDictionary.Count < 1)
        //{
        //    SetBSPMapForFloor(playerStartFloor, new BSP_MapGen(dungeonMapWidth, dungeonMapHeight, baseFloorDifficulty));
        //    BSP_MapDictionary[playerStartFloor].GenerateBSPDungeon();
        //    playerDungeonPosition = BSP_MapDictionary[playerStartFloor].GetMapUpStairs;
        //}
    }