Exemple #1
0
    // Use this for initialization
    void Start()
    {
        resetRotation = new Quaternion(0, 0, 0, 0);
        CubeAnimation = GetComponent<Animation>();
        Mixer = GameObject.Find("Slider").GetComponent<ColourMixer>();
        MixerSlider = GameObject.Find("Slider").GetComponent<Slider>();

        touch = GetComponent<TouchGesture>();
        StartCoroutine(touch.CheckHorizontalSwipes(
            onLeftSwipe: () => { MoveLeft(); },
            onRightSwipe: () => { MoveRight(); }
            ));
        StartCoroutine(touch.CheckVerticalSwipes(
            onUpSwipe: () => { MoveUp(); },
            onDownSwipe: () => { MoveDown(); }
            ));
    }