상속: UnityEngine.MonoBehaviour, IUnityBridgeComponent
예제 #1
0
 public UnityGameObject(GameObject gameObject)
 {
     this.GameObject        = gameObject;
     this.bridge            = gameObject.AddComponent <UnityBridgeComponent>();
     this.bridge.GameObject = this;
     this.Transform         = gameObject.transform.ToUniject();
 }
예제 #2
0
        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);
            }
        }