コード例 #1
0
        /* ======================================== *\
         *                FUNCTIONS                 *
        \* ======================================== */
        public override AttackDataStat CreateAttack(CharacterStatController user, WeaponData weaponData)
        {
            AttackDataStat res = new AttackDataStat(weaponData);
            res.Damage = user.GetStat(statDamage);
            res.DamageVariance = user.GetStat(statDamageVariance);

            res.KnockbackDamage = user.GetStat(statKnockbackDamage);
            res.KnockbackDamageVariance = user.GetStat(statKnockbackDamageVariance);

            res.LaunchDamage = user.GetStat(statLaunchDamage);
            res.LaunchDamageVariance = user.GetStat(statLaunchDamageVariance);

            res.Accuracy = user.GetStat(statAccuracy);
            res.AccuracyVariance = user.GetStat(statAccuracyVariance);
            return res;
        }
コード例 #2
0
        /* ======================================== *\
         *           GETTERS AND SETTERS            *
        \* ======================================== */

        #endregion

        #region Functions 

        /* ======================================== *\
         *                FUNCTIONS                 *
        \* ======================================== */

        public AttackData(AAttackProcessor attackProcess, CharacterStatController user, WeaponData weaponData)
        {
            attackProcessor = attackProcess;
            attackDataStat = attackProcessor.CreateAttack(user, weaponData);
        }
コード例 #3
0
 public override AttackDataStat CreateAttack(CharacterStatController user, WeaponData weaponData)
 {
     AttackDataStat res = new AttackDataStat(weaponData);
     return res;
 }
コード例 #4
0
 public void DrawWeapon(WeaponData weaponData)
 {
     weaponName.text = weaponData.WeaponName;
     weaponIcon.sprite = weaponTypeDatabase.GetSpriteIcon(weaponData.GetWeaponType());
     weaponLayout.color = weaponTypeDatabase.GetColorType(weaponData.GetWeaponType());
 }
コード例 #5
0
 public AttackDataStat(WeaponData weaponData)
 {
     attackType = weaponData.AttackType;
     scratchDamage = weaponData.ScratchDamage;
 }
コード例 #6
0
 public void RemoveWeapon(WeaponData weaponData)
 {
     characterStatController.RemoveStat(weaponData.BaseStat, StatModifierType.Flat);
 }
コード例 #7
0
 public void EquipWeapon(WeaponData weaponData)
 {
     characterStatController.AddStat(weaponData.BaseStat, StatModifierType.Flat);
 }
コード例 #8
0
 public void SetMainColor(WeaponData weapon)
 {
     Color color = weaponData.GetColorType(weapon.GetWeaponType());
     for (int i = 0; i < imageColors.Length; i++)
         imageColors[i].color = color;
 }