private void Remove(FrameAnimation animation) { if (animation == anim.GetAnimation("spawn")) { anim.ChangeAnimation("afterSpawn"); Instantiate(enemyGO, transform.position, Quaternion.identity); } }
protected void Remove(FrameAnimation animation) { FrameAnimator anim = GetComponent <FrameAnimator>(); if (anim != null) { if (animation == anim.GetAnimation("die")) { Destroy(gameObject); } } }