Exemplo n.º 1
0
        public static void SetAttackStrength(IStatsCollection statsCollection, int quantity)
        {
            ITrait trait = statsCollection.GetStat(attackStrengthTraitId);

            if (trait != null)
            {
                trait.Quantity = quantity;
            }
        }
Exemplo n.º 2
0
        public static void SetSize(IStatsCollection statsCollection, int quantity)
        {
            ITrait trait = statsCollection.GetStat(sizeTraitId);

            if (trait != null)
            {
                trait.Quantity = quantity;
            }
        }
Exemplo n.º 3
0
        public static int GetDefenseStrength(IStatsCollection statsCollection)
        {
            ITrait trait = statsCollection.GetStat(defenseStrengthTraitId);

            if (trait == null)
            {
                return(defaultDefenseStrength);
            }
            return(Mathf.Clamp(trait.Quantity, minDefenseStrength, maxDefenseStrength));
        }
Exemplo n.º 4
0
        public static int GetMoveRadius(IStatsCollection statsCollection)
        {
            ITrait trait = statsCollection.GetStat(moveRadiusTraitId);

            if (trait == null)
            {
                return(0);
            }
            return(trait.Quantity);
        }
Exemplo n.º 5
0
        static float GetSpeed(IStatsCollection statsCollection)
        {
            ITrait trait = statsCollection.GetStat(speedTraitId);

            if (trait == null)
            {
                return(defaultSpeed);
            }
            return(Mathf.Clamp(trait.Quantity * 1.0f, minSpeed, maxSpeed));
        }
Exemplo n.º 6
0
        public static int GetSize(IStatsCollection statsCollection)
        {
            ITrait trait = statsCollection.GetStat(sizeTraitId);

            if (trait == null)
            {
                return(0);
            }
            return(trait.Quantity);
        }