Ejemplo n.º 1
0
        void ProcessInput()
        {
            //Pause
            if (Input.GetButtonDown("Cancel"))
            {
                Main.self.SetPause(!Main.self.is_paused);
                cam.SetCursorVisibility(Main.self.is_paused);
            }

            for (int i = 0; i < abilites.Count; ++i)
            {
                var  ability = abilites[i];
                bool is_held = ability.conf.axis.Length > 0 && Input.GetAxis(ability.conf.axis) > 0;
                if (is_held)
                {
                    if (!ability.TryUseAbility() && !abilites_queue.Contains(ability))
                    {
                        abilites_queue.Enqueue(ability);
                    }
                }
                if (hud != null)
                {
                    hud.PushSkill(ability.conf.axis, is_held);
                }
            }
        }