Commit 50afa1b6 authored by 18류지석's avatar 18류지석

피격시 빨개짐

parent bda25718
......@@ -430,7 +430,21 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
}
}
StartCoroutine(DestroyInPhase(candArray));
StartCoroutine(HitRedEffect(num));
}
IEnumerator HitRedEffect(int damage)
{
float startTime = Time.time, endTime = startTime + 0.3f;
SpriteRenderer sprt = GameObject.Find("Player").GetComponent<SpriteRenderer>();
sprt.color = new Color(1, 0, 0);
while(Time.time < endTime)
{
sprt.color = new Color(1, 1 - (endTime - Time.time) / (endTime - startTime), 1 - (endTime - Time.time) / (endTime - startTime));
yield return null;
}
sprt.color = new Color(1, 1, 1);
}
/// <summary>
/// make term among lifestone destroy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment