Exemple #1
0
    private void Remove(FrameAnimation animation)
    {
        if (animation == anim.GetAnimation("spawn"))
        {
            anim.ChangeAnimation("afterSpawn");

            Instantiate(enemyGO, transform.position, Quaternion.identity);
        }
    }
Exemple #2
0
    protected void Remove(FrameAnimation animation)
    {
        FrameAnimator anim = GetComponent <FrameAnimator>();

        if (anim != null)
        {
            if (animation == anim.GetAnimation("die"))
            {
                Destroy(gameObject);
            }
        }
    }