private void OpenDigiviceButton() { Vector2 zero = Vector2.zero; Color c = new Color(1f, 1f, 1f, 1f); EfcCont component; for (int i = 0; i < this.digiviceChildButtonList.Count; i++) { GameObject gameObject = this.digiviceChildButtonList[i]; component = gameObject.GetComponent <EfcCont>(); GUICollider component2 = gameObject.GetComponent <GUICollider>(); zero.x = component2.GetOriginalPos().x; zero.y = component2.GetOriginalPos().y; component.MoveTo(zero, 0.2f, null, iTween.EaseType.spring, 0f); zero.x = 1f; zero.y = 1f; component.ScaleTo(zero, 0.2f, null, iTween.EaseType.spring, 0f); component.ColorTo(c, 0.2f, null, iTween.EaseType.spring, 0f); Transform transform = gameObject.transform.Find("Campaign"); if (transform != null) { component = transform.GetComponent <EfcCont>(); component.ScaleTo(zero, 0.2f, null, iTween.EaseType.linear, 0f); } } this.digiviceSlotBackground.gameObject.SetActive(true); component = this.digiviceSlotBackground; component.ScaleTo(zero, 0.2f, new Action <int>(this.FinishOpenDigiviceButtonAnimation), iTween.EaseType.spring, 0f); component.ColorTo(c, 0.2f, null, iTween.EaseType.spring, 0f); SoundMng.Instance().TryPlaySE("SEInternal/Farm/se_205", 0f, false, true, null, -1); this.ResetFarmWork(); }
private void ShowHideFacilityBtn(bool isPlaySE) { Vector2 zero = Vector2.zero; Color c = new Color(1f, 1f, 1f, 0f); if (!this.isShowBtnFacility) { this.isShowBtnFacility = true; float time = 0.2f; c.a = 1f; for (int i = 0; i < this.facilityChildButtonList.Count; i++) { GameObject gameObject = this.facilityChildButtonList[i]; EfcCont component = gameObject.GetComponent <EfcCont>(); GUICollider component2 = gameObject.GetComponent <GUICollider>(); component2.activeCollider = true; zero.x = component2.GetOriginalPos().x; zero.y = component2.GetOriginalPos().y; component.MoveTo(zero, time, null, iTween.EaseType.spring, 0f); zero.x = (zero.y = 1f); component.ScaleTo(zero, time, null, iTween.EaseType.spring, 0f); component.ColorTo(c, time, null, iTween.EaseType.spring, 0f); Transform transform = gameObject.transform.Find("Campaign"); if (null != transform) { component = transform.GetComponent <EfcCont>(); component.ScaleTo(zero, time, null, iTween.EaseType.linear, 0f); } } if (isPlaySE) { SoundMng.Instance().TryPlaySE("SEInternal/Farm/se_205", 0f, false, true, null, -1); } this.ResetFarmWork(); } else { this.isShowBtnFacility = false; float time2 = 0.2f; c.a = 0f; for (int j = 0; j < this.facilityChildButtonList.Count; j++) { GameObject gameObject2 = this.facilityChildButtonList[j]; EfcCont component = gameObject2.GetComponent <EfcCont>(); component.MoveTo(zero, time2, null, iTween.EaseType.linear, 0f); GUICollider component2 = gameObject2.GetComponent <GUICollider>(); component2.activeCollider = false; component.ScaleTo(Vector2.one, time2, null, iTween.EaseType.linear, 0f); component.ColorTo(c, time2, null, iTween.EaseType.linear, 0f); Transform transform2 = gameObject2.transform.Find("Campaign"); if (null != transform2) { component = transform2.GetComponent <EfcCont>(); component.ScaleTo(zero, time2, null, iTween.EaseType.linear, 0f); } } if (isPlaySE) { SoundMng soundMng = SoundMng.Instance(); if (null != soundMng) { soundMng.TryPlaySE("SEInternal/Farm/se_206", 0f, false, true, null, -1); } } } this.SetAllAlertIcon(); }