Наследование: 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);
            }
        }