Ejemplo n.º 1
0
 /// <summary>
 ///     Создает модель данных о характеристиках персонажа
 /// </summary>
 /// <param name="Specifications">Все данные о персонаже</param>
 public CharacterConditionsSpecifications(EnemySpecifications Specifications)
 {
     BleedingDamage       = Specifications.BleedingDamage;
     BleedingTime         = Specifications.BleedingTime;
     PoisonDamage         = Specifications.PoisonDamage;
     PoisonTime           = Specifications.PoisonTime;
     WeaknessDamageReduce = Specifications.WeaknessDamageReduce;
     WeaknessTime         = Specifications.WeaknessTime;
     KnokedDownTime       = Specifications.KnokedDownTime;
     BlindingTime         = Specifications.BlindingTime;
     ImmobilizingTime     = Specifications.ImmobilizingTime;
     SlowingTime          = Specifications.SlowingTime;
     SlowSpeed            = Specifications.SlowSpeed;
 }
Ejemplo n.º 2
0
        /// <summary>
        ///     Кровотечение
        /// </summary>
        /// <param name="CharacterModel">Модель персонажа</param>
        /// <param name="deltaTime">Время</param>
        public void Bleed(BaseCharacterModel CharacterModel, ref EnemySpecifications enemySpecifications,
                          float deltaTime)
        {
            ConditionTimers["Bleeding"] += deltaTime;
            CharacterModel.Health       -= ConditionsSpecifications.BleedingDamage;

            Debug.Log(
                $"!!!BLEED!!! Health:{CharacterModel.Health.ToString("0")} Condition Time Left: {(ConditionsSpecifications.BleedingTime - ConditionTimers["Bleeding"]).ToString("0.0")}");

            if (ConditionTimers["Bleeding"] >= ConditionsSpecifications.BleedingTime)
            {
                ConditionTimers["Bleeding"] = 0;
                Conditions.ChangeConditionStatus("Bleeding", false);
                ConditionsUpdateEvent -= Bleed;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Замедление
        /// </summary>
        /// <param name="CharacterModel">Модель персонажа</param>
        /// <param name="deltaTime">Время</param>
        public void Slowing(BaseCharacterModel CharacterModel, ref EnemySpecifications enemySpecifications,
                            float deltaTime)
        {
            ConditionTimers["Slowed"] += deltaTime;
            CharacterModel.Speed       = ConditionsSpecifications.SlowSpeed;
            CharacterModel.RunSpeed    = ConditionsSpecifications.SlowSpeed;

            //Debug.Log(
            //    $"!!!SLOW!!! Condition Time Left: {(ConditionsSpecifications.SlowingTime - ConditionTimers["Slowed"]).ToString("0.0")}");

            if (ConditionTimers["Slowed"] >= ConditionsSpecifications.SlowingTime)
            {
                ConditionTimers["Slowed"] = 0;
                Conditions.ChangeConditionStatus("Slowed", false);
                ConditionsUpdateEvent -= Slowing;

                CharacterModel.Speed    = enemySpecifications.Speed;
                CharacterModel.RunSpeed = enemySpecifications.RunSpeed;
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 ///     Запускает выполнение всех активных статусов
 /// </summary>
 /// <param name="spec">Модель данных противника</param>
 /// <param name="deltaTime">Время</param>
 public void ConditionsUpdateStart(BaseCharacterModel CharacterModel,
                                   ref EnemySpecifications enemySpecifications, float deltaTime)
 {
     ConditionsUpdateEvent?.Invoke(CharacterModel, ref enemySpecifications, deltaTime);
 }