private void Awake() { _originalLocalPosition = moveHandle.localPosition; _originalIconScales = new Vector3[iconScaleHandles.Length]; for (int i = 0; i < _originalIconScales.Length; i++) { _originalIconScales[i] = iconScaleHandles[i].localScale; } _originalBouncePositions = new Vector3[bounceHandles.Length]; for (int i = 0; i < _originalBouncePositions.Length; i++) { _originalBouncePositions[i] = bounceHandles[i].localPosition; } _originalBounceFabricColors = new Color[bounceGraphicsFabric.Length]; for (int i = 0; i < _originalBounceFabricColors.Length; i++) { _originalBounceFabricColors[i] = bounceGraphicsFabric[i].color; } _originalBounceDecalColors = new Color[bounceGraphicsDecal.Length]; for (int i = 0; i < _originalBounceDecalColors.Length; i++) { _originalBounceDecalColors[i] = bounceGraphicsDecal[i].color; } SimpleSpringInterper simpleSpringInterper = moveInterper; simpleSpringInterper.OnSpringValueChanged = (SimpleSpringInterper.SpringValueChangedHandler)Delegate.Combine(simpleSpringInterper.OnSpringValueChanged, new SimpleSpringInterper.SpringValueChangedHandler(OnMoveValueChanged)); SimpleSpringInterper simpleSpringInterper2 = scaleInterper; simpleSpringInterper2.OnSpringValueChanged = (SimpleSpringInterper.SpringValueChangedHandler)Delegate.Combine(simpleSpringInterper2.OnSpringValueChanged, new SimpleSpringInterper.SpringValueChangedHandler(OnScaleValueChanged)); scaleInterper.SetSpringGoal(INDEX_FABRIC, instant: true); setVisible(isVisible: false, instant: true); setIsFabric(isFabric: true); setupListeners(); widgetDisabler = GetComponent <ActiveSwatchWidgetDisabler>(); }
private void Awake() { _originalRotation = rotationHandle.localRotation; SimpleSpringInterper simpleSpringInterper = rotateSpring; simpleSpringInterper.OnSpringValueChanged = (SimpleSpringInterper.SpringValueChangedHandler)Delegate.Combine(simpleSpringInterper.OnSpringValueChanged, new SimpleSpringInterper.SpringValueChangedHandler(OnRotateValueChanged)); }
private void init() { getReferences(); originalCameraPosition = cinematicCameraFishingController.transform.position; _rodPropLineParent = _rodPropLineEndTransform.parent; SimpleSpringInterper simpleSpringInterper = reelSpring; simpleSpringInterper.OnSpringValueChanged = (SimpleSpringInterper.SpringValueChangedHandler)Delegate.Combine(simpleSpringInterper.OnSpringValueChanged, new SimpleSpringInterper.SpringValueChangedHandler(OnReelSpringUpdated)); locomotionBroadcaster.BroadcastOnControlsLocked(); eventDispatcher.DispatchEvent(new UIDisablerEvents.DisableUIElement("Joystick", hideElement: true)); userControl.enabled = true; eventDispatcher.DispatchEvent(new ControlsScreenEvents.SetButton(bobberContentKey, 0)); Quaternion quaternion = Quaternion.Euler(config.PlayerRotationTowardsWater); player.GetComponent <RunController>().SnapToFacing(quaternion * Vector3.forward); prizeDropContainer.transform.localPosition = config.PrizeDropOffset; patternIndex = getRandomPatternIndex(); setGameplayState(FishingGameplayStates.WaitingForServer, forceChange: true); CoroutineRunner.Start(ExecuteCast(), this, "ExecuteCast"); getFishingGamePrize(); clickListener = GetComponent <ClickListener>(); eventDispatcher.DispatchEvent(new PlayerCardEvents.SetEnablePlayerCard(enable: false)); if (PlatformUtils.GetPlatformType() != PlatformType.Standalone) { eventDispatcher.DispatchEvent(new UIDisablerEvents.DisableUIElementGroup("MainNavButtons")); eventDispatcher.DispatchEvent(new UIDisablerEvents.DisableUIElement("ChatButtons")); } }