Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // EndZone
- void OnTriggerEnter2D(Collider2D Other)
- {
- Debug.Log("EndZone::OnTriggerEnter2D " + playerNumber.ToString());
- if (Other.gameObject.tag == "Puck")
- {
- Observer.SendMessage("Score", "" + playerNumber.ToString());
- }
- }
- // PaddleController
- void OnCollisionEnter2D(Collision2D coll)
- {
- // Note: the problem is not CurrVelocity.magnitude < epsilon. Already tested checking that.
- // In fact, the bug still persists if I return at the beginning of this function.
- Debug.Log("PaddleController::OnCollisionEnter2D " + coll.gameObject.tag);
- if (coll.gameObject.tag == "Puck")
- {
- coll.gameObject.GetComponent<Rigidbody2D>().AddForce(CurrVelocity);
- SoundManager.RandomizeSfxPitch(click);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement