Ejemplo n.º 1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Coin")
        {
            elf.Target = other.gameObject;
        }

        if (other.tag == "Player")
        {
            elf.ChangeDirection();
            elf.ChangeElfState(new ElfPatrolState());
        }

        //Debug.Log("Elf's Target: " + elf.Target);
    }