Ejemplo n.º 1
0
        private async void _on_DaysInc()
        {
            GMRoot.runner.DaysInc();

            foreach (var spevent in SpecialEventDialog.Process())
            {
                await ToSignal(ShowSpecialDialog(spevent), "tree_exited");
            }

            foreach (var eventobj in GMRoot.modder.events)
            {
                await ToSignal(ShowDialog(eventobj), "tree_exited");
            }

            foreach (var eventobj in riskContainer.Refresh())
            {
                await ToSignal(ShowDialog(eventobj), "tree_exited");
            }

            warnContainer.Refresh();

            //warnContainer.Refresh(GMRoot.modder.warns);

            ////taskContainer.Refresh(Runner.GetTask());

            //riskContainer.Refresh(GMRoot.runner.risks);

            if (GMRoot.runner.isEnd())
            {
                GMRoot.runner = null;
                GetTree().ChangeScene(EndScene.path);
            }
        }
Ejemplo n.º 2
0
        private async void _on_DaysInc()
        {
            RunData.Root.DaysInc();

            foreach (var spevent in SpecialEventDialog.Process())
            {
                var dialog = ShowSpecialDialog(spevent);

                await ToSignal(dialog, "tree_exited");
            }

            foreach (var eventobj in Modder.Mod.EventProcess(RunData.Date.Value))
            {
                var dialog = ShowDialog(eventobj);

                await ToSignal(dialog, "tree_exited");
            }

            warnContainer.Refresh(Modder.Mod.WarnProcess());

            taskContainer.Refresh(RunData.Root.GetTask());

            if (Root.inst.isEnd)
            {
                Root.Exit();
                GetTree().ChangeScene("res://Scenes/End/EndScene.tscn");
            }
        }