private void Awake() { animator = GetComponent <Animator>(); propControls = GetComponent <PropControlsOverride>(); fullScale = base.transform.localScale; tweenRetrieve(); }
private void LoadContextualControlsLayout() { PropUser localPlayerPropUser = Service.Get <PropService>().LocalPlayerPropUser; if (localPlayerPropUser != null && localPlayerPropUser.Prop != null) { PropControlsOverride propControls = localPlayerPropUser.Prop.PropControls; if (!isInShallowWater && propControls.DivingControls != null && !string.IsNullOrEmpty(propControls.DivingControls.Key)) { dispatcher.DispatchEvent(new ControlsScreenEvents.SetRightOption(propControls.DivingControls)); } else { dispatcher.DispatchEvent(new ControlsScreenEvents.SetRightOption(propControls.SwimControls)); } } else if (GetComponentInChildren <InvitationalItemExperience>() != null) { InvitationalItemExperience componentInChildren = GetComponentInChildren <InvitationalItemExperience>(); if (!isInShallowWater && componentInChildren.DivingControlLayout != null && !string.IsNullOrEmpty(componentInChildren.DivingControlLayout.Key)) { dispatcher.DispatchEvent(new ControlsScreenEvents.SetRightOption(componentInChildren.DivingControlLayout)); } else { dispatcher.DispatchEvent(new ControlsScreenEvents.SetRightOption(componentInChildren.SwimControlLayout)); } } else { LoadControlsLayout(); } }