public UnityGameObject(GameObject gameObject) { this.GameObject = gameObject; this.bridge = gameObject.AddComponent <UnityBridgeComponent>(); this.bridge.GameObject = this; this.Transform = gameObject.transform.ToUniject(); }
public void CollisionEnter(UnityEngine.Collision c) { UnityBridgeComponent other = c.gameObject.GetComponent <UnityBridgeComponent>(); if (null != other) { Collision testableCollision = new Collision(c.relativeVelocity.ToUniject(), other.GameObject.Transform, other.GameObject, c.contacts); _gameObject.CollisionEnter(testableCollision); } }