public static PlayerSpecifications Create(byte strength,
												  byte stamina,
												  byte intelligence,
												  byte agility)
        {
            PlayerSpecifications result = new PlayerSpecifications();
                result.strength = strength;
                result.stamina = stamina;
                result.intelligence = intelligence;
                result.agility = agility;
            return result;
        }
Exemple #2
0
        //private float timeStamp;
        void Start()
        {
            states         = new PlayerStates();
            damage         = new PlayerStates();
            specifications = new PlayerSpecifications();

                specifications.strength     = 3;
                specifications.stamina      = 4;
                specifications.intelligence = 0;
                specifications.agility      = 4;

                damage.health = 50f; // урон в 2 ед.

                states.damageMelee               = 2f;
                states.chanceCriticalDamageMelee = 0.05f;
                states.criticalDamageMelee       = 0.2f;
                states.health                    = 30f;
                states.maxHealth                 = 30f;

            base.OnStart();
        }
Exemple #3
0
        /// <summary>
        /// Возвращает полученный и "усвоенный" урон
        /// </summary>
        /// <param name="defenderStates">Статы защищающейся стороны</param>
        /// <param name="defenderSpecifications">навыки защищающейся стороны</param>
        /// <param name="damage">урон-по умолчанию, который сторона получает</param>
        /// <returns>Возвращает полученный урон</returns>
        public static PlayerStates doProtection(PlayerStates         defenderStates,
												PlayerSpecifications defenderSpecifications,
												PlayerStates damage)
        {
            return damage;
        }
Exemple #4
0
        /// <summary>
        /// Урон, который посылает атакующая сторона
        /// </summary>
        /// <param name="attackerStates">статы атакующей стороны</param>
        /// <param name="attackerSpecifications">характеристики атакующей стороны</param>
        /// <param name="defaultAttack">значение атаки-по умолчанию предмета</param>
        /// <returns>Возвращает наносимый урон</returns>
        public static PlayerStates createDamage(PlayerStates         attackerStates,
												PlayerSpecifications attackerSpecifications,
												PlayerStates defaultAttack)
        {
            return defaultAttack;
        }
 public static float getMaxPickUpMass(PlayerSpecifications specifications)
 {
     return specifications.strength * 10.0f + specifications.intelligence * 10.0f;
 }