final commit?
This commit is contained in:
parent
0e2a7cc7c3
commit
3f53e2caa8
59 changed files with 3989 additions and 1668 deletions
|
|
@ -5,17 +5,20 @@ public class ZombieFairy : Enemy
|
|||
[SerializeField] private Ability deathAbility;
|
||||
[SerializeField] private bool hasDiedOnce;
|
||||
[SerializeField] private float disappearanceTime;
|
||||
[SerializeField] private Color disappearanceColor;
|
||||
[SerializeField] private BoxCollider2D boxCollider;
|
||||
private float currentDisappearanceTime;
|
||||
protected override void OnDeath()
|
||||
{
|
||||
if (!hasDiedOnce)
|
||||
{
|
||||
hasDiedOnce = true;
|
||||
health = maxHealth;
|
||||
invulnerable = true;
|
||||
isStalled = true;
|
||||
hasDiedOnce = true;
|
||||
boxCollider.enabled = false;
|
||||
currentDisappearanceTime = disappearanceTime;
|
||||
sprite.color = Color.black;
|
||||
sprite.color = disappearanceColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -34,6 +37,7 @@ public class ZombieFairy : Enemy
|
|||
currentDisappearanceTime -= Time.deltaTime;
|
||||
if (currentDisappearanceTime <= 0)
|
||||
{
|
||||
boxCollider.enabled = true;
|
||||
invulnerable = false;
|
||||
isStalled = false;
|
||||
sprite.color = Color.white;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue