Example #1
0
    // Use this for initialization
    void Start()
    {
        big  = GameObject.Find("BigBudy").GetComponent <BigBudy>();
        anim = gameObject.GetComponent <Animator>();

        anim.Play("walk_body");
    }
Example #2
0
 private void OnTriggerEnter2D(Collider2D col)
 {
     //enemigo toca al player
     if (col.gameObject.tag == "Enemy")
     {
         buddy = col.gameObject.GetComponent <BigBudy>();
         if (!buddy.ent)
         {
             buddy.ent = true;
             isSad     = true;
         }
     }
     if (col.gameObject.tag == "EnemyBullet")
     {
         isSad = true;
     }
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
        big = GameObject.Find("BigBudy").GetComponent <BigBudy>();

        r = gameObject.GetComponent <SpriteRenderer>();
    }