protected override void applyScreenPosition(Vector3 screenPos) { txUIObject window = mComponentOwner as txUIObject; window.setLocalPosition(UnityUtility.screenPosToWindowPos(screenPos, window.getParent()) - new Vector2(Screen.currentResolution.width / 2.0f, Screen.currentResolution.height / 2.0f)); }
protected override void applyScreenPosition(Vector3 screenPos) { txUIObject window = mComponentOwner as txUIObject; Vector2 rootSize = WidgetUtility.getRootSize(); window.setLocalPosition(UnityUtility.screenPosToWindowPos(screenPos, window.getParent()) - rootSize / 2); }
protected override void applyTrembling(float value) { txUIObject uiObj = mComponentOwner as txUIObject; Vector3 curPos = mStartPos + (mTargetPos - mStartPos) * value; uiObj.setLocalPosition(curPos); }
protected override void applyMove(Vector3 position, bool done = false) { txUIObject window = mComponentOwner as txUIObject; window.setLocalPosition(position); }