Exemplo n.º 1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if(isSmall){
         switch(other.tag){
         case GlobalStatics.fanTag:
             status=statusenu.Normal;
             break;
         case GlobalStatics.dirtTag:
             transform.tag = GlobalStatics.playerTag;
             break;
         }
     }
 }
Exemplo n.º 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        //Debug.Log ("triggered");
        if(isSmall){
            switch(other.tag){
            case GlobalStatics.fanTag:
                hitFan = other.gameObject;
                status = statusenu.Fan;
                //Debug.Log ("fan");
                break;
            case GlobalStatics.dirtTag:
                //Debug.Log(transform.tag);
                transform.tag = GlobalStatics.diggingTag;
                break;
            }
            Animator ani = GetComponent<Animator>();

            switch(other.name){
                case "bullet":
                ani.SetBool("hit",true);
                break;
            }
        }
    }