示例#1
0
    void Awake()
    {
        SelectColor(0);
        lockbattle = false;
        editmode   = false;

        SaveLoad.Load();
        GameMemento.current = SaveLoad.savedGame;
        if (GameMemento.current.hexGridMemento.size != 0) //load from most recent if player presses continue
        {
            Debug.Log("Loading");
            playerManager.SetActivePlayers();
            loadMap.LoadHexTiles();
            loadMap.LoadTerrain();
            loadMap.LoadBuildings();
            loadMap.LoadEntities();
            loadMap.LoadResources();
            loadMap.LoadCorpses();
        }
        else //create new game when no game, set from player settings in menu
        {
            Debug.Log("New");
            playerManager.SetActivePlayers(); //TODO modify set active players to set new players when new game
            loadMap.LoadNewHexTiles(12, 12);
            loadMap.LoadRandom(12);           //sets the seed of the terrain spawn
        }

        //		List<int> test = hexGrid.GetCellIndexesOneHexAway (28);
        //		int test0 = test [0];
        //		int test1 = test [1];
        //		Debug.Log (test0);
        //		Debug.Log (test1);


        //TODO Overlay to add players
    }