Ejemplo n.º 1
0
        public void DialogNext()
        {
            var e = RootState.PlayState.ActiveEntity;

            StatusService.Commit(e);

            if (e.IsGameOver)
            {
                SceneManager.LoadScene("Loading");
                return;
            }
            if (e.NextScene != null)
            {
                SceneManager.LoadScene(e.NextScene);
                return;
            }
            if (e.IsDayOver)
            {
                CalendarService.NextDay();
            }
            if (e.NextKey != null)
            {
                RootState.PlayState.ActiveEntity = GameConfiguration.Root.FindByKey(e.NextKey);
                return;
            }
            if (RootState.PlayState.PendingEntities.Count > 0)
            {
                RootState.PlayState.ActiveEntity = RootState.PlayState.PendingEntities.First();
                RootState.PlayState.PendingEntities.RemoveAt(0);
                return;
            }
            RootState.PlayState.ActiveEntity = null;
        }