Esempio n. 1
0
 public TouchDetector(PlaneTouchHandler planeTouchHandler, VirtualObjectTouchHandler virtualObjectTouchHandler,
                      ARRaycastManager arRaycastmanager, Logger logger)
 {
     this.planeTouchHandler         = planeTouchHandler;
     this.virtualObjectTouchHandler = virtualObjectTouchHandler;
     this.arRaycastmanager          = arRaycastmanager;
     this.logger            = logger;
     this.lastTouch         = null;
     this.lastTouchResolved = false;
     GenericState <TouchDetector> .InitState <SNoTouch>(this);
 }
Esempio n. 2
0
 private void Initialize()
 {
     arRaycastmanager      = GetComponent <ARRaycastManager>();
     virtualObjectsManager = new VirtualObjectsManager(gameObjectToInstantiate, logger);
     materialManager       = new MaterialManager(gameObjectToInstantiate);
     uiControls            = new UIControls();
     controller            = new MasterController(virtualObjectsManager, materialManager, uiControls);
     uiControls.SetController(controller);
     planeTouchHandler         = new PlaneTouchHandler(virtualObjectsManager, controller);
     virtualObjectTouchHandler = new VirtualObjectTouchHandler(virtualObjectsManager, controller);
     touchDetector             = new TouchDetector(planeTouchHandler, virtualObjectTouchHandler, arRaycastmanager, logger);
 }
Esempio n. 3
0
 private void Initialize()
 {
     arRaycastmanager        = GetComponent <ARRaycastManager>();
     virtualObjectsLayerMask = LayerMask.GetMask("VirtualObjects");
     arAnchorManager         = GetComponent <ARAnchorManager>();
     virtualObjectsCreator   = new VirtualObjectsCreator(arAnchorManager, gameObjectToInstantiate, virtualObjectsLayerMask, logger);
     virtualObjectsStore     = new VirtualObjectsStore(arAnchorManager, logger);
     virtualObjectsManager   = new VirtualObjectsManager(virtualObjectsCreator, virtualObjectsStore, logger);
     materialManager         = new MaterialManager(gameObjectToInstantiate);
     databaseCtrl            = new FirebaseWithCloudAnchorDb(new FirebaseWrapper(logger), new CloudAnchorsWrapper(arAnchorManager, logger), logger);
     uiControls = new UIControls();
     controller = new MasterController(virtualObjectsManager, materialManager, uiControls, databaseCtrl, logger);
     uiControls.SetController(controller);
     planeTouchHandler         = new PlaneTouchHandler(virtualObjectsManager, controller);
     virtualObjectTouchHandler = new VirtualObjectTouchHandler(virtualObjectsManager, controller);
     touchDetector             = new TouchDetector(planeTouchHandler, virtualObjectTouchHandler, arRaycastmanager, logger);
 }