예제 #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "up")
        {
            Up();
            mvs.SpriteDown();
        }

        if (other.gameObject.tag == "left")
        {
            Left();
            mvs.SpriteLeft();
        }


        if (other.gameObject.tag == "right")
        {
            Right();
            mvs.SpriteRight();
        }



        if (other.gameObject.tag == "down")
        {
            Down();
            mvs.SpriteUp();
        }
    }