void Update() { if (Input.GetMouseButtonUp(0)) { if (Application.isEditor && Input.GetKeyUp(KeyCode.Alpha0)) { Cheat = !Cheat; } if (!HumanInput()) { return; } if (inFocus && !RC_Camera.CameraActionInProgress()) { Select(); } } }
public void OnPointerClick(PointerEventData eventData) { MDebug.Log(gameObject.name + " focus " + inFocus); if (Input.GetKeyUp(KeyCode.Alpha0)) { Cheat = !Cheat; } if (!HumanInput()) { return; } if (inFocus && !RC_Camera.HasBlockingAction()) { Select(); } else { MDebug.Log("asdsd"); } }
IEnumerator SelectionThread() { GameObject ActiveObject = LastTouchObject; while (Input.GetButton("Fire1")) { if (RC_Camera.HasBlockingAction()) { yield break; } if (Cast()) { LastTouchObject.SendMessage("TouchHold", LastHitPosition, SendMessageOptions.DontRequireReceiver); } ActiveObject = LastTouchObject; yield return(null); } if (RC_Camera.HasBlockingAction()) { yield break; } MDebug.Log("Selection Thread End"); if (ActiveObject != null) { MDebug.Log("Send Touchup to " + ActiveObject.name); ActiveObject.SendMessage("TouchUp", SendMessageOptions.DontRequireReceiver); } else { UnselectCurrent(); } }
/* Functions */ private void Awake() { instance = this; mJCSCamera = this.GetComponent <JCS_2DCamera>(); }