public override void onReset() { LayoutTools.SCALE_WINDOW(mLeaveRoomButton, Vector2.one); LayoutTools.SCALE_WINDOW(mReadyButton, Vector2.one); LayoutTools.SCALE_WINDOW(mCancelReadyButton, Vector2.one); notifyReady(false); }
public void lerp(PropsItem curItem, PropsItem nextItem, float percent) { LayoutTools.MOVE_WINDOW(mProp, MathUtility.lerp(curItem.mOriginPosition, nextItem.mOriginPosition, percent)); LayoutTools.SCALE_WINDOW(mProp, MathUtility.lerp(curItem.mOriginScale, nextItem.mOriginScale, percent)); mProp.setDepth((int)MathUtility.lerp(curItem.mOriginPropDepth, nextItem.mOriginPropDepth, percent)); mBackground.setDepth((int)MathUtility.lerp(curItem.mOriginBackgroundDepth, nextItem.mOriginBackgroundDepth, percent)); mLabel.setDepth((int)MathUtility.lerp(curItem.mOriginLabelDepth, nextItem.mOriginLabelDepth, percent)); mIcon.setDepth((int)MathUtility.lerp(curItem.mOriginIconDepth, nextItem.mOriginIconDepth, percent)); }
public void onReset() { LayoutTools.MOVE_WINDOW(mRole, mStartPosition); LayoutTools.SCALE_WINDOW(mRole, Vector2.one); LayoutTools.ALPHA_WINDOW(mRole, 1.0f); LayoutTools.ACTIVE_WINDOW(mRole, false); mSelected = -1; mHideDone = true; }
protected void onTrackRootMoveEnd(ComponentKeyFrameBase component, object userData, bool breakTremling, bool done) { LayoutTools.ACTIVE_WINDOW(mLeftArrow); LayoutTools.ACTIVE_WINDOW(mRightArrow); LayoutTools.SCALE_WINDOW(mLeftArrow, new Vector2(0.7f, 0.7f), new Vector2(1.0f, 1.0f), 0.8f); LayoutTools.ALPHA_WINDOW(mLeftArrow, 0.3f, 1.0f, 0.8f); LayoutTools.SCALE_WINDOW(mRightArrow, new Vector2(0.7f, 0.7f), new Vector2(1.0f, 1.0f), 0.8f); LayoutTools.ALPHA_WINDOW(mRightArrow, 0.3f, 1.0f, 0.8f); }
public override void onShow(bool immediately, string param) { int count = mAction.Length; for (int i = 0; i < count; ++i) { LayoutTools.SCALE_WINDOW(mAction[i], Vector2.one); } }
public void lerp(TrackItem curItem, TrackItem nextItem, float percent) { LayoutTools.MOVE_WINDOW(mTrack, MathUtility.lerp(curItem.mOriginPosition, nextItem.mOriginPosition, percent)); LayoutTools.SCALE_WINDOW(mTrack, MathUtility.lerp(curItem.mOriginScale, nextItem.mOriginScale, percent)); mTrack.setDepth((int)MathUtility.lerp(curItem.mOriginTrackDepth, nextItem.mOriginTrackDepth, percent)); mChecked.setDepth((int)MathUtility.lerp(curItem.mOriginCheckedDepth, nextItem.mOriginCheckedDepth, percent)); mLabel.setDepth((int)MathUtility.lerp(curItem.mOriginLabelDepth, nextItem.mOriginLabelDepth, percent)); mTexture.setDepth((int)MathUtility.lerp(curItem.mOriginTextureDepth, nextItem.mOriginTextureDepth, percent)); }
public override void onReset() { LayoutTools.SCALE_WINDOW(mMailButton, Vector2.one); LayoutTools.SCALE_WINDOW(mCompetitionButton, Vector2.one); LayoutTools.SCALE_WINDOW(mShareButton, Vector2.one); LayoutTools.SCALE_WINDOW(mStandingButton, Vector2.one); LayoutTools.SCALE_WINDOW(mRuleButton, Vector2.one); LayoutTools.SCALE_WINDOW(mContactButton, Vector2.one); LayoutTools.SCALE_WINDOW(mRechargeButton, Vector2.one); LayoutTools.SCALE_WINDOW(mSettingButton, Vector2.one); LayoutTools.SCALE_WINDOW(mQuitButton, Vector2.one); }
//---------------------------------------------------------------------------------------------------------------------------------------------------------------- protected void arrowAnim(bool direction) { if (direction) { LayoutTools.SCALE_WINDOW(mLeftArrow, new Vector2(0.7f, 0.7f), new Vector2(1.0f, 1.0f), 0.8f); LayoutTools.ALPHA_WINDOW(mLeftArrow, 0.3f, 1.0f, 0.8f); } else { LayoutTools.SCALE_WINDOW(mRightArrow, new Vector2(0.7f, 0.7f), new Vector2(1.0f, 1.0f), 0.8f); LayoutTools.ALPHA_WINDOW(mRightArrow, 0.3f, 1.0f, 0.8f); } }
public override void onReset() { LayoutTools.SCALE_WINDOW(mContinueButton, Vector2.one); LayoutTools.SCALE_WINDOW(mReturnButton, Vector2.one); int charCount = mEndingCharacterList.Count; for (int i = 0; i < charCount; ++i) { mEndingCharacterList[i].onReset(); } int multipleCount = mMultipleList.Count; for (int i = 0; i < multipleCount; ++i) { mMultipleList[i].onReset(); } }
public void setAiming(Vector2 screenPos, float iconHeight, bool isAim) { LayoutTools.ACTIVE_WINDOW(mAiming, isAim); LayoutTools.ACTIVE_WINDOW(mGreenAimingAnim, !isAim); float heightScale = iconHeight / mOriginHeight; Vector2 scale = new Vector2(heightScale, heightScale); if (isAim) { mAiming.setLocalPosition(UnityUtility.screenPosToWindowPos(screenPos, mAiming.getParent(), true)); LayoutTools.SCALE_WINDOW(mAiming, scale); } else { mGreenAimingAnim.setLocalPosition(UnityUtility.screenPosToWindowPos(screenPos, mAiming.getParent(), true)); LayoutTools.SCALE_WINDOW(mGreenAimingAnim, scale); } }
public override void onHide(bool immediately, string param) { if (immediately) { LayoutTools.HIDE_LAYOUT_FORCE(mType); LayoutTools.SCALE_WINDOW(mLeftArrow, new Vector2(0.7f, 0.7f)); LayoutTools.ALPHA_WINDOW(mLeftArrow, 0.3f); LayoutTools.SCALE_WINDOW(mRightArrow, new Vector2(0.7f, 0.7f)); LayoutTools.ALPHA_WINDOW(mRightArrow, 0.3f); LayoutTools.ACTIVE_WINDOW(mLeftArrow, false); LayoutTools.ACTIVE_WINDOW(mRightArrow, false); LayoutTools.MOVE_WINDOW(mTrackRoot, mTrackRootStartPos); LayoutTools.ALPHA_WINDOW(mTrackRoot, 0.0f); } else { LayoutTools.SCALE_WINDOW(mLeftArrow, new Vector2(1.0f, 1.0f), new Vector2(0.3f, 0.3f), 0.25f); LayoutTools.ALPHA_WINDOW(mLeftArrow, 1.0f, 0.3f, 0.25f); LayoutTools.SCALE_WINDOW(mRightArrow, new Vector2(1.0f, 1.0f), new Vector2(0.3f, 0.3f), 0.25f); LayoutTools.ALPHA_WINDOW_EX(mRightArrow, 1.0f, 0.3f, 0.25f, onArrowEnd); } }
public void select(bool select, bool force = false) { int curSel = select ? 1 : 0; if (curSel == mSelected && !force) { return; } mSelected = curSel; // 只能在布局显示完毕后才能执行选中逻辑,否则会与显示逻辑发生冲突 if (mScript.isShowDone()) { if (mSelected == 1) { LayoutTools.ALPHA_WINDOW(mRole, 1.0f); LayoutTools.SCALE_WINDOW(mRole, mRole.getScale(), new Vector2(1.2f, 1.2f), 0.2f); } else { LayoutTools.ALPHA_WINDOW(mRole, 0.7f); LayoutTools.SCALE_WINDOW(mRole, Vector2.one); } } }
// 点击的一个效果 public void AClickEffect() { LayoutTools.SCALE_WINDOW(mKcal, new Vector2(0.85f, 0.85f), new Vector2(1.0f, 1.0f), 0.8f); }
//----------------------------------------------------------------------------------------------------------------------------------- protected void onPropsShow(object user_data, Command cmd) { LayoutTools.SCALE_WINDOW(mProp, new Vector2(0.3f, 0.3f), Vector2.one, 0.5f); LayoutTools.ALPHA_WINDOW(mProp, 0.3f, 1.0f, 0.5f); }
protected void onButtonPress(GameObject go, bool press) { txUIObject button = mLayout.getUIObject(go); LayoutTools.SCALE_WINDOW(button, button.getScale(), press ? new Vector2(1.2f, 1.2f) : Vector2.one, 0.2f); }
public override void onReset() { LayoutTools.SCALE_WINDOW(mCreateRoomButton, Vector2.one); LayoutTools.SCALE_WINDOW(mJoinRoomButton, Vector2.one); }
public override void onReset() { mMaxTime = 4.0f; LayoutTools.ACTIVE_WINDOW(mNumber, false); LayoutTools.SCALE_WINDOW(mNumber, Vector2.zero); }
public override void onGameState() { LayoutTools.ACTIVE_WINDOW(mConfirmTextRoot, false); LayoutTools.ALPHA_WINDOW(mConfirmSelectionRoot, 0.0f); LayoutTools.SCALE_WINDOW(mConfirmSelectionRoot, new Vector2(0.0f, 1.0f)); }
public override void onReset() { LayoutTools.SCALE_WINDOW(mJoinButton, Vector2.one); LayoutTools.SCALE_WINDOW(mCancelButton, Vector2.one); }
protected void onButtonPress(GameObject obj, bool press) { txUIObject window = mLayout.getUIObject(obj); LayoutTools.SCALE_WINDOW(window, window.getScale(), press ? new Vector2(1.2f, 1.2f) : Vector2.one, 0.2f); }
public override void onReset() { LayoutTools.SCALE_WINDOW(mLoginButton, Vector2.one); LayoutTools.SCALE_WINDOW(mRegisterButton, Vector2.one); LayoutTools.SCALE_WINDOW(mQuitButton, Vector2.one); }