public void SwitchVisualization(InteractableStateArgs obj) { if (obj.NewInteractableState == InteractableState.ActionState) { Hands.Instance.SwitchVisualization(); } }
public void GoMoo(InteractableStateArgs obj) { if (obj.NewInteractableState == InteractableState.ActionState) { _cowController.GoMooCowGo(); } }
public void IncreaseSpeedStateChanged(InteractableStateArgs obj) { if (obj.NewInteractableState == InteractableState.ActionState) { _locomotive.IncreaseSpeedStateChanged(); } }
public void ReverseButtonStateChanged(InteractableStateArgs obj) { if (obj.NewInteractableState == InteractableState.ActionState) { _locomotive.ReverseButtonStateChanged(); } }
public void StartStopStateChanged(InteractableStateArgs obj) { if (obj.NewInteractableState == InteractableState.ActionState) { _locomotive.StartStopStateChanged(); } }
private void InteractableStateChanged(InteractableStateArgs obj) { _buttonInContactOrActionStates = false; _glowRenderer.gameObject.SetActive(obj.NewInteractableState > InteractableState.Default); switch (obj.NewInteractableState) { case InteractableState.ContactState: StopResetLerping(); _buttonMaterial.SetColor(_materialColorId, _buttonContactColor); _buttonInContactOrActionStates = true; break; case InteractableState.ProximityState: _buttonMaterial.SetColor(_materialColorId, _buttonDefaultColor); LerpToOldPosition(); break; case InteractableState.ActionState: StopResetLerping(); _buttonMaterial.SetColor(_materialColorId, _buttonActionColor); PlaySound(_actionSoundEffect); _buttonInContactOrActionStates = true; break; default: _buttonMaterial.SetColor(_materialColorId, _buttonDefaultColor); LerpToOldPosition(); break; } }
public void CrossingButtonStateChanged(InteractableStateArgs obj) { bool inActionState = obj.NewInteractableState == InteractableState.ActionState; if (inActionState) { ActivateTrainCrossing(); } _toolInteractingWithMe = obj.NewInteractableState > InteractableState.Default ? obj.Tool : null; }
private void StartStopStateChanged(InteractableStateArgs obj) { bool inActionState = obj.NewInteractableState == InteractableState.ActionState; if (inActionState) { if (_bladesRotation.IsMoving) { _bladesRotation.SetMoveState(false, 0.0f); } else { _bladesRotation.SetMoveState(true, _maxSpeed); } } _toolInteractingWithMe = obj.NewInteractableState > InteractableState.Default ? obj.Tool : null; }
private void OnButtonStateChanged(InteractableStateArgs obj) { toolInteractingWithMe = obj.NewInteractableState > InteractableState.Default ? obj.Tool : null; }