Ejemplo n.º 1
0
        /************************************************************************************************************************/

        private void Awake()
        {
            Debug.Assert(Instance == null, $"The {nameof(GameManagerFSM)}.{nameof(Instance)} is already assigned.");
            Instance = this;

            _StateMachine = new StateMachine <State>(_Introduction);

            if (FindObjectOfType <GameManagerEnum>() != null)
            {
                Debug.LogError(
                    $"Both the {nameof(GameManagerEnum)} and {nameof(GameManagerFSM)} are active. Exit Play Mode and disable one of them.");
            }
        }
Ejemplo n.º 2
0
        /************************************************************************************************************************/

        private void Awake()
        {
            AnimancerUtilities.Assert(Instance == null, $"The {nameof(GameManagerFSM)}.{nameof(Instance)} is already assigned.");
            Instance = this;

            StateMachine.ForceSetState(_Introduction);

            // Make sure both game managers aren't active at the same time.
            // This wouldn't normally be necessary because a real game won't have two managers for the same thing.
            if (FindObjectOfType <GameManagerEnum>() != null)// Won't find inactive objects.
            {
                Debug.LogError(
                    $"Both the {nameof(GameManagerEnum)} and {nameof(GameManagerFSM)} are active. Exit Play Mode and disable one of them.");
            }
        }