/// <summary> /// Reset the player's current state and remove the object that is loaded into the cannon /// </summary> /// <param name="player"></param> private void OnAction(PlayerStates player) { player.playerState = PlayerStates.PlayerState.pEmpty; GameObject interactable = player.GetComponentInChildren <Interactable>().gameObject; Destroy(interactable); }
private void CompleteAction(PlayerStates player) { player.playerState = PlayerStates.PlayerState.pEmpty; GameObject interactable = player.GetComponentInChildren <InteractableObjs>().gameObject; player.itemHeld.SetActive(false); player.itemHeld = null; RotateShoulders(player.transform.GetChild(0).GetChild(0), player); interactable.SetActive(false); }