Example #1
0
        public MainMenuEvent GetEvent()
        {
            var evt = _pendingEvent;

            _pendingEvent = MainMenuEvent.None;
            return(evt);
        }
    void OnMainMenuEvent(MainMenuEvent eve)
    {
        BGMManager.Instance.CurrentBGM = "BGM";
        AudioManager.Instance.Play("BGM", true, 1f, 0.5f);

        AudioManager.Instance.SetVolume("BGM_boss", 0f, 0.1f);
    }
Example #3
0
        internal static void OnDrawMainMenu(MainMenuEvent args)
        {
            if (CheckForUpdate.Do() && CanCheckForUpdate)
            {
                Task.Run(async() => await PerformCheckAndUpdateButtonAsync());
            }

            if (!PathfinderUpdaterPlugin.NeedsUpdate)
            {
                return;
            }

            if (PerformUpdate.Do() && CanPerformUpdate)
            {
                Task.Run(async() => await PerformUpdateAndUpdateButtonAsync(args.MainMenu));
            }
        }
        private void InvokeStateEvents(GameStates state)
        {
            switch (state)
            {
            case GameStates.Menu:
                MainMenuEvent?.Invoke();
                ClearEntities();
                break;

            case GameStates.GenerateMap:
                GenerateMenuEvent?.Invoke();
                ClearEntities();
                break;

            case GameStates.PlayMap:
                PlayMapMenuEvent?.Invoke();
                GameStartedEvent?.Invoke();
                break;

            default:
                break;
            }
        }
Example #5
0
 private void Awake()
 {
     _hotSeatButton.onClick.AddListener(() => _pendingEvent  = MainMenuEvent.HotSeatMenu);
     _networkButton.onClick.AddListener(() => _pendingEvent  = MainMenuEvent.NetworkMenu);
     _exitGameButton.onClick.AddListener(() => _pendingEvent = MainMenuEvent.Exit);
 }
 public void Invoke(MainMenuEvent mainMenuEvent)
 {
     _mainMenuEventsManager.Invoke(mainMenuEvent);
 }
 public void Remove(MainMenuEvent mainMenuEvent, UnityAction call)
 {
     _mainMenuEventsManager.Remove(mainMenuEvent, call);
 }
 public void On(MainMenuEvent mainMenuEvent, UnityAction call)
 {
     _mainMenuEventsManager.On(mainMenuEvent, call);
 }