Beispiel #1
0
    protected override void SelectInputType()
    {
        // [DGT]
        // First, look for Control Freak 2 rig with UFE Bridge component...

        InputTouchControllerBridge bridge =
            GameObject.FindObjectOfType <InputTouchControllerBridge>();

        if (bridge != null)
        {
            this.InitializeTouchControllerBridge(bridge);
            return;
        }

        // Then, look for Control Freak 1.x controller...

        else
        {
            Type type = UFE.SearchClass("TouchController");
            UnityEngine.Object touchController = null;

            if ((type != null) && ((touchController = GameObject.FindObjectOfType(type)) != null))
            {
                this.InitializeControlFreakTouchController(touchController);
                return;
            }
        }

        // If nothing found, use standard Input...

        base.SelectInputType();
    }
Beispiel #2
0
    // [DGT]
    // Init Control Freak 2 bridge.

    protected void InitializeTouchControllerBridge(InputTouchControllerBridge bridge)
    {
        this.touchControllerBridge = bridge;
        this.touchControllerBridge.Init();

        this.touchControllerBridge.ShowBattleControls(false, false);                            //  Start with battle controls hidden.

        this.getAxis    = this.touchControllerBridge.GetAxis;
        this.getAxisRaw = this.touchControllerBridge.GetAxisRaw;
        this.getButton  = this.touchControllerBridge.GetButton;
    }