private void UpdateDetect() { if (!_game.gameSkill.IsSelecting()) { _state = STATE.IDLE; return; } if (_mouseControl.state == MouseControl.STATE.DRAGGING || _mouseControl.state == MouseControl.STATE.EASING) { _state = STATE.IDLE; return; } if (_mouseStatus.GetMouseJustUp()) { Vector3 mousePosition = _game.mouseStatus.GetMouseJustUpPos(); bool cast = MouseStatus.UnprojectMousePosition(out _worldPosition, mousePosition); if (cast) { CreateAnimation(mousePosition); //TODO create target area CreateTargetArea(); _game.gameSkill.Use(); _state = STATE.ANIMATION; return; } } }
private void UpdateHolding() { Vector3 deltaTotalMove = _mouseStatus.GetMousePos() - _touchBeganPos; if (Mathf.Abs(deltaTotalMove.x) > 5.0f) { _state = STATE.DRAGGING; return; } if (_mouseStatus.GetMouseJustUp(MouseStatus.KEY.LEFT)) { _touchEndTime = TimeHelper.GetCurrentRealTimestamp(); _touchEndPos = _mouseStatus.GetMousePos(); _state = STATE.IDLE; return; } }