private void ClearFarmTouchInfo() { this.touchState.isDraged = false; this.touchState.state = InputControll.TouchStateType.NONE; this.rayHitObjectType = InputControll.TouchObjectType.NONE; this.rayHitColliderObject = null; this.touchBeginGrid = -1; this.touchStartRealTime = 0f; }
private void UpdateRaycastHit(List <Touch> touchList) { if (0 < touchList.Count) { Vector3 position = new Vector3(touchList[0].position.x, touchList[0].position.y, 0f); Ray ray = this.farmCamera.ScreenPointToRay(position); RaycastHit[] raycasts = Physics.RaycastAll(ray); InputControll.TouchObjectInfo touchObject = this.GetTouchObject(raycasts); if (this.rayHitObjectType == InputControll.TouchObjectType.NONE && touchObject.type != InputControll.TouchObjectType.NONE) { this.rayHitObjectType = touchObject.type; this.rayHitColliderObject = touchObject.transform.gameObject; } } }
public void Set(InputControll.TouchObjectType type, Transform transform, bool isInvalidCharaTap) { if (type == InputControll.TouchObjectType.CHARA) { if (!isInvalidCharaTap) { this.type = type; this.transform = transform; } } else { this.type = type; this.transform = transform; } }