public void ShowKeyLock() { this.dockMode = UiArsenalDock.DockMode.Lock; this._lockObj.SetActive(true); this._lockFrameObj.SetActive(true); this._lockBtn.get_transform().set_localScale(Vector3.get_one()); this._lockBtnSprite.spriteName = "btn_addDock"; }
public void _close() { this.dockMode = UiArsenalDock.DockMode.Close; this._uiBg.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_bg_none") as Texture2D); this._uiBg2.alpha = 0f; this._uiGetBtn.get_transform().set_localScale(Vector3.get_zero()); this._uiStartBtn.get_transform().set_localScale(Vector3.get_zero()); this._uiHighBtn.get_transform().set_localScale(Vector3.get_zero()); this._uiTurnLabel.alpha = 0f; this._lockObj.SetActive(true); this._lockFrameObj.SetActive(true); this._lockBtn.get_transform().set_localScale(Vector3.get_zero()); this.btnLight.StopAnim(); }
public bool init(TaskMainArsenalManager taskMainArsenalManager, int num) { this.taskMainArsenalManager = taskMainArsenalManager; this._number = num; this._limit = 0; this.IsLarge = false; this.IsFirstHight = false; this.IsShowHigh = false; this.IsHight = false; this.IsHightEnd = false; this.isCompleteVoicePlayable = false; this.dockMode = UiArsenalDock.DockMode.Close; Util.FindParentToChild <UITexture>(ref this._uiBg, base.get_transform(), "Bg"); Util.FindParentToChild <UITexture>(ref this._uiBg2, base.get_transform(), "Bg2"); Util.FindParentToChild <UIButton>(ref this._uiStartBtn, base.get_transform(), "ButtonStart"); Util.FindParentToChild <UISprite>(ref this._uiStartBtnSprite, this._uiStartBtn.get_transform(), "Background"); Util.FindParentToChild <UIButton>(ref this._uiGetBtn, base.get_transform(), "ButtonGet"); Util.FindParentToChild <UISprite>(ref this._uiGetBtnSprite, this._uiGetBtn.get_transform(), "Background"); Util.FindParentToChild <UIButton>(ref this._uiHighBtn, base.get_transform(), "ButtonHight"); Util.FindParentToChild <UISprite>(ref this._uiHighBtnSprite, this._uiHighBtn.get_transform(), "Background"); Util.FindParentToChild <UILabel>(ref this._uiTurnLabel, base.get_transform(), "LabelTurn"); if (this._lockObj == null) { this._lockObj = base.get_transform().FindChild("LockObj").get_gameObject(); } if (this._lockFrameObj == null) { this._lockFrameObj = this._lockObj.get_transform().FindChild("FrameObject").get_gameObject(); } Util.FindParentToChild <UIButton>(ref this._lockBtn, this._lockObj.get_transform(), "LockButton"); Util.FindParentToChild <UISprite>(ref this._lockBtnSprite, this._lockBtn.get_transform(), "Background"); Util.FindParentToChild <Animation>(ref this._lockAnim, base.get_transform(), "LockBtn"); Util.FindParentToChild <UITexture>(ref this._uiLockedDockL, this._lockObj.get_transform(), "FrameObject/LockFrameL"); Util.FindParentToChild <UITexture>(ref this._uiLockedDockR, this._lockObj.get_transform(), "FrameObject/LockFrameR"); Util.FindParentToChild <UiArsenalDockMini>(ref this._dockMiniMamager, this._uiBg2.get_transform(), "Panel"); Util.FindParentToChild <UiArsenalShipManager>(ref this._shipSManager, this._uiBg2.get_transform(), "Panel/ShipManager"); Util.FindParentToChild <ButtonLightTexture>(ref this.btnLight, this._uiHighBtn.get_transform(), "ButtonLight"); this._dockMiniMamager.init(this._number); this._shipSManager.init(this._number); this._close(); this._isCreate = true; return(true); }
public void _setShow(bool DockOpen) { this._dock = TaskMainArsenalManager.arsenalManager.GetDock(this._number + 1); this._close(); if (this.dockMode == UiArsenalDock.DockMode.Close) { this.dockMode = UiArsenalDock.DockMode.Show; } this._uiBg.alpha = 1f; this._uiBg2.alpha = 1f; this._uiBg.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_bg_1") as Texture2D); if (!DockOpen && this.dockMode != UiArsenalDock.DockMode.Close) { this._lockObj.SetActive(false); } this.updateSpeedUpIcon(); if (this._dock.IsLarge()) { this._uiBg2.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_build2_bg") as Texture2D); } else if (this._dock.IsTunker()) { this._uiBg2.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_build3_bg") as Texture2D); } else { this._uiBg2.mainTexture = (Resources.Load("Textures/Arsenal/dock/kenzo_build1_bg") as Texture2D); } if (this._dock.State == KdockStates.COMPLETE) { this._ship = this._dock.Ship; if (this.IsHight) { this._shipSManager.set(this._ship, this._dock, true); this._uiGetBtn.get_transform().set_localScale(Vector3.get_zero()); this._uiHighBtn.get_transform().set_localScale(Vector3.get_one()); this._uiTurnLabel.alpha = 1f; this._limit = this._dock.GetTurn(); this._uiTurnLabel.text = string.Empty + this._limit.ToString(); if (this.IsFirstHight) { this.PlayFirstHightAnimate(); } else { this.StartSpeedUpAnimate(); } } else { this._shipSManager.set(this._ship, this._dock, false); this.endConstruct(); if (this.IsHightEnd) { this._dockMiniMamager.PlayEndHightAnimate(); } else { this._dockMiniMamager.PlayConstCompAnimation(); } } } else if (this._dock.State == KdockStates.CREATE) { this._ship = this._dock.Ship; this._shipSManager.set(this._ship, this._dock, false); this._uiGetBtn.get_transform().set_localScale(Vector3.get_zero()); this._uiHighBtn.get_transform().set_localScale(Vector3.get_one()); this._uiTurnLabel.alpha = 1f; this._limit = this._dock.GetTurn(); this._uiTurnLabel.text = string.Empty + this._limit.ToString(); this._dockMiniMamager.PlayConstStartAnimation(); } else { this._dockMiniMamager.StopConstAnimation(); this._dockMiniMamager.PlayIdleAnimation(); this._uiStartBtn.get_transform().set_localScale(Vector3.get_one()); } }