コード例 #1
0
        public override void _Ready()
        {
            _popup      = (Popup)FindNode("Popup");
            _actionList = (VBoxContainer)FindNode("ActionList");

            _eventManager    = GetNode <EventManager>("/root/EventManager");
            _settingsManager = GetNode <SettingsManager>("/root/SettingsManager");
            _guiBrain        = GetNode <GuiBrain>("/root/GuiBrain");

            SetActionList();

            _eventManager.Connect("Controls", this, "ShowControls");
            _settingsManager.Connect("ReTranslate", this, "Retranslate");

            Retranslate();
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: stereoa/Godot-GameTemplate
        public override void _Ready()
        {
            _eventManager = GetNode <EventManager>("/root/EventManager");
            _guiBrain     = GetNode <GuiBrain>("/root/GuiBrain");

            _eventManager.Connect("Options", this, "OnOptions");
            _eventManager.Connect("Exit", this, "OnExit");
            _eventManager.Connect("ChangeScene", this, "OnChangeScene");
            _eventManager.Connect("Restart", this, "RestartScene");

            _fadeLayer = GetNode <FadeLayer>("FadeLayer");
            _fadeTween = _fadeLayer.GetNode <Tween>("FadeTween");

            _fadeTween.Connect("tween_completed", this, "OnFadeTweenComplete");

            _guiBrain.GuiCollectFocusGroup();
        }
コード例 #3
0
        public override void _Ready()
        {
            _eventManager    = GetNode <EventManager>("/root/EventManager");
            _settingsManager = GetNode <SettingsManager>("/root/SettingsManager");
            _guiBrain        = GetNode <GuiBrain>("/root/GuiBrain");

            _eventManager.MainMenuShown = true;

            _guiBrain.GuiCollectFocusGroup();

            if (Settings.Html5)
            {
                GetNode <Button>("BG/MarginContainer/VBoxMain/HBoxContainer/ButtonContainer/Exit").Visible = false;
            }
            //Localization
            _settingsManager.Connect("ReTranslate", this, "Retranslate");

            Retranslate();
        }