Exemplo n.º 1
0
 public void LockSlot()
 {
     this.LockedUI.gameObject.SetActive(true);
     this.isLocked = true;
     this.saved    = null;
     DeselectSlot();
 }
Exemplo n.º 2
0
 public void ClearSlot()
 {
     UnlockSlot();
     this.saved                   = null;
     this.ponyName.text           = "New";
     this.ponyLevel.text          = "0";
     this.ponyIcon.overrideSprite = GameController.Instance.iconManager.GetIconById("Photo");
     this.IconFrame.color         = Color.white;
 }
    public void Init()
    {
        UB_SavedCharacter active = PF_PlayerData.activeCharacter;

        if (active != null)
        {
            HP_Stat.statValue.text  = "" + active.characterData.Health;
            HP_Stat.levelBonus.text = "+" + active.baseClass.HPLevelBonus;

            DP_Stat.statValue.text  = "" + active.characterData.Defense;
            DP_Stat.levelBonus.text = "+" + active.baseClass.DPLevelBonus;

            SP_Stat.statValue.text  = "" + active.characterData.Speed;
            SP_Stat.levelBonus.text = "+" + active.baseClass.SPLevelBonus;
        }

        if (PF_PlayerData.activeCharacter != null)
        {
            // test spell 1
            if (PF_GameData.Spells.ContainsKey(PF_PlayerData.activeCharacter.baseClass.Spell1))
            {
                UB_SpellDetail spell1 = PF_GameData.Spells[PF_PlayerData.activeCharacter.baseClass.Spell1];
                this.Spell1.LoadSpell(PF_PlayerData.activeCharacter.baseClass.Spell1, spell1, PF_PlayerData.activeCharacter.characterData.Spell1_Level);
            }
            else
            {
                // something went wrong, could not find the spell
                Debug.Log("something went wrong, could not find spell 1");
            }

            // test spell 2
            if (PF_GameData.Spells.ContainsKey(PF_PlayerData.activeCharacter.baseClass.Spell2))
            {
                UB_SpellDetail spell2 = PF_GameData.Spells[PF_PlayerData.activeCharacter.baseClass.Spell2];
                this.Spell2.LoadSpell(PF_PlayerData.activeCharacter.baseClass.Spell2, spell2, PF_PlayerData.activeCharacter.characterData.Spell2_Level);
            }
            else
            {
                // something went wrong, could not find the spell
                Debug.Log("something went wrong, could not find spell 2");
            }

            // test spell 3
            if (PF_GameData.Spells.ContainsKey(PF_PlayerData.activeCharacter.baseClass.Spell3))
            {
                UB_SpellDetail spell3 = PF_GameData.Spells[PF_PlayerData.activeCharacter.baseClass.Spell3];
                this.Spell3.LoadSpell(PF_PlayerData.activeCharacter.baseClass.Spell3, spell3, PF_PlayerData.activeCharacter.characterData.Spell3_Level);
            }
            else
            {
                // something went wrong, could not find the spell
                Debug.Log("something went wrong, could not find spell 3");
            }
        }
    }
Exemplo n.º 4
0
    public void FillSlot(UB_SavedCharacter ch)
    {
        this.saved = ch;
        if (ch.characterDetails != null && ch.characterData != null)
        {
            this.ponyName.text  = ch.characterDetails.CharacterName;
            this.ponyLevel.text = "" + ch.characterData.CharacterLevel;
        }

        ponyIcon.overrideSprite = GameController.Instance.iconManager.GetIconById(this.saved.baseClass.Icon);
        ShowIcon();
    }
Exemplo n.º 5
0
 public static void ClearActiveCharacter()
 {
     activeCharacter = null;
     if (characterAchievements != null)
     {
         characterAchievements.Clear();
     }
     if (characterStatistics != null)
     {
         characterStatistics.Clear();
     }
 }
    public void Init()
    {
        UB_SavedCharacter active = PF_PlayerData.activeCharacter;

        if (active != null)
        {
            HP_Stat.statValue.text  = "" + active.characterData.Health;
            HP_Stat.levelBonus.text = "+" + active.baseClass.HPLevelBonus;

            MP_Stat.statValue.text  = "" + active.characterData.Mana;
            MP_Stat.levelBonus.text = "+" + active.baseClass.MPLevelBonus;

            DP_Stat.statValue.text  = "" + active.characterData.Defense;
            DP_Stat.levelBonus.text = "+" + active.baseClass.DPLevelBonus;

            SP_Stat.statValue.text  = "" + active.characterData.Speed;
            SP_Stat.levelBonus.text = "+" + active.baseClass.SPLevelBonus;
        }
    }
Exemplo n.º 7
0
    void OnGameplayEventReceived(string message, PF_GamePlay.GameplayEventTypes type)
    {
        if (type == PF_GamePlay.GameplayEventTypes.IntroQuest)
        {
            AdvanceAct();
            this.currentEncounter = GetNextEncounter(true);
            this.gameplayController.enemyController.currentEncounter.UpdateCurrentEncounter(this.currentEncounter);
            this.gameplayController.enemyController.nextController.UpdateNextEncounters();

            this.currentTurnNumber = 1;
            //this.currentEncounter =  PF_GamePlay.encounters.First();
            this.currentPlayer = PF_PlayerData.activeCharacter;
        }

        if (type == PF_GamePlay.GameplayEventTypes.StartQuest)
        {
            StartTurn();
        }

        if (type == PF_GamePlay.GameplayEventTypes.OutroEncounter)
        {
            CompleteEncounter();
            return;
        }

        if (type == PF_GamePlay.GameplayEventTypes.EnemyTurnEnds || type == PF_GamePlay.GameplayEventTypes.PlayerTurnEnds)
        {
            if (message.Contains(GlobalStrings.PLAYER_RESPAWN_EVENT))
            {
                gameplayController.playerController.UpdateQuestStats();
                StartCoroutine(gameplayController.playerController.LifeBar.UpdateBar(gameplayController.playerController.LifeBar.maxValue));
            }
            else
            {
                ToggleTurn();
            }
        }
    }
Exemplo n.º 8
0
 public void LockSlot()
 {
     LockedUI.gameObject.SetActive(true);
     saved = null;
     DeselectSlot();
 }