public virtual bool Init(BaseShutter.ShutterMode iMode) { this._uiTop.get_transform().set_localPosition(this._vTopPos[(int)iMode]); this._uiBtm.get_transform().set_localPosition(this._vBtnPos[(int)iMode]); this._iShutterMode = iMode; return(true); }
public virtual void ReqMode(BaseShutter.ShutterMode iMode, Action callback) { if (iMode == BaseShutter.ShutterMode.None) { return; } if (this._iShutterMode == iMode) { return; } this._actCallback = callback; if (!this._isTween) { if (iMode == BaseShutter.ShutterMode.Close) { SoundUtils.PlaySE(SEFIleInfos.SE_921); } Hashtable hashtable = new Hashtable(); hashtable.Add("time", 0.25f); hashtable.Add("isLocal", true); hashtable.Add("easetype", iTween.EaseType.easeOutBounce); hashtable.Add("oncompletetarget", base.get_gameObject()); hashtable.Add("oncomplete", "OnShutterActionComplate"); hashtable.Add("position", this._vTopPos[(int)iMode]); iTween.MoveTo(this._uiTop.get_gameObject(), hashtable); hashtable.Remove("position"); hashtable.Remove("oncompletetarget"); hashtable.Remove("oncomplete"); hashtable.Add("position", this._vBtnPos[(int)iMode]); iTween.MoveTo(this._uiBtm.get_gameObject(), hashtable); } this._iShutterMode = iMode; }
protected virtual void Awake() { if (this._uiPanel == null) { this._uiPanel = base.GetComponent <UIPanel>(); } if (this._traShutter == null) { Util.FindParentToChild <Transform>(ref this._traShutter, this._uiPanel.get_transform(), "Shutter"); } if (this._uiBtm == null) { Util.FindParentToChild <UISprite>(ref this._uiBtm, this._traShutter, "Btm"); } if (this._uiTop == null) { Util.FindParentToChild <UISprite>(ref this._uiTop, this._traShutter, "Top"); } this._actCallback = null; this._iShutterMode = BaseShutter.ShutterMode.Open; this._uiTop.get_transform().set_localPosition(this._vTopPos[1]); this._uiBtm.get_transform().set_localPosition(this._vBtnPos[1]); }