This repository has been archived on 2024-07-09. You can view files and clone it, but cannot push or open issues or pull requests.
everellia/SheKnowsWhatYouAreToHerGame/Assets/Scripts/Player.cs

35 lines
797 B
C#

/*
* author: mark joshwel
* date: 27/5/2024
* description: script for handling player interactivity
*/
using UnityEngine;
/// <summary>
/// class for handling player interactivity
/// </summary>
public class Player : MonoBehaviour
{
/// <summary>
/// game manager instance
/// </summary>
private GameManager _game;
/// <summary>
/// initalisation function
/// </summary>
private void Start()
{
_game = GameManager.Instance;
}
/// <summary>
/// function called by the input system when escape is paused
/// </summary>
public void OnPause()
{
Debug.Log("escape pressed");
_game.SetDisplayState(_game.Paused ? GameManager.DisplayState.Game : GameManager.DisplayState.ScreenPauseMenu);
}
}