Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------- Assets/TreadmillForceAsserter.cs -----------------------
- index 590217f..c2be655 100644
- @@ -3,8 +3,8 @@ using System.Collections;
- public class TreadmillForceAsserter : MonoBehaviour {
- - public bool IsEnabled = true;
- -
- + public bool IsEnabled = true;
- +
- public Transform playerDefaultPos;
- void OnCollisionStay2D(Collision2D coll)
- @@ -29,12 +29,12 @@ public class TreadmillForceAsserter : MonoBehaviour {
- }
- }
- - void OnTriggerStay2D(Collider2D coll)
- - {
- - if(coll.gameObject.GetComponent<MonsterController>() != null)
- - {
- - //Debug.Log("Collidor");
- - coll.gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(-22.5f, 0));
- - }
- + void OnTriggerStay2D(Collider2D coll)
- + {
- + if(coll.gameObject.GetComponent<MonsterController>() != null)
- + {
- + //Debug.Log("Collidor");
- + coll.gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(-22.5f, 0));
- + }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement