예제 #1
0
    public StatsSave GetStats()
    {
        StatsSave stats = new StatsSave();

        //combat stats
        stats.currentHP           = H_currentHealth;
        stats.maxHP               = H_maxHealth;
        stats.bonusHP             = P_healthBonus;
        stats.bonusHPPercent      = P_healthBonusPercent;
        stats.currentStamina      = H_currentStamina;
        stats.maxStamina          = H_maxStamina;
        stats.bonusStamina        = P_staminaBonus;
        stats.bonusStaminaPercent = P_staminaBonusPercent;
        stats.staminaRegenRate    = H_staminaRegenRate;
        stats.healthRegenRate     = H_healthRegenRate;
        stats.attackValue         = H_attackValue;
        stats.attackBonus         = P_attackBonus;
        stats.defenseValue        = H_defenseValue;
        stats.defenseBonus        = P_defenseBonus;

        // Attack elements stats
        stats.normalResistance    = H_normalResistance;
        stats.fireResistance      = H_fireResistance;
        stats.iceResistance       = H_iceResistance;
        stats.poisonResistance    = H_poisonResistance;
        stats.lightningResistance = H_lightningResistance;

        // Character general stats
        stats.currentEssence = H_currentEssence;
        stats.currentLevel   = H_currentLevel;

        return(stats);
    }
예제 #2
0
    public bool SetStats(StatsSave stats)
    {
        //SHOULDN'T ACTUALLY APPLY THEM
        //TODO : ACTUALLY APPLY THEM


        // Character combat stats
        H_currentHealth    = stats.currentHP;
        H_maxHealth        = stats.maxHP;
        H_currentStamina   = stats.currentStamina;
        H_maxStamina       = stats.maxStamina;
        H_staminaRegenRate = stats.staminaRegenRate;
        H_healthRegenRate  = stats.healthRegenRate;
        H_attackValue      = stats.attackValue;
        P_attackBonus      = stats.attackBonus;
        H_defenseValue     = stats.defenseValue;
        P_defenseBonus     = stats.defenseBonus;

        // Attack elements stats
        H_normalResistance    = stats.normalResistance;
        H_fireResistance      = stats.fireResistance;
        H_iceResistance       = stats.iceResistance;
        H_poisonResistance    = stats.poisonResistance;
        H_lightningResistance = stats.lightningResistance;

        // Character general stats
        H_currentEssence = stats.currentEssence;
        H_currentLevel   = stats.currentLevel;
        UpdateStats();
        return(true);
    }
예제 #3
0
    public StatsSave GetStats()
    {
        StatsSave stats = new StatsSave();

        //combat stats
        stats.currentHP = H_currentHealth;
        stats.maxHP = H_maxHealth;
        stats.bonusHP = P_healthBonus;
        stats.bonusHPPercent = P_healthBonusPercent;
        stats.currentStamina = H_currentStamina;
        stats.maxStamina = H_maxStamina;
        stats.bonusStamina = P_staminaBonus;
        stats.bonusStaminaPercent = P_staminaBonusPercent;
        stats.staminaRegenRate = H_staminaRegenRate;
        stats.healthRegenRate = H_healthRegenRate;
        stats.attackValue = H_attackValue;
        stats.attackBonus = P_attackBonus;
        stats.defenseValue = H_defenseValue;
        stats.defenseBonus = P_defenseBonus;

        // Attack elements stats
        stats.normalResistance = H_normalResistance;
        stats.fireResistance = H_fireResistance;
        stats.iceResistance = H_iceResistance;
        stats.poisonResistance = H_poisonResistance;
        stats.lightningResistance = H_lightningResistance;

        // Character general stats
        stats.currentEssence = H_currentEssence;
        stats.currentLevel = H_currentLevel;

        return stats;
    }
예제 #4
0
    void Awake()
    {
        if (S == null)
        {
            S = this;
            DontDestroyOnLoad(this.gameObject);
        }
        else
        {
            Destroy(this.gameObject);
        }

        SetStats();
    }
예제 #5
0
    //This is called when a player enters a door to change locations
    //It saves what needs to be transfered over to the next room
    //Such as player's stats and statuses
    //As well as the room he's about to enter
    public void EnterDoor(Door door)
    {
        _hasSavedStats = true;
        _lastStats     = _lePersonnage.GetStats();
        _StatusEffects.Clear();
        StatusEffect[] statusEf = FindObjectsOfType(typeof(StatusEffect)) as StatusEffect[];
        foreach (StatusEffect se in statusEf)
        {
            if (se.GetHost() == _lePersonnage.GetComponent <BattleObject>())
            {
                se.Pause();
                _StatusEffects.Add(se);
            }
            else
            {
                Destroy(se.gameObject);
            }
        }


        BattleInterface.Instance.UnInitialize();
        _nextDoor = door.DoorCode;
        Application.LoadLevel(door.LevelName);
    }
예제 #6
0
    public bool SetStats(StatsSave stats)
    {
        //SHOULDN'T ACTUALLY APPLY THEM
        //TODO : ACTUALLY APPLY THEM

        // Character combat stats
        H_currentHealth = stats.currentHP;
        H_maxHealth = stats.maxHP;
        H_currentStamina = stats.currentStamina;
        H_maxStamina = stats.maxStamina;
        H_staminaRegenRate = stats.staminaRegenRate;
        H_healthRegenRate = stats.healthRegenRate;
        H_attackValue = stats.attackValue;
        P_attackBonus = stats.attackBonus;
        H_defenseValue = stats.defenseValue;
        P_defenseBonus = stats.defenseBonus;

        // Attack elements stats
        H_normalResistance = stats.normalResistance;
        H_fireResistance = stats.fireResistance;
        H_iceResistance = stats.iceResistance;
        H_poisonResistance = stats.poisonResistance;
        H_lightningResistance = stats.lightningResistance;

        // Character general stats
        H_currentEssence = stats.currentEssence;
        H_currentLevel = stats.currentLevel;
        UpdateStats();
        return true;
    }