void Start() { Application.targetFrameRate = 60; NewGameConfirmationPopupValid.onClick.AddListener(CreateNewGame); NewGameConfirmationPopupCancel.onClick.AddListener(() => ToggleNewGameConfirmationPopup(false)); bool worldMapSaveExist = false; if ((worldMapSaveExist = SaveManager.CheckValidFileSave(Scene.WorldMap))) { NewGameButton.onClick.AddListener(() => ToggleNewGameConfirmationPopup(true)); } else { NewGameButton.onClick.AddListener(CreateNewGame); } if ((LoadGameButton.interactable = SaveManager.CheckValidFileSave(Scene.Battleground))) { LoadGameButton.onClick.AddListener(() => SaveManager.LoadScene(Scene.Battleground)); } else if ((LoadGameButton.interactable = worldMapSaveExist)) { LoadGameButton.onClick.AddListener(() => SaveManager.LoadScene(Scene.WorldMap)); } }
void Awake() { MapManager = GetComponent <MapManager>(); CameraManager = GetComponent <CameraManager>(); ProjectionManager = GetComponent <ProjectionManager>(); CombatUIManager = GameObject.Find("CombatUI").GetComponent <CombatUIManager>(); TargetingManager = GetComponent <TargetingManager>(); if (SaveManager.CheckValidFileSave(Scene.Battleground)) { BattlegroundData = SaveManager.LoadBattleground(); } MapManager.GenerateMaps(BattlegroundData.MapInfos); }
void Awake() { if (SaveManager.CheckValidFileSave(Scene.WorldMap)) { WorldMapData = SaveManager.LoadWorldMap(); } else // Debug purpose only { WorldMapData = new WorldMapData(); } WorldMapMoveButtonManager = GetComponent <WorldMapMoveButtonManager>(); WorldMapBuilder = GetComponent <WorldMapBuilder>(); WorldMapInventoryManager = GetComponent <WorldMapInventoryManager>(); WorldMapTeamManager = GetComponent <WorldMapTeamManager>(); }