// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.F1)) { myPlayerStore.DEBUGAddMoney(100); } if (Input.GetKey(KeyCode.F2)) { myPlayerStore.DEBUGSubtractMoney(100); } if (myKeyboardState == KEYBOARD_STATE.RALLEY) { RalleyPoint r = RalleyPointGO.GetComponent <Structure>().GetMyRalleyPoint(); r.EnableHelpfulInfo(); if (Input.GetButtonDown("Left Click")) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); //r.transform.position = Camera.main.ScreenToWorldPoint(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { r.transform.position = hit.point; myKeyboardState = KEYBOARD_STATE.NORMAL; RalleyPointGO = null; r.DisableHelpfulInfo(); return; } } } else { if (Input.GetButtonDown("Left Click")) { OnLeftClick(); } if (Input.GetButtonDown("Right Click")) { OnRightClick(); } } }