Ejemplo n.º 1
0
        private void ActOnTouch(float x, float y, TouchPhase phase)
        {
            if (player.lives <= 0 || ship.IsStopped())
            {
                return;
            }

            if (x > _camera.pixelWidth * 0.5f)
            {
                ApplyCurrentControlOption(y, phase);
            }
            else if (x < _camera.pixelWidth * 0.5f && y <= _camera.pixelHeight * 0.5f)
            {
                player.Shoot();
            }
            else if (x < _camera.pixelWidth * 0.5f && y > _camera.pixelHeight * 0.5f)
            {
                player.DashForward();
            }
        }