public override void SetStat(Define.WorldObject type, string id)
    {
        Dictionary <string, ContentsData.CharacterStat> statDict = Managers.Data.CharacterStatDict;

        ContentsData.CharacterStat stat = statDict[id];

        Id          = stat.ID;
        MaxHp       = stat.HP;
        Hp          = int.Parse(MaxHp.ToString());
        MaxMp       = stat.MP;
        Mp          = int.Parse(MaxMp.ToString());
        Attack      = stat.Attack;
        Defense     = stat.Defense;
        AttackSpeed = stat.AttackSpeed;
        MoveSpeed   = stat.MoveSpeed;
        AttackRange = stat.AttackRange;

        Level       = stat.Level;
        SubName     = stat.SubName;
        Description = stat.Description;
        STR         = stat.STR;
        AGI         = stat.AGI;
        INT         = stat.INT;
        Exp         = stat.EXP;

        Gold       = 1000;
        CurrentExp = 0;
    }
Beispiel #2
0
 private void Start()
 {
     maxMp = GetComponent <MaxMp>();
     if (maxMp != null)
     {
         SetValue(maxMp.GetValue());
     }
 }
Beispiel #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PlayerId != 0UL)
            {
                hash ^= PlayerId.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (CharacterId != 0)
            {
                hash ^= CharacterId.GetHashCode();
            }
            if (Level != 0)
            {
                hash ^= Level.GetHashCode();
            }
            if (Exp != 0)
            {
                hash ^= Exp.GetHashCode();
            }
            if (Hp != 0)
            {
                hash ^= Hp.GetHashCode();
            }
            if (MaxHp != 0)
            {
                hash ^= MaxHp.GetHashCode();
            }
            if (Mp != 0)
            {
                hash ^= Mp.GetHashCode();
            }
            if (MaxMp != 0)
            {
                hash ^= MaxMp.GetHashCode();
            }
            if (Food != 0)
            {
                hash ^= Food.GetHashCode();
            }
            if (MaxFood != 0)
            {
                hash ^= MaxFood.GetHashCode();
            }
            if (Gold != 0)
            {
                hash ^= Gold.GetHashCode();
            }
            if (HeadIcon != 0)
            {
                hash ^= HeadIcon.GetHashCode();
            }
            if (MapSkillId != 0)
            {
                hash ^= MapSkillId.GetHashCode();
            }
            if (BattleSkillId != 0)
            {
                hash ^= BattleSkillId.GetHashCode();
            }
            hash ^= equips_.GetHashCode();
            return(hash);
        }