void UpdateSword() { SwordController sc = gameObject.GetComponentInChildren <SwordController>(); sc.UpdateColour(attackPower / 100); attacking = sc.UpdateSword(attacking, charging); }
void UpdateSword() { sc.UpdateColour(attackPower / 100); attacking = sc.UpdateSword(attacking, charging); // resetting after attack if (!attacking) { timeSinceLastAttack = 0.0f; attackReady = false; committed = false; attackPower = 0.0f; } }