コード例 #1
0
    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));
        }
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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>();
    }