public Form1() { InitializeComponent(); oCamera = new InventorCamera(); controller = new Controller(); InitializeTexBox(); AddToLog("Component initialization."); Thread.Sleep(100); // wait for connection if (controller.Devices.IsEmpty) { AddToLog("ERROR: No connection to Leap Motion service."); AddToLog("ERROR: Connect device and restart application."); return; } else { AddToLog("Connected to Leap Motion service."); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); listener = new LeapEventListener(this); controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES); controller.AddListener(listener); } if (!oCamera.IsStarted()) AddToLog("ERROR: Inventor instance not found."); else AddToLog("Iventor instance found. "); if (!oCamera.IsOpened()) AddToLog("ERROR: Assembly, part or presentation document not found."); else AddToLog(oCamera.GetDocType() + " document found."); }
public override void OnConnect(Controller 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); }
// Use this for initialization void Start() { leapController = new Leap.Controller(); leapController.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE, true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE, true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP, true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP, true); }
public override void OnInit(Controller controller) { controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); controller.SetPolicyFlags(Controller.PolicyFlag.POLICYBACKGROUNDFRAMES); }
public override void OnConnect(Controller controller) { SafeWriteLine("Leap 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); }
public override void OnConnect(Controller controller) { SafeWriteLine("Connected"); controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); //controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); }
// Use this for initialization void Start() { controller = new Controller(); controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Gesture.GestureType.TYPEINVALID); controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); }
public override void OnConnect(Controller controller) { _LogAction("Connected"); controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); //controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP); //controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); _LogAction("Gesures Enabled"); }
// Use this for initialization void Start() { leapController = new Leap.Controller(); anim = GetComponent <Animator>(); leapController.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE, true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE, true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP, true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP, true); }
public override void OnConnect(Controller controller) { Log("Leap Connected"); // Enable gestures as appropriate controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); }
public override void OnConnect(Controller controller) { controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_IMAGES); //enable all four types of gestures controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP); controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP); controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); this.eventDelegate.LeapEventNotification("onConnect"); }
// Use this for initialization void Start() { print("Inizializzo controller"); listener = new Leap.Listener(); controller = new Leap.Controller(); controller.AddListener(listener); controller.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE); hasPaused=false; }
// Use this for initialization void Start() { print("Inizializzo controller"); listener = new Leap.Listener(); controller = new Leap.Controller(); controller.AddListener(listener); controller.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE); hasPaused = false; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here currentState = StateMachine.Instance; currentState.state = StateMachine.ScreenState.GAME_MENU; StateMachine.Instance.resWidth = graphics.GraphicsDevice.Viewport.Width; StateMachine.Instance.resHeight = graphics.GraphicsDevice.Viewport.Height; leapController = new Controller(); listener = new SingleListener(); leapController.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); leapController.EnableGesture(Gesture.GestureType.TYPESCREENTAP); leapController.AddListener(listener); base.Initialize(); }
// Use this for initialization void Start() { audioSource = GameObject.FindWithTag("SFX_Source").GetComponent <AudioSource>(); levelHandler = FindObjectOfType <LevelHandler>(); UpdateAmmoText(); aim = GetComponent <Aim>().transform; controller = new Controller(); controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); controller.Config.SetFloat("Gesture.Circle.MinRadius", 50.0f); controller.Config.Save(); length = 15f; canFire = false; currentHand = right ? 0 : 1; }
// Use this for initialization void Start() { audioSource = GameObject.FindWithTag("SFX_Source").GetComponent<AudioSource>(); levelHandler = FindObjectOfType<LevelHandler>(); UpdateAmmoText(); aim = GetComponent<Aim>().transform; controller = new Controller(); controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); controller.Config.SetFloat("Gesture.Circle.MinRadius", 50.0f); controller.Config.Save(); length = 15f; canFire = false; currentHand = right ? 0 : 1; }
// Use this for initialization void Start() { //enable gestures you need to use here controller = new Controller(); controller.EnableGesture(Gesture.GestureType.TYPESWIPE); //controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); }
public override void OnConnect(Controller leapController) { leapController.Config.SetFloat("Gesture.Swipe.MinLength", 10); leapController.Config.SetFloat("Gesture.Swipe.MinVelocity", 100); leapController.Config.Save(); leapController.EnableGesture(Gesture.GestureType.TYPESWIPE); }
// Use this for initialization void Start() { print("Inizializzo controller"); listener = new Leap.Listener(); controller = new Leap.Controller(); controller.AddListener(listener); controller.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE); controller.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP); controller.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP); controller.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE); mustPause=false; temp=0.0f; scratch=false; audio.pitch=1.0f; counter=0; }
// Use this for initialization void Start() { _currentSphereSpawnTime = MinSphereSpawnDeltaTime; foreach (var enumValue in Enum.GetValues(typeof(Gesture.GestureType))) { LeapController.EnableGesture((Gesture.GestureType)enumValue); } }
public override void OnConnect(Controller controller) { controller.SetPolicy(Controller.PolicyFlag.POLICY_IMAGES); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP); controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP); controller.Config.SetFloat("Gesture.ScreenTap.MinForwardVelocity", 30.0f); controller.Config.SetFloat("Gesture.ScreenTap.HistorySeconds", .5f); controller.Config.SetFloat("Gesture.ScreenTap.MinDistance", 1.0f); controller.Config.SetFloat("Gesture.Circle.MinRadius", 10.0f); controller.Config.SetFloat("Gesture.Circle.MinArc", .5f); controller.Config.SetFloat("Gesture.KeyTap.MinDownVelocity", 40.0f); controller.Config.SetFloat("Gesture.KeyTap.HistorySeconds", .2f); controller.Config.SetFloat("Gesture.KeyTap.MinDistance", 1.0f); controller.Config.Save(); this.eventDelegate.LeapEventNotification("onConnect"); }
// Use this for initialization void Start() { if (controller == null) { controller = GameObject.Find("HandController").GetComponent <HandController>(); } player = GameObject.FindGameObjectWithTag("Player"); //start to track swipe gesture _controller = controller.GetLeapController(); if (gestureOption == 1) { _controller.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE); } monsterLayerID = LayerMask.NameToLayer(monsterLayerName); }
public override void OnConnect(Controller controller) { //EnableGesture controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP); controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP); //Gesture settings // //controller.Config.SetFloat("Gesture.Circle.MinRadius", 10.0f); //controller.Config.SetFloat("Gesture.Circle.MinArc", .5f); //controller.Config.SetFloat("Gesture.ScreenTap.MinForwardVelocity", 30.0f); //controller.Config.SetFloat("Gesture.ScreenTap.HistorySeconds", .5f); //controller.Config.SetFloat("Gesture.ScreenTap.MinDistance", 1.0f); //controller.Config.SetFloat("Gesture.KeyTap.MinDownVelocity", 40.0f); //controller.Config.SetFloat("Gesture.KeyTap.HistorySeconds", .2f); //controller.Config.SetFloat("Gesture.KeyTap.MinDistance", 1.0f); controller.Config.SetFloat("Gesture.Swipe.MinLength", 200.0f); controller.Config.SetFloat("Gesture.Swipe.MinVelocity", 750f); //Save settings controller.Config.Save(); }
public override void OnConnect(Controller controller) { SafeWriteLine("Connected"); // enable gesture recognition for screen locking controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); //controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP); //controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP); //controller.EnableGesture(Gesture.GestureType.TYPESWIPE); controller.SetPolicyFlags(Controller.PolicyFlag.POLICYBACKGROUNDFRAMES); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here leapController = new Controller(); leapListener = new SingleListener(); leapController.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); leapController.AddListener(leapListener); //initialize vector objectVector = new double[_board.Length]; //objectVector[0] = 9999; dnn = new ProgramDNN(); label = 1; base.Initialize(); }
// Use this for initialization void Start() { leapController = new Leap.Controller(); leapController.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE,true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE,true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP,true); leapController.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP,true); }
void Start() { try { leapController = new Leap.Controller(); // if(leapController.Devices.Count == 0) // throw new Exception("Please connect the LeapMotion sensor!"); leapController.EnableGesture(Gesture.GestureType.TYPECIRCLE); leapController.EnableGesture(Gesture.GestureType.TYPEKEYTAP); leapController.EnableGesture(Gesture.GestureType.TYPESCREENTAP); leapController.EnableGesture(Gesture.GestureType.TYPESWIPE); // add the extra gestures to detect, if any foreach(LeapExtraGestures.ExtraGestures gesture in ExtraGestures) { DetectGesture(gesture); } // load cursor textures once normalHandTexture = (Texture)Resources.Load("NormalCursor"); touchHandTexture = (Texture)Resources.Load("TouchCursor"); selectHandTexture = (Texture)Resources.Load("SelectCursor"); instance = this; leapInitialized = true; DontDestroyOnLoad(gameObject); // show the ready-message string sMessage = leapController.Devices.Count > 0 ? "Ready." : "Please make sure the Leap-sensor is connected."; Debug.Log(sMessage); if(debugText != null) debugText.guiText.text = sMessage; } catch(System.TypeInitializationException ex) { Debug.LogError(ex.ToString()); if(debugText != null) debugText.guiText.text = "Please check the LeapMotion installation."; } catch (System.Exception ex) { Debug.LogError(ex.ToString()); if(debugText != null) debugText.guiText.text = ex.Message; } }
private void Start() { _leap = new Controller(); if (transform == null) { Debug.LogError("Must have a parent object to control"); } _originCamPosition = Camera.main.transform.position; _resetTimer = Camera.main.GetComponent<RestartSceneAfterTimeout>(); _leap.EnableGesture(Gesture.GestureType.TYPECIRCLE); _leap.EnableGesture(Gesture.GestureType.TYPESCREENTAP); _pointerZOffset = pointer.transform.position.z; _pointer = Instantiate(pointer, pointer.transform.position, pointer.transform.rotation) as GameObject; _registerdCircleHandler = new List<Action<Gesture>> { HandleCircleGestureForTurnables, HandleCircleGestureForViewChange }; }
public override void OnConnect(Controller controller) { controller.SetPolicy(Controller.PolicyFlag.POLICY_IMAGES); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP); controller.Config.SetFloat("Gesture.Swipe.minVelocity", 750f); this.eventDelegate.LeapEventNotification("onConnect"); }
public override void OnConnect(Controller controller) { SafeWriteLine("Connected"); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); }
public override void OnConnect(Controller controller) { controller.SetPolicy(Controller.PolicyFlag.POLICY_IMAGES); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); this.eventDelegate.LeapEventNotification("onConnect"); }
void Start() { try { leapController = new Leap.Controller(); // if(leapController.Devices.Count == 0) // throw new Exception("Please connect the LeapMotion sensor!"); leapController.EnableGesture(Gesture.GestureType.TYPECIRCLE); leapController.EnableGesture(Gesture.GestureType.TYPEKEYTAP); leapController.EnableGesture(Gesture.GestureType.TYPESCREENTAP); leapController.EnableGesture(Gesture.GestureType.TYPESWIPE); instance = this; leapInitialized = true; DontDestroyOnLoad(gameObject); if(DebugCamera) { DontDestroyOnLoad(DebugCamera.gameObject); } // show the ready-message string sMessage = leapController.Devices.Count > 0 ? "Ready." : "Please make sure the Leap-sensor is connected."; Debug.Log(sMessage); // if(debugText != null) // debugText.guiText.text = sMessage; } catch(System.TypeInitializationException ex) { Debug.LogError(ex.ToString()); if(debugText != null) debugText.guiText.text = "Please check the LeapMotion installation."; } catch (System.Exception ex) { Debug.LogError(ex.ToString()); if(debugText != null) debugText.guiText.text = ex.Message; } }
// Use this for initialization void Start() { TotalScore = long.Parse(PlayerPrefs.GetString("ScoreCount")); MaxCombo = PlayerPrefs.GetInt("ComboCount"); PerfectCount = PlayerPrefs.GetInt("PerfectCount"); GoodCount = PlayerPrefs.GetInt("GoodCount"); BadCount = PlayerPrefs.GetInt("BadCount"); MissCount = PlayerPrefs.GetInt("MissCount"); Judgement.text = PlayerPrefs.GetString("Judgement"); if (Judgement.text == "A") { Judgement.color = new Color(58 / 255f, 183 / 255f, 239 / 255f); } else if (Judgement.text == "B") { Judgement.color = new Color(191 / 255f, 255 / 255f, 160 / 255f); } else if (Judgement.text == "C") { Judgement.color = new Color(251 / 255f, 208 / 255f, 114 / 255f); } else if (Judgement.text == "D") { Judgement.color = new Color(249 / 255f, 90 / 255f, 101 / 255f); } ScoreNow = ComboNow = PerfectNow = GoodNow = BadNow = MissNow = 0; ShowUI = false; CoverColor = new Color(BigCover.color.r, BigCover.color.g, BigCover.color.b, 1); RetryButton.onClick.AddListener(Retry); BackButton.onClick.AddListener(Back); ScoreLabel.fontSize = ComboLabel.fontSize = PerfectLabel.fontSize = GoodLabel.fontSize = BadLabel.fontSize = MissLabel.fontSize = ScoreText.fontSize = ComboText.fontSize = PerfectText.fontSize = GoodText.fontSize = BadText.fontSize = MissText.fontSize = (int)(Screen.width / 22.5f); Judgement.fontSize = (int)(Screen.width * 0.35f); RetryButtonText.fontSize = BackButtonText.fontSize = (int)(Screen.width / 50f); float pos_x = -Screen.width / 3f, pos_y = Screen.height / 40f, pos_xx = pos_x + Screen.width / 4.5f; ScoreLabel.rectTransform.anchoredPosition = new Vector2(pos_x, pos_y * 13); ComboLabel.rectTransform.anchoredPosition = new Vector2(pos_x, pos_y * 9); PerfectLabel.rectTransform.anchoredPosition = new Vector2(pos_x, pos_y * 3); GoodLabel.rectTransform.anchoredPosition = new Vector2(pos_x, -pos_y * 1); BadLabel.rectTransform.anchoredPosition = new Vector2(pos_x, -pos_y * 5); MissLabel.rectTransform.anchoredPosition = new Vector2(pos_x, -pos_y * 9); ScoreText.rectTransform.anchoredPosition = new Vector2(pos_xx, pos_y * 13); ComboText.rectTransform.anchoredPosition = new Vector2(pos_xx, pos_y * 9); PerfectText.rectTransform.anchoredPosition = new Vector2(pos_xx, pos_y * 3); GoodText.rectTransform.anchoredPosition = new Vector2(pos_xx, -pos_y * 1); BadText.rectTransform.anchoredPosition = new Vector2(pos_xx, -pos_y * 5); MissText.rectTransform.anchoredPosition = new Vector2(pos_xx, -pos_y * 9); Judgement.rectTransform.anchoredPosition = new Vector2(Screen.width / 4f, Screen.height / 10f); RetryButton.image.rectTransform.anchoredPosition = new Vector2(Screen.width / 4f - Screen.width / 15f, -pos_y * 10f); BackButton.image.rectTransform.anchoredPosition = new Vector2(Screen.width / 4f + Screen.width / 15f, -pos_y * 10f); RetryButton.image.rectTransform.sizeDelta = BackButton.image.rectTransform.sizeDelta = new Vector2(Screen.width / 10f, Screen.width / 10f / 2.75f); SmallCover.rectTransform.sizeDelta = new Vector2(Screen.width * 0.8f, Screen.height); Timer = 10f; leap = new Leap.Controller(); leap.EnableGesture(Leap.Gesture.GestureType.TYPE_SWIPE); //leap.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f); //leap.Config.SetFloat ("Gesture.Swipe.MinVelocity", 1050f); //leap.Config.Save (); /*TotalScore = 1000000; * MaxCombo = 512; * PerfectCount = 500; * GoodCount = 200; * BadCount = 10; * MissCount = 5; * Judgement.text = "S";*/ }
// Use this for initialization void Start() { controller = new Controller(); controller.EnableGesture (Gesture.GestureType.TYPE_SWIPE); }
public override void OnConnect(Controller controller) { Console.WriteLine("Connected to leap device"); controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE); controller.EnableGesture(Gesture.GestureType.TYPECIRCLE); }
public override void OnInit(Controller cntrlr) { //Console.WriteLine("Initialized"); cntrlr.EnableGesture(Gesture.GestureType.TYPESWIPE); if (cntrlr.Config.SetFloat("Gesture.Swipe.MinLength", 90) && // default is 150 cntrlr.Config.SetFloat("Gesture.Swipe.MinVelocity", 200)) // default is 1000 cntrlr.Config.Save(); }
// Use this for initialization void Start() { TotalScore = long.Parse (PlayerPrefs.GetString ("ScoreCount")); MaxCombo = PlayerPrefs.GetInt ("ComboCount"); PerfectCount = PlayerPrefs.GetInt ("PerfectCount"); GoodCount = PlayerPrefs.GetInt ("GoodCount"); BadCount = PlayerPrefs.GetInt ("BadCount"); MissCount = PlayerPrefs.GetInt ("MissCount"); Judgement.text = PlayerPrefs.GetString ("Judgement"); if (Judgement.text == "A") Judgement.color = new Color (58 / 255f, 183 / 255f, 239 / 255f); else if (Judgement.text == "B") Judgement.color = new Color (191 / 255f, 255 / 255f, 160 / 255f); else if (Judgement.text == "C") Judgement.color = new Color (251 / 255f, 208 / 255f, 114 / 255f); else if (Judgement.text == "D") Judgement.color = new Color (249 / 255f, 90 / 255f, 101 / 255f); ScoreNow = ComboNow = PerfectNow = GoodNow = BadNow = MissNow = 0; ShowUI = false; CoverColor = new Color (BigCover.color.r, BigCover.color.g, BigCover.color.b, 1); RetryButton.onClick.AddListener (Retry); BackButton.onClick.AddListener (Back); ScoreLabel.fontSize = ComboLabel.fontSize = PerfectLabel.fontSize = GoodLabel.fontSize = BadLabel.fontSize = MissLabel.fontSize = ScoreText.fontSize = ComboText.fontSize = PerfectText.fontSize = GoodText.fontSize = BadText.fontSize = MissText.fontSize = (int)(Screen.width / 22.5f); Judgement.fontSize = (int)(Screen.width * 0.35f); RetryButtonText.fontSize = BackButtonText.fontSize = (int)(Screen.width / 50f); float pos_x = -Screen.width / 3f, pos_y = Screen.height / 40f, pos_xx = pos_x + Screen.width / 4.5f; ScoreLabel.rectTransform.anchoredPosition = new Vector2 (pos_x, pos_y * 13); ComboLabel.rectTransform.anchoredPosition = new Vector2 (pos_x, pos_y * 9); PerfectLabel.rectTransform.anchoredPosition = new Vector2 (pos_x, pos_y * 3); GoodLabel.rectTransform.anchoredPosition = new Vector2 (pos_x, -pos_y * 1); BadLabel.rectTransform.anchoredPosition = new Vector2 (pos_x, -pos_y * 5); MissLabel.rectTransform.anchoredPosition = new Vector2 (pos_x, -pos_y * 9); ScoreText.rectTransform.anchoredPosition = new Vector2 (pos_xx, pos_y * 13); ComboText.rectTransform.anchoredPosition = new Vector2 (pos_xx, pos_y * 9); PerfectText.rectTransform.anchoredPosition = new Vector2 (pos_xx, pos_y * 3); GoodText.rectTransform.anchoredPosition = new Vector2 (pos_xx, -pos_y * 1); BadText.rectTransform.anchoredPosition = new Vector2 (pos_xx, -pos_y * 5); MissText.rectTransform.anchoredPosition = new Vector2 (pos_xx, -pos_y * 9); Judgement.rectTransform.anchoredPosition = new Vector2 (Screen.width / 4f, Screen.height / 10f); RetryButton.image.rectTransform.anchoredPosition = new Vector2 (Screen.width / 4f - Screen.width / 15f, -pos_y * 10f); BackButton.image.rectTransform.anchoredPosition = new Vector2 (Screen.width / 4f + Screen.width / 15f, -pos_y * 10f); RetryButton.image.rectTransform.sizeDelta = BackButton.image.rectTransform.sizeDelta = new Vector2 (Screen.width / 10f, Screen.width / 10f / 2.75f); SmallCover.rectTransform.sizeDelta = new Vector2 (Screen.width * 0.8f, Screen.height); Timer = 10f; leap = new Leap.Controller (); leap.EnableGesture (Leap.Gesture.GestureType.TYPE_SWIPE); //leap.Config.SetFloat ("Gesture.Swipe.MinLength", 200.0f); //leap.Config.SetFloat ("Gesture.Swipe.MinVelocity", 1050f); //leap.Config.Save (); /*TotalScore = 1000000; MaxCombo = 512; PerfectCount = 500; GoodCount = 200; BadCount = 10; MissCount = 5; Judgement.text = "S";*/ }