public void LoadSelection() { controls.Player.Run.started += _ => running = true; controls.Player.Run.canceled += _ => running = false; controls.Player.Move.started += context => OnMove(context.ReadValue <Vector2>()); controls.Player.Move.performed += context => OnMove(context.ReadValue <Vector2>()); controls.Player.Move.canceled += context => OnMove(context.ReadValue <Vector2>()); controls.Player.Interact.started += delegate { OnInteractButtonPressed(); }; controls.Player.Jump.started += delegate { OnJumpPressed(); }; controls.Player.Start.started += delegate { OnStartPressed(); }; user.AssociateActionsWithUser(controls); GetComponentInChildren <RandomColor>().SetColor(PlayerSkinManager.Instance.Colors[id]); m_RandomSkin.ToggleSkin(PlayerSkinManager.Instance.GetSelection(id)); }
private void OnInteractButtonPressed() { source.PlayOneShot(newSkinSound); m_RandomSkin.ToggleSkin(PlayerSkinManager.Instance.ToggleSelection(id)); }