Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using UnityEngine;
- using Sirenix.OdinInspector;
- [CreateAssetMenu(fileName = "GameState", menuName = "Super Critical/Game State")]
- public class GameState : ScriptableObject
- {
- [ShowInInspector, ReadOnly]
- bool m_paused;
- public static event Action OnPause;
- public bool Paused
- {
- get { return m_paused; }
- set
- {
- m_paused = value;
- OnPause.Invoke();
- }
- }
- }
- using Pixelplacement;
- using UnityEngine;
- using Sirenix.OdinInspector;
- public class GameManager : Singleton<GameManager>
- {
- [Required] public GameState GameState;
- void Start()
- {
- GameState.Paused = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement