Exemplo n.º 1
0
 private void Awake()
 {
     raycaster                = BoxRaycaster.Create(boxCollider, layerMask);
     moveTransform            = !!moveTransform ? moveTransform : transform;
     collisionMoveController  = CollisionMoveController.Create(moveTransform, this);
     collisionMoveHitsFactory = CollisionMoveHitsFactory.Create(boxCollider);
 }
        public static CollisionMoveController Create(Transform transform, PhysicsMovement movement)
        {
            CollisionMoveController instance = CreateInstance <CollisionMoveController>();

            instance.transform = transform;
            instance.movement  = movement;
            return(instance);
        }