private void StanaloneGestureHandle() { ZoomHandle(); if (swipeConditions.Evaluate()) { SwipeHandle(); } }
private void OnCursorSelected(Vector3Int position) { if (canMoveConditions.Evaluate()) { Vector3Int selected = position; if (!ShouldHandleSelect(position)) { return; } agentBehaviorMaking.MakeDecision(); } }
private void OnOffEffect() { onClick?.Invoke(); if (switchConditions.Evaluate()) { if (!IsOn) { SwitchOn(); } else { SwitchOff(); } } }
private void Update() { if (selectConditions.Evaluate()) { try { Vector3 mousePos = CrossInput.Position; //#if UNITY_ANDROID && !UNITY_EDITOR // AndroidAdbLog.LogInfo(mousePos); // //AndroidAdbLog.LogInfo(Input.GetTouch(0).position); //#endif bool raycastHitted = Physics.Raycast( CameraRaycaster.ScreenPointToRay(mousePos), out RaycastHit hitInfo, CameraRaycaster.farClipPlane); if (raycastHitted) { SelectedPosition = MapIns.WorldToCell(hitInfo.point).ZToZero(); DetermineSelectedOnTower(); // DetermineSelectedOnRSS(hitInfo); selectedCallback?.Invoke(SelectedPosition); } } catch (System.Exception e) { //#if UNITY_ANDROID && !UNITY_EDITOR // AndroidAdbLog.LogInfo(e.ToString()); //#endif Debugger.Log(e.ToString()); Debugger.Log(Input.mousePosition); } } }
protected override void Update() { if (isOpened) { if (!isClosing) { if (selectCondition.Evaluate()) { RectTransformUtility.ScreenPointToLocalPointInRectangle (MiniMapImage, CrossInput.Position, null, out Vector2 local); SetNavigateIcon(local); } } else { closeCounter += Time.deltaTime; if (closeCounter >= delayCloseMiniMap) { Close(); } } } }