Exemple #1
0
 private void Awake()
 {
     animator     = GetComponent <Animator>();
     propControls = GetComponent <PropControlsOverride>();
     fullScale    = base.transform.localScale;
     tweenRetrieve();
 }
Exemple #2
0
 private InputButtonGroupContentKey getSittingControls(PropControlsOverride propControlsOverride)
 {
     if (propControlsOverride.SitControls != null && !string.IsNullOrEmpty(propControlsOverride.SitControls.Key))
     {
         return(propControlsOverride.SitControls);
     }
     return(propControlsOverride.DefaultControls);
 }
Exemple #3
0
 private void ShowPropControls()
 {
     if (Prop.IsOwnerLocalPlayer)
     {
         PropControlsOverride       propControls = Prop.PropControls;
         GameObject                 target       = dataEntityCollection.GetComponent <GameObjectReferenceData>(dataEntityCollection.LocalPlayerHandle).GameObject;
         InputButtonGroupContentKey inputButtonGroupContentKey = (LocomotionHelper.IsCurrentControllerOfType <SwimController>(target) ? ((!(LocomotionHelper.GetCurrentController(target) as SwimController).IsInShallowWater) ? getDivingControls(propControls) : propControls.SwimControls) : (LocomotionHelper.IsCurrentControllerOfType <SlideController>(target) ? getTubingControls(propControls) : ((!LocomotionHelper.IsCurrentControllerOfType <SitController>(target)) ? propControls.DefaultControls : ((!(LocomotionHelper.GetCurrentController(target) as SitController).IsUnderwater) ? getSittingControls(propControls) : propControls.SitSwimControls))));
         if (inputButtonGroupContentKey != null && !string.IsNullOrEmpty(inputButtonGroupContentKey.Key))
         {
             Service.Get <EventDispatcher>().DispatchEvent(new ControlsScreenEvents.SetRightOption(inputButtonGroupContentKey));
         }
         else
         {
             Log.LogError(this, "Did not find a valid controls content key for this state");
         }
     }
 }