Ejemplo n.º 1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "fire")
     {
         print("regain");
         moveFire fireStats = other.GetComponent <moveFire> ();
         fireStats.fireSpeed = fireStats.fireSpeed * 2;
     }
 }
Ejemplo n.º 2
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.tag == "fire")
     {
         moveFire firebar = other.GetComponent <moveFire> ();
         firebar.fireSpeed /= 2.5f;
         //firebar.
     }
 }
Ejemplo n.º 3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "fire")
     {
         print("slow");
         moveFire fireStats = other.GetComponent <moveFire> ();
         fireStats.fireSpeed = fireStats.fireSpeed / 2;
     }
 }
Ejemplo n.º 4
0
    void OnCollisionEnter2D(Collision2D coll)
    {
        if (coll.gameObject.tag == "fire")
        {
            if (heldByPlayer)
            {
                putWoodDown();
            }

            moveFire firebar = coll.gameObject.GetComponent <moveFire> ();
            firebar.stopped = true;
            firebar.flickAnim.pauseFlicker = true;
            StartCoroutine("BurnWood");
        }
    }