Ejemplo n.º 1
0
    /*public void SetNewSavedPartyMember (int savedSlotNum, int charInt){
     *      if ((savedSlotNum < 4) && (charInt < this.characterProperties.characters.Length)) {
     *              this.dataObject.charactersInAirship[savedSlotNum] = charInt;
     *      }
     * }*/

    /// <summary>
    /// Adds the new character to inventory.
    /// </summary>
    /// <param name="character">Name of character to add.</param>
    public void AddNewCharacterToInventory(GameEnum.CharacterName character)
    {
        int newChar = (int)character;

        if (newChar < this.characterScriptables.characters.Length)
        {
            this.dataObject.characterInventory.Add(this.characterScriptables.characters [newChar].characterData.Clone());
        }
    }
Ejemplo n.º 2
0
    public CharacterSerialized(GameEnum.CharacterName charName, string name, string desc, int baseHp, int baseMp, GameEnum.AbilityName ability, GameEnum.RoleName role)
    {
        this.charName = charName;
        this.name     = name;
        this.desc     = desc;
        this.baseHp   = baseHp;
        this.baseMp   = baseMp;
        this.ability  = ability;
        this.curRole  = role;

        this.curHp = baseHp;
        this.curMp = baseMp;

        // Initialize exp for each role to 0;
        this.roleExp = new int[2];
        for (int i = 0; i < 2; i++)
        {
            this.roleExp[i] = 0;
        }
    }