Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using DRSUtils.StateMachine;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class SummaryState : State<GameController>
- {
- #region Singleton
- public static SummaryState Instance;
- private void Awake()
- {
- Instance = this;
- }
- #endregion
- [SerializeField] SummaryScreen summaryScreen;
- GameController gc;
- public override void Enter(GameController owner)
- {
- gc = owner;
- summaryScreen.gameObject.SetActive(true);
- summaryScreen.RadarCanvas.Clear();
- summaryScreen.UpdateSummary();
- }
- public override void Execute()
- {
- if (Input.GetButtonDown("Back"))
- {
- gc.StateMachine.Pop();
- }
- }
- public override void Exit()
- {
- summaryScreen.RadarCanvas.Clear();
- summaryScreen.gameObject.SetActive(false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement