コード例 #1
0
ファイル: TouchInput.cs プロジェクト: tng2903/game1
    void Start()
    {
        if (sceneControl == null && enablePinchToZoom)
        {
            if ((sceneControl = this.gameObject.GetComponent<SceneControl>()) == null)
            {
                Debug.LogError("Unable to find the SceneControl to use with the TouchInput");
                enablePinchToZoom = false;
            }
        }
        if (keyMouseInput == null)
        {
            if ((keyMouseInput = this.gameObject.GetComponent<KeyMouseInput>()) == null)
            {
                Debug.LogError("Unable to find the KeyMouseInput to use with the TouchInput");
            }
        }

        if (!Input.multiTouchEnabled)
        {
            enablePinchToZoom = false;
            enableMultiTouchSwipe = false;
        }
    }
コード例 #2
0
    void Start()
    {
        if (sceneControl == null && enablePinchToZoom)
        {
            if ((sceneControl = this.gameObject.GetComponent <SceneControl>()) == null)
            {
                Debug.LogError("Unable to find the SceneControl to use with the TouchInput");
                enablePinchToZoom = false;
            }
        }
        if (keyMouseInput == null)
        {
            if ((keyMouseInput = this.gameObject.GetComponent <KeyMouseInput>()) == null)
            {
                Debug.LogError("Unable to find the KeyMouseInput to use with the TouchInput");
            }
        }

        if (!Input.multiTouchEnabled)
        {
            enablePinchToZoom     = false;
            enableMultiTouchSwipe = false;
        }
    }