|
@@ -353,15 +353,19 @@ public class MoveCharacter : Character
|
|
|
hp -= damage;
|
|
hp -= damage;
|
|
|
|
|
|
|
|
//É˺¦Ìø×Ö
|
|
//É˺¦Ìø×Ö
|
|
|
- GameObject injuryNum = Instantiate(injuryNumText);
|
|
|
|
|
- injuryNum.transform.position = new Vector3(transform.position.x + Random.Range(-1f, 1f), transform.position.y + 1, transform.position.z);
|
|
|
|
|
- TextMeshProUGUI text = injuryNum.GetComponentInChildren<TextMeshProUGUI>();
|
|
|
|
|
- text.text = damage.ToString();
|
|
|
|
|
- if (gameObject.CompareTag("Player"))
|
|
|
|
|
|
|
+ if (showInjuryNum)
|
|
|
{
|
|
{
|
|
|
- text.color = Color.red;
|
|
|
|
|
|
|
+ GameObject injuryNum = Instantiate(injuryNumText);
|
|
|
|
|
+ injuryNum.transform.position = new Vector3(transform.position.x + Random.Range(-1f, 1f), transform.position.y + 1, transform.position.z);
|
|
|
|
|
+ TextMeshProUGUI text = injuryNum.GetComponentInChildren<TextMeshProUGUI>();
|
|
|
|
|
+ text.text = damage.ToString();
|
|
|
|
|
+ if (gameObject.CompareTag("Player"))
|
|
|
|
|
+ {
|
|
|
|
|
+ text.color = Color.red;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
uiHp.Show(hp, totalHp);
|
|
uiHp.Show(hp, totalHp);
|
|
|
if (hp <= 0)
|
|
if (hp <= 0)
|
|
|
{
|
|
{
|