Esempio n. 1
0
    public override IEnumerator DecrementHealth(int Decrementby, Skills.ElementalType elementalType, float TimeTillInitalDamage, float TimeTillHoveringUiElement, float TimeTillDamage)
    {
        string AttackingElement  = elementalType.ToString();
        string ElementalWeakness = elementalWeakness.ToString();
        string ElementalStrength = elementalStrength.ToString();

        int   ArgumentReference = Decrementby;
        float ConvertToFloat    = ArgumentReference / 1.5f;
        int   ConvertToInt      = Mathf.CeilToInt(ConvertToFloat);

        Decrementby = ConvertToInt;

        PressTurnManager.PressTurnReactions PressturnReaction = PressTurnManager.PressTurnReactions.Normal;


        if (AttackingElement.Equals(ElementalWeakness))
        {
            Decrementby += Decrementby / 4;
            yield return(new WaitForSeconds(TimeTillHoveringUiElement));

            FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Weak, m_IsUi);
            PressturnReaction = PressTurnManager.PressTurnReactions.Weak;
        }
        if (AttackingElement.Equals(ElementalStrength))
        {
            Decrementby -= Decrementby / 4;
            yield return(new WaitForSeconds(TimeTillHoveringUiElement));

            FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Strong, m_IsUi);
            PressturnReaction = PressTurnManager.PressTurnReactions.Strong;
        }


        yield return(new WaitForSeconds(TimeTillInitalDamage));

        FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Text, m_IsUi);
        m_CurrentHealth -= Decrementby;
        DeathCheck();
        // m_Status.RedTest();
        yield return(new WaitForSeconds(3.0f));

        TacticsManager.instance.CharacterSkillFinished(this, PressturnReaction);
    }
 public void SetElementalIcon(Skills.ElementalType aElementalIcon, string sourceName = "Global")
 {
     m_Image_ElementalIcon.material = SkillList.instance.GetElementalIcon(aElementalIcon);
 }
Esempio n. 3
0
 public void SetElementalIcon(Skills.ElementalType aSkills, string sourceName = "Global")
 {
     m_Image_ElementalIcon.material = m_ElementIconsList[(int)aSkills];
 }
Esempio n. 4
0
 public Material GetElementalIcon(Skills.ElementalType aElementalIcon, string sourceName = "Global")
 {
     return(m_ElementalTypes[(int)aElementalIcon]);
 }