// Update is called once per frame void Update() { transform.Rotate(0, Input.GetAxis("Horizontal") * rotateSpeed, 0); Vector3 forward = transform.TransformDirection(Vector3.forward); float _curSpeed = speed * Input.GetAxis("Vertical"); controller.SimpleMove(forward * _curSpeed); if (Input.GetKeyDown(KeyCode.Space)) { magicManager.TestShootMagic(createPoint); } if (Input.GetKeyDown(KeyCode.Z)) { magicManager.ActMagic("FireBall", 1.5f, createPoint); } if (Input.GetKeyDown(KeyCode.X)) { magicManager.ActMagic("IceSpear", 1.5f, createPoint); } if (Input.GetKeyDown(KeyCode.C)) { magicManager.ActMagic("thunder_ver2", 1.5f, createPoint); } if (Input.GetKeyDown(KeyCode.V)) { magicManager.ActMagic("HEART", 1.5f, createPoint); } if (Input.GetKeyDown(KeyCode.B)) { magicManager.ActMagic("Shield2", 1.5f, createPoint); } }
// Handling developer defined gesture match callback - This is invoked when the Mode is set to Mode.DeveloperDefined and a gesture is recorded. // gestureId - a serial number // gesture - gesture matched or null if no match. Only guesture in SetDeveloperDefinedTarget range will be verified against // score - the confidence level of this identification. Above 1 is generally considered a match void HandleOnDeveloperDefinedMatch(long gestureId, string gesture, float score) // 이 함수를 핸들러로 등록해서 패턴이 매치 되었을 때 원하는 코드를 실행할 수 있다. { if (!GameManager.Instance.IsLockMagic) { magicManager.ActMagic(gesture.Trim(), score, viveInputManager.VisionPoint); } }