Example #1
0
    /// <summary>
    /// Unlocks the lore entry provided through inspector
    /// </summary>
    public override void ActivateFunctionality()
    {
        if (!AlreadyPressed)
        {
            LoadObjectives.ProgressObjective(QuestName);

            AlreadyPressed = true;
        }
    }
Example #2
0
    /// <summary>
    /// When abstracted class is triggered, call is redirected here
    /// </summary>
    protected void handleResult()
    {
        switch (Result)
        {
        case ResultID.Objective:
            LoadObjectives.ProgressObjective(ResultContent[0]);
            break;

        case ResultID.Database:
            LoadDataBaseEntries.UnlockDataEntry(ResultContent[0], ResultContent[1]);
            break;

        case ResultID.Skill:
            //SkillTree.UnlockSkill(ResultContent[0]);
            break;
        }
    }
Example #3
0
    private void Awake()
    {
        if (_instance == null || _instance != this)
        {
            _instance = this;
        }
        FILE_PATH = $"{Application.dataPath}/Save Files/Endpoint";
        Application.targetFrameRate = 60;
        LoadMaxStats();

        if (OneTimeEvents.Count > 0)
        {
            LoadOneTimeEvents();
        }

        //If DB hasn't been initialized yet, do that
        if (!Initialized)
        {
            InputManager.instance.currentState = InputManager.InputState.MAIN_MENU;
            Initialized  = true;
            currentScene = (Scenes)SceneManager.GetActiveScene().buildIndex;
            Sector       = "CENTRAL PROCESSING";
            Timer        = 0;

            //Refresh progress lists
            LoadDataBaseEntries.LoadAllDataEntries();
            LoadObjectives.LoadAllObjectives();
            LoadDialogue.LoadDialogueItems();
        }
        //Create a directory for save files if one doesn't exist
        if (!Directory.Exists(Application.dataPath + "/Save Files"))
        {
            Directory.CreateDirectory(Application.dataPath + "/Save Files");
        }

        //Retrieve updated new SaveFileID
        string path = $"{FILE_PATH}{SaveFileID}.sav";

        while (File.Exists(path))
        {
            SaveFileID++;
            path = $"{FILE_PATH}{SaveFileID}.sav";
        }
        LoadMaxStats();
    }