Exemplo n.º 1
0
    private void initGui()
    {
        if (KartUIPrefab != null)
        {
            kartUI = Instantiate(KartUIPrefab);

            if (kartUI != null && UseGUIControls)
            {
                kartUI.EnableMobileControls();
                kartUI.GoBtn.onButtonDown.AddListener(() =>
                {
                    powerInput = 1.0f;
                });
                kartUI.GoBtn.onButtonUp.AddListener(() =>
                {
                    powerInput = 0f;
                });
            }
        }
    }