public IEnumerator IncrementHealth(int Increment) { CurrentHealth += Increment; yield return(new WaitForSeconds(0.5f)); Script_FloatingUiElementsController.Initalize(); Script_FloatingUiElementsController.CreateFloatingText(Increment.ToString(), ModelInGame.gameObject.transform, Script_FloatingUiElementsController.UiElementType.Text); }
public IEnumerator AddDeBuff(int a_debuffamount) { Script_FloatingUiElementsController.Initalize(); yield return(new WaitForSeconds(0.5f)); Script_FloatingUiElementsController.CreateFloatingText(0.ToString(), ModelInGame.gameObject.transform, Script_FloatingUiElementsController.UiElementType.AttackDown); BuffandDebuff -= a_debuffamount; }
public IEnumerator DecrementHealth(int Decrementby, Script_Skills.ElementalType elementalType, float TimeTillInitalDamage, float TimeTillHoveringUiElement, float TimeTillDamage) { yield return(new WaitForSeconds(TimeTillInitalDamage)); GotDamaged = true; if (m_creaturesAilment == CreaturesAilment.Sleep) { AlimentCounter = 0; } Script_FloatingUiElementsController.Initalize(); string AttackingElement = elementalType.ToString(); string ElementalWeakness = elementalWeakness.ToString(); string ElementalStrength = elementalStrength.ToString(); if (AttackingElement.Equals(ElementalWeakness)) { int ArgumentReference = Decrementby; float ConvertToFloat = ArgumentReference * 1.5f; int ConvertToInt = Mathf.CeilToInt(ConvertToFloat); Decrementby = ConvertToInt; yield return(new WaitForSeconds(TimeTillHoveringUiElement)); Script_FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), ModelInGame.gameObject.transform, Script_FloatingUiElementsController.UiElementType.Weak); } if (AttackingElement.Equals(ElementalStrength)) { int ArgumentReference = Decrementby; float ConvertToFloat = ArgumentReference / 1.5f; int ConvertToInt = Mathf.CeilToInt(ConvertToFloat); Decrementby = ConvertToInt; yield return(new WaitForSeconds(TimeTillHoveringUiElement)); Script_FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), ModelInGame.gameObject.transform, Script_FloatingUiElementsController.UiElementType.Strong); } yield return(new WaitForSeconds(TimeTillDamage)); Script_FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), ModelInGame.gameObject.transform, Script_FloatingUiElementsController.UiElementType.Text); CurrentHealth -= Decrementby; }