Пример #1
0
 public override void _PhysicsProcess(float delta)
 {
     if (KeyboardUtils.GetKey("ui_select", Keystatus.Pressed))
     {
         PulaTexto();
     }
 }
 public override void _Process(float delta)
 {
     if (KeyboardUtils.GetKey("ui_cancel", Keystatus.Pressed))
     {
         Input.SetMouseMode(Input.MouseMode.Visible);
     }
 }
Пример #3
0
        private void Movimento()
        {
            BugsBLL.FullCombo();
            if (KeyboardUtils.GetKey("ui_select", Keystatus.Pressed) && personagemDTO.Municao != 0)
            {
                personagemDTO.Municao -= 1;
                ArmaSprite.Atirar(personagemDTO, personagemDTO.SpritePersonagem.FlipH);
            }
            if (KeyboardUtils.GetKey("ui_up", Keystatus.Pressed))
            {
                SingleMonophonicEmiterBLL.Reproduzir(JumpSound);
                BugsBLL.FlyBug = false;
                GravidadeBLL.Pular(personagemDTO);
                BugsBLL.NoCombo();
            }

            personagemDTO.Direcao.x = (Convert.ToInt32(KeyboardUtils.GetKey("ui_right", Keystatus.Hold)) - Convert.ToInt32(KeyboardUtils.GetKey("ui_left", Keystatus.Hold)));
            if (KeyboardUtils.GetKey("ui_right", Keystatus.Pressed) || KeyboardUtils.GetKey("ui_left", Keystatus.Pressed))
            {
                if (!BugsBLL.FlyBug)
                {
                    BugsBLL.Combo += 1;
                }
                Combo.Start(1);
            }

            MovimentoKinematicoBLL.Move2D(personagemDTO);
        }
Пример #4
0
        public override void _Process(float delta)
        {
            if (BugsBLL.Vida == 0)
            {
                Texto.Text        = "";
                TitleScreen.Frame = 4;
            }
            switch (TitleScreen.Frame)
            {
            case 0:
                if (string.IsNullOrEmpty(Texto.Text))
                {
                    TitleScreen.Frame = 1;
                }
                break;

            case 1:
                if (KeyboardUtils.GetKey("ui_left", Keystatus.Pressed) || KeyboardUtils.GetKey("ui_right", Keystatus.Pressed))
                {
                    SingleMonophonicEmiterBLL.Reproduzir(MenuSound);
                    TitleScreen.Frame = 2;
                }
                if (KeyboardUtils.GetKey("ui_accept", Keystatus.Pressed))
                {
                    SingleMonophonicEmiterBLL.Reproduzir(MenuSound);
                    Base.Portugues    = false;
                    TitleScreen.Frame = 3;
                }
                break;

            case 2:
                if (KeyboardUtils.GetKey("ui_left", Keystatus.Pressed) || KeyboardUtils.GetKey("ui_right", Keystatus.Pressed))
                {
                    SingleMonophonicEmiterBLL.Reproduzir(MenuSound);
                    TitleScreen.Frame = 1;
                }
                if (KeyboardUtils.GetKey("ui_accept", Keystatus.Pressed) || KeyboardUtils.GetKey("ui_up", Keystatus.Pressed))
                {
                    SingleMonophonicEmiterBLL.Reproduzir(MenuSound);
                    Base.Portugues    = true;
                    TitleScreen.Frame = 3;
                }
                break;

            case 3:
                if (KeyboardUtils.GetKey("ui_accept", Keystatus.Pressed) || KeyboardUtils.GetKey("ui_up", Keystatus.Pressed))
                {
                    SingleMonophonicEmiterBLL.Reproduzir(MenuSound);
                    Base.MudaNivel(1);
                }
                break;

            case 4:
                BugsBLL.Vida = 3;
                if (KeyboardUtils.GetKey("ui_accept", Keystatus.Pressed) || KeyboardUtils.GetKey("ui_up", Keystatus.Pressed))
                {
                    TitleScreen.Frame = 3;
                }
                break;

            default:
                break;
            }
        }