Exemple #1
0
        /* ======================================== *\
         *                FUNCTIONS                 *
        \* ======================================== */


        public CharacterStatController(CharacterData data)
        {
            characterData = data;
            characterBonusStat = new CharacterStat();
            characterPercentageBonusStat = new CharacterStat(1);
            currentHP = Mathf.RoundToInt((characterData.CharacterStat.Hp + characterBonusStat.Hp) * characterPercentageBonusStat.Hp);
        }
Exemple #2
0
        public CharacterStat(CharacterStat characterStat)
        {
            HpMax = characterStat.HpMax;

            MotionSpeed = characterStat.MotionSpeed;
            Attack = characterStat.Attack;
            Defense = characterStat.Defense;

            AimSpeed = characterStat.AimSpeed;
            AimAcceleration = characterStat.AimAcceleration;
            MinAimDistance = characterStat.MinAimDistance;
            MaxAimDistance = characterStat.MaxAimDistance;
            MaxMagazine = characterStat.MaxMagazine;

            KnockbackTime = characterStat.KnockbackTime;

            Speed = characterStat.Speed;
            Jump = characterStat.Jump;
            Gravity = characterStat.Gravity;
            GravityMax = characterStat.GravityMax;
            Mass = characterStat.Mass;

            Damage = characterStat.Damage;
            KnockbackDamage = characterStat.KnockbackDamage;
            LaunchDamage = characterStat.LaunchDamage;
            StunDamage = characterStat.StunDamage;
            Accuracy = characterStat.Accuracy;

            DamageVariance = characterStat.DamageVariance;
            KnockbackDamageVariance = characterStat.KnockbackDamageVariance;
            LaunchDamageVariance = characterStat.LaunchDamageVariance;
            StunDamageVariance = characterStat.StunDamageVariance;
            AccuracyVariance = characterStat.AccuracyVariance;
        }
        public CharacterStat(CharacterStat characterStat)
        {
            Hp = characterStat.Hp;
            HpMax = characterStat.HpMax;

            AttackMultiplier = characterStat.AttackMultiplier;
            DefenseMultiplier = characterStat.DefenseMultiplier;
            MotionSpeed = characterStat.MotionSpeed;

            Speed = characterStat.Speed;
            JumpImpulsion = characterStat.JumpImpulsion;
            Gravity = characterStat.Gravity;
            GravityMax = characterStat.GravityMax;
            Mass = characterStat.Mass;

            KnockbackTime = characterStat.KnockbackTime;
            KnockdownResistance = characterStat.KnockdownResistance;
            WakeUpRecovery = characterStat.WakeUpRecovery;


        }
Exemple #4
0
        public void Add(CharacterStat characterStat, float multiplier = 1)
        {
            HpMax += characterStat.HpMax * multiplier;

            MotionSpeed += characterStat.MotionSpeed * multiplier;
            Attack += characterStat.Attack * multiplier;
            Defense += characterStat.Defense * multiplier;


            AimSpeed += characterStat.AimSpeed * multiplier;
            AimAcceleration += characterStat.AimAcceleration * multiplier;
            MinAimDistance += characterStat.MinAimDistance * multiplier;
            MaxAimDistance += characterStat.MaxAimDistance * multiplier;
            MaxMagazine += characterStat.MaxMagazine * multiplier;


            Speed += characterStat.Speed * multiplier;
            Jump += characterStat.Jump * multiplier;
            Gravity += characterStat.Gravity * multiplier;
            GravityMax += characterStat.GravityMax * multiplier;
            Mass += characterStat.Mass * multiplier;

            Damage += characterStat.Damage * multiplier;
            KnockbackDamage += characterStat.KnockbackDamage * multiplier;
            LaunchDamage += characterStat.LaunchDamage * multiplier;
            StunDamage += characterStat.StunDamage * multiplier;
            Accuracy += characterStat.Accuracy * multiplier;

            DamageVariance += characterStat.DamageVariance * multiplier;
            KnockbackDamageVariance += characterStat.KnockbackDamageVariance * multiplier;
            LaunchDamageVariance += characterStat.LaunchDamageVariance * multiplier;
            StunDamageVariance += characterStat.StunDamageVariance * multiplier;
            AccuracyVariance += characterStat.AccuracyVariance * multiplier;

            KnockbackTime += characterStat.KnockbackTime * multiplier;
        }
Exemple #5
0
 public void CreateStatController()
 {
     characterBonusStat = new CharacterStat();
     characterPercentageBonusStat = new CharacterStat(1);
     currentHP = Mathf.RoundToInt((characterData.CharacterStat.Hp + characterBonusStat.Hp) * characterPercentageBonusStat.Hp);
 }
Exemple #6
0
 public void Remove(CharacterStat characterStat)
 {
     Add(characterStat, -1);
 }