57 internal void Update(GameObject otherGO, Physics2D.Contact c) {
58 if (this.gameObject == null) {
59 this.gameObject = otherGO;
60 this.collider = this.gameObject.GetComponent<
TSCollider2D>();
61 this.rigidbody = this.gameObject.GetComponent<
TSRigidBody2D>();
62 this.transform = this.collider.tsTransform;
66 if (contacts[0] == null) {
71 Physics2D.FixedArray2<TSVector2> points;
73 c.GetWorldManifold(out normal, out points);
76 contacts[0].
point = points[0];
78 this.relativeVelocity = c.CalculateRelativeVelocity();
TSRigidBody2D rigidbody
TSRigidBody of the body hit, if there is one attached
Represents information about a contact between two 2D bodies.
GameObject gameObject
GameObject of the body hit.
TSTransform2D transform
TSTransform of the body hit
TSVector2 relativeVelocity
The TSTransform of the body hit.
TSCollider2D collider
TSCollider of the body hit
Represents a physical 2D rigid body.
Abstract collider for 2D shapes.