本文整理汇总了C#中Controller.EnableGesture方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.EnableGesture方法的具体用法?C# Controller.EnableGesture怎么用?C# Controller.EnableGesture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller.EnableGesture方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start () {
controller = new Controller();
controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
}
示例2: Start
void Start()
{
controller = new Controller ();
controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE);
controller.EnableGesture (Gesture.GestureType.TYPE_SCREEN_TAP);
//for swipe
controller.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f);
controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", 750f);
//for circle
controller.Config.SetFloat ("Gesture.Circle.MinRadius", 80.0f);
controller.Config.SetFloat ("Gesture.Circle.MinArc", 1.8f);
//for screen tap
controller.Config.SetFloat ("Gesture.ScreenTap.MinForwardVelocity", 1.0f);
controller.Config.SetFloat ("Gesture.ScreenTap.HistorySeconds", .05f);
controller.Config.SetFloat ("Gesture.ScreenTap.MinDistance", 1.0f);
controller.Config.Save ();
timeLimit = 5.0f;
timer = 0.0f;
p = GameObject.Find ("ps").GetComponent<ParticleSystem> ();
before = GameObject.Find ("before").GetComponent<SpriteRenderer> ();
after = GameObject.Find ("after").GetComponent<SpriteRenderer> ();
after.color = new Color (255, 255, 255, 0);
p.Pause ();
}
示例3: Start
// Use this for initialization
void Start()
{
Debug.Log("Start");
controller = new Controller();
if (!controller.IsGestureEnabled(Gesture.GestureType.TYPE_SWIPE))
{
Debug.Log("Enabled swipe");
// controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
}
if (!controller.IsGestureEnabled(Gesture.GestureType.TYPE_SCREEN_TAP))
{
Debug.Log("Enabled screen tap");
controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
}
if (!controller.IsGestureEnabled(Gesture.GestureType.TYPE_KEY_TAP))
{
Debug.Log("Enabled key tap");
controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
}
button = GameObject.Find("Button");
//button = FindObjectOfType();
buttonPos = button.transform.position.normalized;
Debug.Log(System.String.Format("Button pos: {0}", buttonPos.ToString()));
// buttonPos = new Vector(position.x, position.y, position.z);
}
示例4: OnConnect
public override void OnConnect(Controller controller)
{
SafeWriteLine("Connected");
controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
}
示例5: Start
private void Start(){
controller = new Controller ();
controller.EnableGesture (Gesture.GestureType.TYPECIRCLE);
controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
lastClientScale = transform.localScale;
serverCurrentScale = lastClientScale;
}
示例6: Start
// Use this for initialization
void Start()
{
state = RotationState.stay;
controller = new Controller();
controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
controller.Config.SetFloat("Gesture.Swipe.MinVelocity", 750f);
controller.Config.Save();
cooldown = 0;
}
示例7: Start
void Start ()
{
leftHandPrev = new Leap.Vector (0, 0, 0);
rightHandPrev = new Leap.Vector (0, 0, 0);
leftDirPrev = new Leap.Vector (0, 0, 0);
rightDirPrev = new Leap.Vector (0, 0, 0);
leftHand = new Hand ();
rightHand = new Hand ();
controller = new Controller();
panEnabled = true;
controller.EnableGesture (Gesture.GestureType.TYPECIRCLE);
controller.EnableGesture (Gesture.GestureType.TYPESWIPE);
controller.EnableGesture (Gesture.GestureType.TYPEKEYTAP);
controller.EnableGesture (Gesture.GestureType.TYPESCREENTAP);
}
示例8: Start
// Use this for initialization
void Start()
{
player = GameObject.Find ("Player");
controller = new Controller();
controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE);
controller.EnableGesture (Gesture.GestureType.TYPE_KEY_TAP);
controller.EnableGesture (Gesture.GestureType.TYPE_SCREEN_TAP);
controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
controller.EnableGesture (Gesture.GestureType.TYPE_INVALID);
controller.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f);
controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", 750f);
controller.Config.Save();
}
示例9: Start
//public GameObject pointingLGo;
void Start ()
{
controller = new Controller();
// Set circle gesture
controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
controller.Config.SetFloat("Gesture.Circle.MinRadius", circleGestureTreshold);
//controller.Config.SetFloat("Gesture.Circle.MinVelocity", 500f);
// Set ScreenTap gesture
controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
controller.Config.SetFloat("Gesture.ScreenTap.MinForwardVelocity", screenTapGestureTreshold);
controller.Config.SetFloat("Gesture.ScreenTap.HistorySeconds", .5f);
controller.Config.SetFloat("Gesture.ScreenTap.MinDistance", 1.0f);
controller.Config.Save();
}
示例10: ActiveCircleGestture
private void ActiveCircleGestture(Controller controller)
{
controller.EnableGesture (Gesture.GestureType.TYPE_CIRCLE);
controller.Config.SetFloat ("Gesture.Circle.MinRadius", circleMinRadius);
controller.Config.SetFloat ("Gesture.Circle.MinArc", circleMinArc);
controller.Config.Save ();
}
示例11: ActiveSwipeGesture
private void ActiveSwipeGesture(Controller controller)
{
controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE);
controller.Config.SetFloat ("Gesture.Swipe.MinLength", swipeMinLength);
controller.Config.SetFloat ("Gesture.Swipe.MinVelocity", swipeMinVelocity);
controller.Config.Save ();
}
示例12: Start
// Use this for initialization
void Start () {
cube = GameObject.Find("Cube");
box = GameObject.Find("Box");
objects = GameObject.Find("Objects");
sphere = GameObject.Find("Sphere");
handController = GameObject.Find("HandController");
controller = new Controller();
controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
controller.Config.SetFloat("Gesture.KeyTap.MinDownVelocity", 20.0f);
controller.Config.SetFloat("Gesture.KeyTap.HistorySeconds", 0.2f);
controller.Config.SetFloat("Gesture.KeyTap.MinDistance", 1.6f);
/*
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
for (int k = 0; k <4; k++)
{
SpawnObject(1, (i + 1) * 0.6f - 1.5f, (j + 1) * 0.6f - 1.5f, (k + 1) * 0.6f - 1.5f);
}
}
}
*/
}
示例13: Start
// Use this for initialization
void Start()
{
controller = new Controller();
controller.EnableGesture(Leap.Gesture.GestureType.TYPE_SWIPE);
controller.Config.SetFloat("Gesture.Swipe.MinLength", 200.0f);
controller.Config.SetFloat("Gesture.Swipe.MinVelocity", 750f);
controller.Config.Save();
}
示例14: LeapMotionGestureControl
public LeapMotionGestureControl()
{
// Set up listener and controller
listener = new LeapMotionGestureControlListener();
controller = new Controller();
// Allow background frames, otherwise.. well, it's useless
controller.SetPolicy(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES);
// Watch for circles
controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
// Add on the listener
controller.AddListener(listener);
}
示例15: Start
void Start()
{
controller = new Controller();
controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
controller.Config.SetFloat("Gesture.Swipe.MinLength", minimumSwipeLength);
controller.Config.SetFloat("Gesture.Swipe.MinVelocity", minimumSwipeVelocity);
controller.Config.Save();
}