/// <summary>
 /// Goes through all sections and activates the current section.
 /// </summary>
 public void ReactivateTriggers()
 {
     Constants.OverworldArea index      = (Constants.OverworldArea)currentScene.value;
     Constants.RoomNumber    roomNumber = (Constants.RoomNumber)currentRoomNumber.value;
     for (int i = 0; i < sectionList.Length; i++)
     {
         sectionList[i].ActivateSection(currentChapter.value, index, roomNumber);
     }
 }
 public CameraValues GetValues(Constants.OverworldArea area, Constants.ROOMNUMBER number)
 {
     for (int i = 0; i < values.Length; i++)
     {
         if (values[i].area == area && values[i].roomNumber == number)
         {
             return(values[i]);
         }
     }
     return(null);
 }
    public override void ResetValues()
    {
        base.ResetValues();

        participantColors = new List <Color>();
        CreateBasicActions();

        nextLocation   = BattleEntry.NextLocation.OVERWORLD;
        dialogueEntry  = null;
        battleEntry    = null;
        changePosition = false;
        playerPosition = new Vector2();
        nextArea       = Constants.OverworldArea.DEFAULT;
    }
示例#4
0
    public override void CopyValues(ScrObjLibraryEntry other)
    {
        base.CopyValues(other);
        DialogueEntry de = (DialogueEntry)other;

        frames            = de.frames;
        participantColors = de.participantColors;

        nextLocation   = de.nextLocation;
        nextEntry      = de.nextEntry;
        changePosition = de.changePosition;
        playerPosition = de.playerPosition;
        nextArea       = de.nextArea;
    }
示例#5
0
    public override void ResetValues()
    {
        base.ResetValues();

        frames            = new List <Frame>();
        participantColors = new List <Color>();

        frames.Add(new Frame());
        nextLocation   = BattleEntry.NextLocation.OVERWORLD;
        nextEntry      = null;
        changePosition = false;
        playerPosition = new Vector2();
        nextArea       = Constants.OverworldArea.DEFAULT;
    }
    /// <summary>
    /// Activates the chapter with the given id and deactivates the rest.
    /// </summary>
    /// <param name="chapterID"></param>
    public void ActivateSection(string chapterID, Constants.OverworldArea sceneIndex, Constants.RoomNumber number)
    {
        if (containers.Count == 0)
        {
            Debug.LogWarning("Empty area");
            return;
        }
        bool state = (sceneIndex == activeArea && roomNumber == number);

        containers[0].gameObject.SetActive(state);
        for (int i = 1; i < containers.Count; i++)
        {
            containers[i].gameObject.SetActive(state && chapterID == chapterIDs[i]);
        }
    }
    public override void CopyValues(ScrObjLibraryEntry other)
    {
        base.CopyValues(other);
        DialogueEntry de = (DialogueEntry)other;

        actions           = de.actions;
        participantColors = de.participantColors;

        nextLocation   = de.nextLocation;
        dialogueEntry  = de.dialogueEntry;
        battleEntry    = de.battleEntry;
        changePosition = de.changePosition;
        playerPosition = de.playerPosition;
        nextArea       = de.nextArea;
        Debug.Log("COPY");
    }
    /// <summary>
    /// Copies all the values from another BattleEntry.
    /// </summary>
    /// <param name="battle"></param>
    public override void CopyValues(ScrObjLibraryEntry other)
    {
        base.CopyValues(other);
        BattleEntry be = (BattleEntry)other;

        // General battle things
        escapeButtonEnabled = be.escapeButtonEnabled;

        // Tutorial stuff
        isTutorial          = be.isTutorial;
        backgroundHintLeft  = be.backgroundHintLeft;
        backgroundHintRight = be.backgroundHintRight;
        removeSide          = be.removeSide;
        playerInvincible    = be.playerInvincible;
        useSlowTime         = be.useSlowTime;

        // Background
        backgroundLeft  = be.backgroundLeft;
        backgroundRight = be.backgroundRight;

        // Enemies
        randomizeEnemies = be.randomizeEnemies;
        numberOfEnemies  = be.numberOfEnemies;
        enemyTypes       = new List <EnemyEntry>();
        for (int i = 0; i < be.enemyTypes.Count; i++)
        {
            enemyTypes.Add(be.enemyTypes[i]);
        }

        // Player stuff
        useSpecificKanji = be.useSpecificKanji;
        equippedKanji    = new Kanji[Constants.MAX_EQUIPPED_KANJI];
        for (int i = 0; i < be.equippedKanji.Length; i++)
        {
            equippedKanji[i] = be.equippedKanji[i];
        }

        // After match values
        nextLocation   = be.nextLocation;
        changePosition = be.changePosition;
        playerArea     = be.playerArea;
        playerPosition = be.playerPosition;
        nextDialogue   = be.nextDialogue;
        nextBattle     = be.nextBattle;
    }
示例#9
0
    /// <summary>
    /// Activates the chapter with the given id and deactivates the rest.
    /// </summary>
    /// <param name="chapterID"></param>
    public void ActivateSection(Constants.CHAPTER chapter, Constants.OverworldArea sceneIndex, Constants.ROOMNUMBER number)
    {
        string chapterID = chapter.ToString().ToLower();

        if (containers.Count == 0)
        {
            Debug.LogWarning("Empty area");
            return;
        }
        bool state = (sceneIndex == activeArea && roomNumber == number);

        containers[0].gameObject.SetActive(state);
        for (int i = 1; i < containers.Count; i++)
        {
            // Debug.Log("Checking " + chapterIDs[i] + ", object pos " + i + ", Index: " + activeArea);
            containers[i].gameObject.SetActive(state && chapterID == chapterIDs[i]);
        }
    }
    /// <summary>
    /// Resets all values to start values.
    /// </summary>
    /// <param name="other"></param>
    public override void ResetValues()
    {
        base.ResetValues();

        // General battle things
        escapeButtonEnabled = true;

        // Tutorial stuff
        isTutorial          = false;
        backgroundHintLeft  = null;
        backgroundHintRight = null;
        removeSide          = RemoveSide.NONE;
        playerInvincible    = false;
        useSlowTime         = true;

        // Background
        backgroundLeft  = null;
        backgroundRight = null;

        // Enemies
        randomizeEnemies = false;
        numberOfEnemies  = 1;
        enemyTypes       = new List <EnemyEntry>();

        // Player stuff
        useSpecificKanji = true;
        equippedKanji    = new Kanji[Constants.MAX_EQUIPPED_KANJI];

        // After match values
        nextLocation   = NextLocation.OVERWORLD;
        changePosition = false;
        playerArea     = Constants.OverworldArea.DEFAULT;
        playerPosition = new Vector2();
        nextDialogue   = null;
        nextBattle     = null;
    }