zoukankan      html  css  js  c++  java
  • Finger Gestures 3.1

    3.x自定义手势

    Finger Gestures用起来非常爽,除了有常用的手势之外,3.x的版本还增加了自定义手势!

    官方Document:http://fingergestures.fatalfrog.com/docs/start

    当然也可以参考它的Demo也可以看懂如何使用,分享一下我打包的版本

    APK:http://pan.baidu.com/s/1mgz8Ya0

    Windows_x86_x64:http://pan.baidu.com/s/1kTJTNMZ

    软件环境

    Finger Gestures 3.1

    Unity 4.3.x

    效果预览

    image

    image image

    手势功能

    记录一下学习笔记:

    1、新建一个场景,创建空的GameObject (FingerGestures),附加

    image

    2、创建新的GameObject(Gestures),附加

    image 

    TapDemo代码

    3、创建TapDemo.cs,附加到Gestures上

    using UnityEngine;
    using System.Collections;
    
    public class TabDemo : MonoBehaviour {
    
        // Use this for initialization
        void Start () {
        
        }
        
        // Update is called once per frame
        void Update () {
        
        }
    
        void OnTap(TapGesture gesture)
        {
    
            int taps = gesture.Taps;
            print("Tap gesture detected at: "+gesture.Position+"  It was sen by:"+gesture.Recognizer.name+" taps:"+taps);
        }
    }
    

    4、运行场景,双击鼠标,可以看到控制台输出

    image

    监听其它事件

    要是想要监听其它的事件,在第二步附加其它的监听器,打开Component——>FingerGEstures——>Gestures可以看到其它的监听器

    image

    当然有的事件需要添加

    image

  • 相关阅读:
    python -- twisted初探
    python -- redis连接与使用
    redis使用
    python -- 异步编程
    python
    python
    福大软工 · 最终作业
    福大软工 · 第十二次作业
    Beta 冲刺(7/7)
    Beta 冲刺(6/7)
  • 原文地址:https://www.cnblogs.com/zhaoqingqing/p/3603070.html
Copyright © 2011-2022 走看看