예제 #1
0
 public void HookOnTrackingChanged()
 {
     _trackable = FindObjectOfType <TrackableObject>();
     if (_trackable)
     {
         _trackable.OnTrackingChanged += _trackable_OnTrackingChanged;
         _turbine = _trackable.GetComponentInChildren <AnimationController>(true);
     }
 }
 private void UDTEventHandler_OnTargetBuilt(object sender, TargetBuiltEventArgs args)
 {
     if (_trackable)
     {
         _trackable.OnTrackingChanged -= Trackable_OnTrackingChanged;
     }
     _trackable = args.TrackableObject;
     _trackable.OnTrackingChanged += Trackable_OnTrackingChanged;
     _buildingObject = _trackable.GetComponentInChildren <BuildingObject>(true);
     _floorContainer = _buildingObject.GetComponentInChildren <FloorContainer>(true);
     HouseViewModel.Instance.MaxFloor = _floorContainer.Floors.Count - 1;
 }