void Start() { MyFSprite = transform.GetComponent <UIFilledSprite>(); MonsterSpeed = GameObject.Find("Manager(Clone)").GetComponent <Manager>(); LiveHero = GameObject.Find("HeroSprite").GetComponent <MouseScripts>(); scFeverMng = GameObject.Find("Main Camera").GetComponent <FeverManager>(); }
private void Init() { this.mInitDone = true; if (this.foreground != null) { this.mFGWidget = this.foreground.GetComponent <UIWidget>(); this.mFGFilled = (this.mFGWidget == null) ? null : (this.mFGWidget as UIFilledSprite); this.mFGTrans = this.foreground.transform; if (this.fullSize == Vector2.zero) { this.fullSize = this.foreground.localScale; } } else if (this.mCol != null) { if (this.fullSize == Vector2.zero) { this.fullSize = this.mCol.size; } } else { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } }
/// <summary> /// Initialize the cached values. /// </summary> void Init() { mInitDone = true; if (foreground != null) { mFGWidget = foreground.GetComponent <UIWidget>(); mFGFilled = (mFGWidget != null) ? mFGWidget as UIFilledSprite : null; mFGTrans = foreground.transform; if (fullSize == Vector2.zero) { fullSize = foreground.localScale; } } else if (mCol != null) { if (fullSize == Vector2.zero) { fullSize = mCol.size; } } else { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } }
override protected bool OnDrawProperties() { UIFilledSprite sprite = mWidget as UIFilledSprite; if (!base.OnDrawProperties()) { return(false); } if ((int)sprite.fillDirection > (int)UIFilledSprite.FillDirection.Radial360) { sprite.fillDirection = UIFilledSprite.FillDirection.Horizontal; EditorUtility.SetDirty(sprite); } UIFilledSprite.FillDirection fillDirection = (UIFilledSprite.FillDirection)EditorGUILayout.EnumPopup("Fill Dir", sprite.fillDirection); float fillAmount = EditorGUILayout.Slider("Fill Amount", sprite.fillAmount, 0f, 1f); bool invert = EditorGUILayout.Toggle("Invert Fill", sprite.invert); if (sprite.fillDirection != fillDirection || sprite.fillAmount != fillAmount || sprite.invert != invert) { NGUIEditorTools.RegisterUndo("Sprite Change", mSprite); sprite.fillDirection = fillDirection; sprite.fillAmount = fillAmount; sprite.invert = invert; EditorUtility.SetDirty(sprite); } return(true); }
/// <summary> /// We want to receive drag events from the thumb. /// </summary> void Start() { if (foreground != null) { mWidget = foreground.GetComponent <UIWidget>(); mSprite = (mWidget != null) ? mWidget as UIFilledSprite : null; mForeTrans = foreground.transform; if (fullSize == Vector2.zero) { fullSize = foreground.localScale; } } else if (mCol != null) { if (fullSize == Vector2.zero) { fullSize = mCol.size; } } else { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } if (Application.isPlaying && thumb != null && thumb.collider != null) { UIEventListener listener = UIEventListener.Add(thumb.gameObject); listener.onPress += OnPressThumb; listener.onDrag += OnDragThumb; } Set(rawValue); }
// Chant skill public void ChantProgress(float progress) { if (Mathf.Abs(progress) < Mathf.Epsilon) { _chantBar.SetActive(true); } else if (progress > 0.0f) { UISlider slider = _chantBar.GetComponent <UISlider>(); slider.sliderValue = progress; } else if (Mathf.Abs(progress - 1.0f) < Mathf.Epsilon) { UISlider slider = _chantBar.GetComponent <UISlider>(); slider.sliderValue = progress; // UIFilledSprite sprite = _chantBar.GetComponentInChildren <UIFilledSprite>(); sprite.color = new Color(1.0f, 1.0f, 1.0f, 1.0f); } else if (progress < -0.9f) { _chantBar.SetActive(false); } }
override protected bool OnDrawProperties() { UIFilledSprite sprite = mWidget as UIFilledSprite; if (!base.OnDrawProperties()) { return(false); } UIFilledSprite.FillDirection fillDirection = (UIFilledSprite.FillDirection)EditorGUILayout.EnumPopup("Fill Dir", sprite.fillDirection); if (sprite.fillDirection != fillDirection) { NGUIEditorTools.RegisterUndo("Sprite Change", mSprite); sprite.fillDirection = fillDirection; } float fillAmount = EditorGUILayout.FloatField("Fill Amount", sprite.fillAmount); if (sprite.fillAmount != fillAmount) { NGUIEditorTools.RegisterUndo("Sprite Change", mSprite); sprite.fillAmount = fillAmount; } return(true); }
void Start() { bombButton = GameObject.Find("BombButton"); skillButton = GameObject.Find("SkillButton"); gameManager = GameObject.Find("GameManager"); bulletLevelGage = GameObject.Find("BulletLevelGage"); fuelImageTF = GameObject.Find("FuelImageTF"); //itemGetScript = gameManager.GetComponent<ObjectPoolScript>().itemGetScript; if (gameManager.transform.FindChild("PC/Flight").gameObject) { pcFlight = gameManager.transform.FindChild("PC/Flight").gameObject; } pc = gameManager.transform.FindChild("PC").gameObject; addScoreLabeluiObjectPool = GameObject.Find("AddScoreLabel").GetComponent <uiObjectPool>(); runeObj = GameObject.Find("GameManager").transform.FindChild("Rune").gameObject; soundUiControlScript = gameManager.GetComponent <SoundUiControlScript>(); bulletControlScript = gameManager.GetComponent <BulletControlScript>(); instanceMissionScript = gameManager.GetComponent <InstanceMissionScript>(); bombSkillGageScript = gameManager.GetComponent <BombSkillGageScript>(); bombButton01UIFilledSprite = GameObject.Find("BombButton01").GetComponent <UIFilledSprite>(); magnetScript = gameManager.GetComponent <MagnetScript>(); runeAlphaAni = runeObj.GetComponent <RuneAlphaAni>(); scoreCoinCount = gameManager.GetComponent <ScoreCoinCount>(); playerMoveScript = gameManager.transform.FindChild("PC").gameObject.GetComponent <PlayerMoveScript>(); characterSpeakManager = GameObject.Find("CharacterSpeakManager").GetComponent <CharacterSpeakManagerScript>(); addedChSpeakScript = GameObject.Find("CharacterSpeakManager").GetComponent <AddedChSpeakScript>(); }
private UIFilledSprite m_fsInfoBillboardAnger; // 怒气条 public PlayerHead(uint id, Transform trans, Action <PlayerHead, uint, Transform, EntityParent> OnFinished, EntityParent self, bool showBlood, HeadBloodColor bloodColor = HeadBloodColor.Red, bool showAnger = false) { AssetCacheMgr.GetUIInstance("InfoBillboard.prefab", (prefab, guid, go) => { m_billboard = (GameObject)go; m_billboard.name = id.ToString(); m_goBillboardBlood = m_billboard.transform.FindChild("InfoBillboardBlood").gameObject; m_goBillboardAnger = m_billboard.transform.FindChild("InfoBillboardAnger").gameObject; ShowBillboardBlood(showBlood); SetBillboardBloodColor(bloodColor); ShowBillboardAnger(showAnger); blood = m_billboard.transform.FindChild("InfoBillboardBlood/InfoBillboardBloodFG").GetComponentInChildren <UIFilledSprite>(); name = m_billboard.transform.FindChild("InfoBillboardName").GetComponentInChildren <UILabel>(); tong = m_billboard.transform.FindChild("InfoBillboardTong").GetComponentInChildren <UILabel>(); testInfo = m_billboard.transform.FindChild("InfoBillboardTestInfo").GetComponentsInChildren <UILabel>(true)[0]; bar = m_billboard.transform.FindChild("InfoBillboardBlood/InfoBillboardBloodFG").GetComponentInChildren <UIFilledSprite>(); bg = m_billboard.transform.FindChild("InfoBillboardBlood/InfoBillboardBloodBG0").GetComponentInChildren <UISprite>(); m_bloodAnim = m_billboard.transform.FindChild("InfoBillboardBlood").GetComponentsInChildren <MogoBloodAnim>(true)[0]; m_fsInfoBillboardAnger = m_billboard.transform.FindChild("InfoBillboardAnger/InfoBillboardAngerFG").GetComponentInChildren <UIFilledSprite>(); OnFinished(this, id, trans, self); }); }
private UIFilledSprite m_fsInfoBillboardAnger; // 怒气条 public PlayerHead(uint id, Transform trans ,Action<PlayerHead, uint,Transform,EntityParent> OnFinished,EntityParent self, bool showBlood, HeadBloodColor bloodColor = HeadBloodColor.Red, bool showAnger = false) { AssetCacheMgr.GetUIInstance("InfoBillboard.prefab", (prefab, guid, go) => { m_billboard = (GameObject)go; m_billboard.name = id.ToString(); m_goBillboardBlood = m_billboard.transform.FindChild("InfoBillboardBlood").gameObject; m_goBillboardAnger = m_billboard.transform.FindChild("InfoBillboardAnger").gameObject; ShowBillboardBlood(showBlood); SetBillboardBloodColor(bloodColor); ShowBillboardAnger(showAnger); blood = m_billboard.transform.FindChild("InfoBillboardBlood/InfoBillboardBloodFG").GetComponentInChildren<UIFilledSprite>(); name = m_billboard.transform.FindChild("InfoBillboardName").GetComponentInChildren<UILabel>(); tong = m_billboard.transform.FindChild("InfoBillboardTong").GetComponentInChildren<UILabel>(); testInfo = m_billboard.transform.FindChild("InfoBillboardTestInfo").GetComponentsInChildren<UILabel>(true)[0]; bar = m_billboard.transform.FindChild("InfoBillboardBlood/InfoBillboardBloodFG").GetComponentInChildren<UIFilledSprite>(); bg = m_billboard.transform.FindChild("InfoBillboardBlood/InfoBillboardBloodBG0").GetComponentInChildren<UISprite>(); m_bloodAnim = m_billboard.transform.FindChild("InfoBillboardBlood").GetComponentsInChildren<MogoBloodAnim>(true)[0]; m_fsInfoBillboardAnger = m_billboard.transform.FindChild("InfoBillboardAnger/InfoBillboardAngerFG").GetComponentInChildren<UIFilledSprite>(); OnFinished(this,id,trans,self); }); }
// Use this for initialization void Start() { if (target == null) { target = GetComponentInChildren <UISprite>(); } filler = GetComponent <UIFilledSprite>(); }
// Use this for initialization void Start() { nameLabel = nameLabelGO.GetComponent <UILabel> (); nameLabel.text = GameObject.Find("manager").GetComponent <BasicNetwork> ().nick;; LifeBar = LifeBarGO.GetComponent <UISlider> (); LifeBarSprite = LifeBarGO.GetComponent <UIFilledSprite> (); }
// Use this for initialization void Start() { health = maxHealth; guipanel = (GameObject)GameObject.Find("GUIPanel"); healthbar = (GameObject)Instantiate(healthbarPrefab, Vector3.zero, Quaternion.identity); healthbar.transform.parent = guipanel.transform; healthbar.transform.localScale = new Vector3(1, 1, 1); filledSprite = (UIFilledSprite) healthbar.GetComponentInChildren<UIFilledSprite>(); }
//연료 추가 아이템을 먹었을때 처리하는 메서드// void Awake() { FuelGageBar = transform.FindChild("FuelGageBar").GetComponent <UIFilledSprite>(); FuelGageBase = transform.FindChild("FuelGageBase").GetComponent <UISprite>(); fuelUiSlider = GetComponent <UISlider>(); fuelGageCount = transform.FindChild("FuelGageCount").GetComponent <UILabel>(); PC = GameObject.Find("PC"); }
void Start() { float specialBombRechargeDecrease = 0f; int tempDecreaseBombTime = 0; if (ValueDeliverScript.isSelectSpecial) //스페셜 어택 미션 완료로 인한 보상 시간이 발동되었을때 팬텀 환상의 날개 스킨의 효과가 발동한다. { specialBombRechargeDecrease = ValueDeliverScript.specialBombRechargeDecrease; } if (ValueDeliverScript.flightNumber == 2)//비행기가 2번(팬텀)이 선택되면 기본적으로 쿨타임을 3초 줄여준다. { tempDecreaseBombTime = 3; } //Debug.Log("/////////////////////////////////////////////////////////"); //Debug.Log("/////////////////////////////////////////////////////////"); //Debug.Log("specialBombRechargeDecrease" + specialBombRechargeDecrease); //Debug.Log("tempDecreaseBombTime" + tempDecreaseBombTime); //Debug.Log("bombRechargeDecrease" + ValueDeliverScript.bombRechargeDecrease); //Debug.Log("plasmaWaveCoolTime" + ValueDeliverScript.plasmaWaveCoolTime); //Debug.Log("/////////////////////////////////////////////////////////"); //Debug.Log("/////////////////////////////////////////////////////////"); //기본 폭탄 회복 시간을 정한다. bombRecharge = specialBombRechargeDecrease + tempDecreaseBombTime + ValueDeliverScript.plasmaWaveCoolTime; //폭탄 회복시간. //기본 폭탄 회복 시간을 정한다. //바로 아래 코드가 폭탄 게이지 줄여줌 표시 아이콘의 양을 입력하는 부분이다. 기본 폭탄 bombButton00.GetComponent <UIFilledSprite>().fillAmount = bombRecharge / ValueDeliverScript.bombRecycle; soundUiControlScript = GameObject.Find("GameManager").GetComponent <SoundUiControlScript>(); // skillLevel = ValueDeliverScript.skillLevel; skillLevel = ValueDeliverScript.skillLevel + ((ValueDeliverScript.flightNumber % 3) * 10); //총알을 구현한것이 적어 임시로 3가지 범주안에서만 나오게 세팅. skillUiFilledSprite = GameObject.Find("SkillButton01").GetComponent <UIFilledSprite>(); bombUiFilledSprite = GameObject.Find("BombButton01").GetComponent <UIFilledSprite>(); bombUiSprite = GameObject.Find("BombButton02").GetComponent <UISprite>(); flight = GameObject.Find("Flight"); gameManager = GameObject.Find("GameManager"); activateScript = gameManager.GetComponent <ActivateScript>(); instanceMissionScript = gameManager.GetComponent <InstanceMissionScript>(); PC = GameObject.Find("PC"); scriptReadys = GameObject.Find("ScriptReadys"); //skillUiFilledSprite.spriteName = "bt_skill1_o"; skillUiFilledSprite.spriteName = "bt_skill" + (ValueDeliverScript.flightNumber + 1) + "_o"; GameObject.Find("SkillButton02").GetComponent <UISprite>().spriteName = "bt_skill" + (ValueDeliverScript.flightNumber + 1) + "_n"; skillButton00.SetActive(false); }
/// <summary> /// Ensure that we have a background and a foreground object to work with. /// </summary> void Awake() { mTrans = transform; mCol = collider as BoxCollider; if (foreground != null) { mWidget = foreground.GetComponent<UIWidget>(); mSprite = (mWidget != null) ? mWidget as UIFilledSprite : null; mForeTrans = foreground.transform; if (fullSize == Vector2.zero) fullSize = foreground.localScale; } else if (mCol != null) { if (fullSize == Vector2.zero) fullSize = mCol.size; } else { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } }
void Awake() { bulletLevelGage = GameObject.Find("BulletLevelGage"); addedChSpeakScript = GameObject.Find("CharacterSpeakManager").GetComponent <AddedChSpeakScript>(); ValueDeliverScript.isPcExplo = false; bulletLevelGageLine = GameObject.Find("BulletLevelGageLine").GetComponent <UIFilledSprite>(); //총알에 대한 변수 두개를 생성해서 하나엔 최초 시작시 총알의 레벨을 저장해놓고, 또 하나는 현재 총알의 레벨을 저장할수 있게 세팅// startBulletLevel = bulletLevel = ValueDeliverScript.bulletLevel; levelShow = GameObject.Find("Camera/Anchor/InfoUI/BulletLevelGage/Level1").GetComponent <UISprite>(); //하단의 총알 레벨 12를 넘어서 13이상이 되면 첨부터 게이지가 차있게 만들어 주기 위한 부분. 30단계면 풀 세팅이라 모든 게이지가 다 차게 보인다. int bulletLevelTemp = ValueDeliverScript.bulletLevel; if (bulletLevelTemp > 12) { bulletLevelGageLine.fillAmount = 0; bulletLevelGageLine.spriteName = "Bgr_AttackPowerGage1"; levelShow.spriteName = "Bgr_AttackPowerCnt1"; addedGageForNumber = 3; if (bulletLevelTemp > 13) { bulletLevelGageLine.fillAmount = 0; bulletLevelGageLine.spriteName = "Bgr_AttackPowerGage2"; levelShow.spriteName = "Bgr_AttackPowerCnt2"; addedGageForNumber = 8; } if (bulletLevelTemp > 14) { bulletLevelGageLine.fillAmount = 1; bulletLevelGageLine.spriteName = "Bgr_AttackPowerGage3"; levelShow.spriteName = "Bgr_AttackPowerCnt3"; addedGageForNumber = 16; } levelShow.MakePixelPerfect(); } }
void Awake() { CountShield.SetActive(false); flight = GameObject.Find("Flight"); centerBlack = GameObject.Find("BlackPanel").transform.FindChild("BlackBezel/CenterBack").gameObject; bombButton01UIFilledSprite = GameObject.Find("BombButton01").GetComponent <UIFilledSprite>(); characterSpeakManager = GameObject.Find("CharacterSpeakManager").GetComponent <CharacterSpeakManagerScript>(); //pauseMessage = GameObject.Find("PauseMessage"); //pauseMessageWarning = GameObject.Find("PauseMessageWarning"); //forPause = GameObject.Find("ForPauseGreyShield"); //pauseMessage.SetActive(false); //pauseMessageWarning.SetActive(false); //forPause.SetActive(false); soundUiControlScript = GameObject.Find("GameManager").GetComponent <SoundUiControlScript>(); oneMoreWin.SetActive(false); bgAudioSource = GameObject.Find("BgSoundObject").GetComponent <AudioSource>(); bgVolume = bgAudioSource.volume; }
public override void OnInspectorGUI() { EditorGUIUtility.LookLikeControls(100f); UIScrollBar sb = target as UIScrollBar; NGUIEditorTools.DrawSeparator(); float val = EditorGUILayout.Slider("Value", sb.scrollValue, 0f, 1f); float size = EditorGUILayout.Slider("Size", sb.barSize, 0f, 1f); float alpha = EditorGUILayout.Slider("Alpha", sb.alpha, 0f, 1f); UIFilledSprite ProgressBackground = (UIFilledSprite)EditorGUILayout.ObjectField("进度条", sb.ProgressBackground, typeof(UIFilledSprite), true); float ForegroundZDepth = EditorGUILayout.FloatField("拖拽按钮Z坐标", sb.ForegroundZDepth); Vector2 foregroundSize = EditorGUILayout.Vector2Field("拖拽按钮缩放比", sb.ForegroundScaleSize); GUILayout.BeginHorizontal(); StepPointCount = EditorGUILayout.IntField("节点个数", StepPointCount); if (GUILayout.Button("确定")) { sb.StepList = new float[StepPointCount]; } GUILayout.EndHorizontal(); if (sb.StepList != null) { for (int i = 0; i < sb.StepList.Length; i++) { float value = EditorGUILayout.FloatField("节点" + i, sb.StepList[i]); value = value > 1 ? 1 : value; value = value < 0 ? 0 : value; sb.StepList[i] = value; } } NGUIEditorTools.DrawSeparator(); UISprite bg = (UISprite)EditorGUILayout.ObjectField("Background", sb.background, typeof(UISprite), true); UISprite fg = (UISprite)EditorGUILayout.ObjectField("Foreground", sb.foreground, typeof(UISprite), true); UIScrollBar.Direction dir = (UIScrollBar.Direction)EditorGUILayout.EnumPopup("Direction", sb.direction); bool inv = EditorGUILayout.Toggle("Inverted", sb.inverted); if (sb.scrollValue != val || sb.barSize != size || sb.background != bg || sb.foreground != fg || sb.direction != dir || sb.inverted != inv || sb.alpha != alpha || sb.ForegroundScaleSize.x != foregroundSize.x || sb.ForegroundScaleSize.y != foregroundSize.y || sb.ForegroundZDepth != ForegroundZDepth || sb.ProgressBackground != ProgressBackground) { NGUIEditorTools.RegisterUndo("Scroll Bar Change", sb); sb.scrollValue = val; sb.barSize = size; sb.inverted = inv; sb.background = bg; sb.foreground = fg; sb.direction = dir; sb.alpha = alpha; sb.ForegroundScaleSize = foregroundSize; sb.ForegroundZDepth = ForegroundZDepth; sb.ProgressBackground = ProgressBackground; UnityEditor.EditorUtility.SetDirty(sb); } }
private void UpdateWeaponReloadUI(UIFilledSprite filledSprite, WeaponScript.WeaponClasses weaponType) { WeaponScript weapon = GetWeaponType(weaponType); if (filledSprite != null && weapon != null) { filledSprite.fillAmount = 1 - (weapon.RemainingReloadTime / weapon.ReloadSpeed); } }
// Use this for initialization void Start() { filler = GetComponent<UIFilledSprite>(); }
/// <summary> /// We want to receive drag events from the thumb. /// </summary> void Start() { if (foreground != null) { mWidget = foreground.GetComponent<UIWidget>(); mSprite = (mWidget != null) ? mWidget as UIFilledSprite : null; mForeTrans = foreground.transform; if (fullSize == Vector2.zero) fullSize = foreground.localScale; } else if (mCol != null) { if (fullSize == Vector2.zero) fullSize = mCol.size; } else { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } if (Application.isPlaying && thumb != null && thumb.collider != null) { UIEventListener listener = UIEventListener.Add(thumb.gameObject); listener.onPress += OnPressThumb; listener.onDrag += OnDragThumb; } Set(rawValue); }
// Use this for initialization void Start() { if (target == null) target = GetComponentInChildren<UISprite>(); filler = GetComponent<UIFilledSprite>(); }
void Awake() { magicsCoolDownTable = new Hashtable(); globals = Globals.GetInstance(); coolDownSprite = CoolDownGO.GetComponent<UIFilledSprite>(); }
private void Init() { UIFilledSprite uIFilledSprite; this.mInitDone = true; if (this.foreground != null) { this.mFGWidget = this.foreground.GetComponent<UIWidget>(); if (this.mFGWidget == null) { uIFilledSprite = null; } else { uIFilledSprite = this.mFGWidget as UIFilledSprite; } this.mFGFilled = uIFilledSprite; this.mFGTrans = this.foreground.transform; if (this.fullSize == Vector2.zero) { this.fullSize = this.foreground.localScale; } } else if (this.mCol == null) { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } else if (this.fullSize == Vector2.zero) { this.fullSize = this.mCol.size; } }
void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); Initialize(); m_transStrenthenDialogIconList = m_myTransform.Find(m_widgetToFullName["StrenthenDialogIconList"]); m_dragCamera = m_myTransform.Find(m_widgetToFullName["StrenthenDialogIconListCamera"]).GetComponentsInChildren <Camera>(true)[0]; m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren <Camera>(true)[0]; m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].topLeft = GameObject.Find("EquipmentUIIconListBGTopLeft").transform; m_dragCamera.GetComponentsInChildren <UIViewport>(true)[0].bottomRight = GameObject.Find("EquipmentUIIconListBGBottomRight").transform; m_dragableCamera = m_dragCamera.GetComponentsInChildren <MyDragableCamera>(true)[0]; m_dragableCamera.LeftArrow = FindTransform("StrenthenDialogIconListArrowU").gameObject; m_dragableCamera.RightArrow = FindTransform("StrenthenDialogIconListArrowD").gameObject; m_bcStrenthUIBoxCollider = FindTransform("StrenthUIBoxCollider").GetComponentsInChildren <BoxCollider>(true)[0]; //m_goStrenthenDialogStarRewardStarLevel = m_myTransform.FindChild(m_widgetToFullName["StrenthenDialogStarRewardStarLevel"]).gameObject; //m_goStarLevelListPosBegin = m_myTransform.FindChild(m_widgetToFullName["StarLevelListPosBegin"]).gameObject; //m_StrenthenStarLevelInfo = m_goStrenthenDialogStarRewardStarLevel.AddComponent<StrenthenStarLevelInfo>(); //if (m_StrenthenStarLevelInfo != null) // m_StrenthenStarLevelInfo.CreateStarLevelInfo(m_goStrenthenDialogStarRewardStarLevel.transform, m_goStarLevelListPosBegin.transform.localPosition); m_lblBaseEquipType = m_myTransform.Find(m_widgetToFullName["BaseAttributeEquipTypeText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblStarLevel = m_myTransform.Find(m_widgetToFullName["StarLevelText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseAttribute = m_myTransform.Find(m_widgetToFullName["BaseAttributeText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblAfterAttribute = m_myTransform.Find(m_widgetToFullName["AfterAttributeText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblEquipmentLevel = m_myTransform.Find(m_widgetToFullName["StrenthenDialogLevelNum"]).GetComponentsInChildren <UILabel>(true)[0]; for (int i = 0; i < 10; i++) { m_arrStrenthLevelBG[i] = m_myTransform.Find(m_widgetToFullName["StrenthenDialogLevelBG" + i]).gameObject; m_arrStrenthLevelBG[i].transform.localPosition = new Vector3( m_arrStrenthLevelBG[0].transform.localPosition.x + 53 * i, m_arrStrenthLevelBG[i].transform.localPosition.y, m_arrStrenthLevelBG[i].transform.localPosition.z); UIFilledSprite fs = m_myTransform.Find(m_widgetToFullName["StrenthenDialogLevelFG" + i]).GetComponentsInChildren <UIFilledSprite>(true)[0]; m_fsEquipmentExpList[i] = fs; m_fsEquipmentExpList[i].transform.localPosition = new Vector3( m_fsEquipmentExpList[0].transform.localPosition.x + 53 * i, m_fsEquipmentExpList[i].transform.localPosition.y, m_fsEquipmentExpList[i].transform.localPosition.z); } m_ssEquipmentImage = m_myTransform.Find(m_widgetToFullName["StrenthenDialogImgFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0]; m_lblBaseReward0Title = FindTransform("LevelReward0BaseTitle").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward1Title = FindTransform("LevelReward1BaseTitle").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward2Title = FindTransform("LevelReward2BaseTitle").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward0Num = FindTransform("LevelReward0BaseNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward1Num = FindTransform("LevelReward1BaseNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward2Num = FindTransform("LevelReward2BaseNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward0TextAnimation = FindTransform("LevelReward0BaseTextAnimation").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward1TextAnimation = FindTransform("LevelReward1BaseTextAnimation").GetComponentsInChildren <UILabel>(true)[0]; m_lblBaseReward2TextAnimation = FindTransform("LevelReward2BaseTextAnimation").GetComponentsInChildren <UILabel>(true)[0]; m_goLevelRewardAfter = FindTransform("GOLevelRewardAfter").gameObject; m_lblAfterReward0 = m_myTransform.Find(m_widgetToFullName["LevelReward0AfterText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblAfterReward1 = m_myTransform.Find(m_widgetToFullName["LevelReward1AfterText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblAfterReward2 = m_myTransform.Find(m_widgetToFullName["LevelReward2AfterText"]).GetComponentsInChildren <UILabel>(true)[0]; // ǿ����ť m_goStrenthenDialogStrenth = FindTransform("StrenthenDialogStrenth").gameObject; m_spStrenthenDialogStrenthBGUp = FindTransform("StrenthenDialogStrenthBGUp").GetComponentsInChildren <UISprite>(true)[0]; m_lblNeedGold = m_myTransform.Find(m_widgetToFullName["StrenthenDialogCostGold"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblCurrentGold = m_myTransform.Find(m_widgetToFullName["StrenthUICrrentGoldNum"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblNeedLevel = m_myTransform.Find(m_widgetToFullName["StrenthenDialogNeedLevelText"]).GetComponentsInChildren <UILabel>(true)[0]; m_lblCost = m_myTransform.Find(m_widgetToFullName["StrenthenDialogCostText"]).GetComponentsInChildren <UILabel>(true)[0]; // ǿ����Ҫ�IJ��� m_lblNeedMaterial1 = FindTransform("StrenthenDialogCostMaterial1").GetComponentsInChildren <UILabel>(true)[0]; m_lblNeedMaterial2 = FindTransform("StrenthenDialogCostMaterial2").GetComponentsInChildren <UILabel>(true)[0]; m_spNeedMaterialIcon1 = FindTransform("StrenthenDialogCostMaterial1Icon").GetComponentsInChildren <UISprite>(true)[0]; m_spNeedMaterialIcon2 = FindTransform("StrenthenDialogCostMaterial2Icon").GetComponentsInChildren <UISprite>(true)[0]; m_goNeedMaterial2 = FindTransform("GOStrenthenDialogCostMaterial2").gameObject; // ǿ����Ҫ�IJ��ϲ���,��ʾ��ָ����ť m_goGOMaterialObtainTip = m_myTransform.Find(m_widgetToFullName["GOMaterialObtainTip"]).gameObject; m_goStrenthenDialogMaterialTip = m_myTransform.Find(m_widgetToFullName["StrenthenDialogMaterialTip"]).gameObject; m_spStrenthenDialogMaterialTipBGUp = m_myTransform.Find(m_widgetToFullName["StrenthenDialogMaterialTipBGUp"]).GetComponentsInChildren <UISprite>(true)[0]; m_spStrenthenDialogMaterialTipBGDown = m_myTransform.Find(m_widgetToFullName["StrenthenDialogMaterialTipBGDown"]).GetComponentsInChildren <UISprite>(true)[0]; for (int i = 0; i < ICONGRIDNUM; ++i) { //obj = (GameObject)Instantiate(Resources.Load("GUI/StrenthenDialogIconGrid")); //obj.transform.parent = m_transStrenthenDialogIconList ; //obj.transform.localPosition = new Vector3(0,-ICONGRIDSPACE * i, 0); //obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 0.0008f); //obj.GetComponentsInChildren<MyDragCamera>(true)[0].RelatedCamera = m_dragCamera; //obj.name = "EquipmentGrid"+i.ToString(); //var s = m_transStrenthenDialogIconList.GetComponentsInChildren<MogoSingleButtonList>(true)[0] as MogoSingleButtonList; //s.SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]); //obj.AddComponent<StrenthenEquipmentGrid>().id = i; //m_listEquipmentGrid.Add(obj); int index = i; AssetCacheMgr.GetUIInstance("StrenthenDialogIconGrid.prefab", (prefab, guid, go) => { GameObject obj = (GameObject)go; obj.transform.parent = m_transStrenthenDialogIconList; obj.transform.localPosition = new Vector3(0, ICONGRIDSPACE * index, 0); obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 1); obj.GetComponentsInChildren <MyDragCamera>(true)[0].RelatedCamera = m_dragCamera; obj.name = "EquipmentGrid" + index.ToString(); var s = m_transStrenthenDialogIconList.GetComponentsInChildren <MogoSingleButtonList>(true)[0] as MogoSingleButtonList; s.SingleButtonList.Add(obj.GetComponentsInChildren <MogoSingleButton>(true)[0]); obj.AddComponent <StrenthenEquipmentGrid>().id = index; Transform tranStarLevel = obj.transform.Find("StrenthenDialogIconGridStarLevelList"); StrenthenStarLevelInfo strenthenStarLevelInfo = tranStarLevel.gameObject.AddComponent <StrenthenStarLevelInfo>(); if (strenthenStarLevelInfo != null) { strenthenStarLevelInfo.CreateStarLevelInfo(tranStarLevel, new Vector3(0, 0, 0)); } m_listEquipmentGrid.Add(obj); ShowEquipmentUpSign(index, false); if (m_listEquipmentGrid.Count == ICONGRIDNUM) { EquipmentUIViewManager.Instance.IsCanClick = true; EventDispatcher.TriggerEvent(BodyEnhanceManager.ON_SHOW); if (MogoUIManager.Instance.StrenthUILoaded != null) { MogoUIManager.Instance.StrenthUILoaded(); } // ������ʽ��Ҫ����(��ҳ����Ҫ����) if (!m_dragableCamera.IsMovePage) { m_dragableCamera.FPageHeight = ICONGRIDSPACE * ICON_GRID_ONE_PAGE; m_dragableCamera.MAXY = ICON_OFFSET_Y; if (m_listEquipmentGrid.Count > ICON_GRID_ONE_PAGE) { m_dragableCamera.MINY = (m_listEquipmentGrid.Count - ICON_GRID_ONE_PAGE) * ICONGRIDSPACE + ICON_OFFSET_Y; } else { m_dragableCamera.MINY = m_dragableCamera.MAXY; } } MogoGlobleUIManager.Instance.ShowWaitingTip(false); } if (index == 0) { StrenthTabDown(index); } else { StrenthTabUp(index); } }); } }
//GUIStyle style; // Texture2D texture; // Use this for initialization void Start() { satisfyBarValue = satisfyBarValueGo.GetComponent<UILabel>(); satisfyBarFill = satisfyBarFillGo.GetComponent<UIFilledSprite>(); barLength = 0 ; gameMasterScript = GameObject.FindGameObjectWithTag("master").GetComponent<GameMaster>(); playedAlert = false; AddjustSatisfaction(0); }
void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); Initialize(); m_lisgGridGO = new List<GameObject>(); m_listGridFG = new List<UISlicedSprite>(); m_listGridBG = new List<UISlicedSprite>(); m_listGridUp = new List<UISlicedSprite>(); m_listGridUpBl = new List<UISprite>(); m_listGridNum = new List<UILabel>(); m_equipDetailLblEquip = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailPutUpText"]).GetComponentsInChildren<UILabel>(true)[0]; m_packageGold = m_myTransform.FindChild(m_widgetToFullName["GoldText"]).GetComponentsInChildren<UILabel>(true)[0]; m_packageDiamon = m_myTransform.FindChild(m_widgetToFullName["DiamonText"]).GetComponentsInChildren<UILabel>(true)[0]; m_packageVolume = m_myTransform.FindChild(m_widgetToFullName["PackageInfoNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_packageDragableCamera = m_myTransform.FindChild(m_widgetToFullName["PackageCamera"]).GetComponentsInChildren<MyDragableCamera>(true)[0]; m_packageDragableCamera.OutOfBoundsMaxPage += OnOutOfBoundsMaxPage; m_packageDragableCamera.OutOfBoundsMinPage += OnOutOfBoundsMinPage; m_packageIcoSingleButtonList = FindTransform("PackageIconList").GetComponentsInChildren<MogoSingleButtonList>(true)[0]; m_playerName = m_myTransform.FindChild(m_widgetToFullName["PlayerNameText"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerLevel = m_myTransform.FindChild(m_widgetToFullName["PlayerLevelText"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerNameAndLevel = m_myTransform.FindChild(m_widgetToFullName["PlayerNameAndLevelText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipDetailName = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipDetailNeedLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailNeedLevelNum"]).GetComponentsInChildren<UILabel>(true)[0]; //m_equipDetailGrowLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailGrowLevelNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipDetailNeedJob = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailNeedJobType"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipDetailExtra = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailExtraText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipDetailImageFG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_equipDetailImageBG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailImageBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_equipDetailImageUsed = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailImageUsed"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_equipTipCamera = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailBG"]).GetComponentsInChildren<SimpleDragCamera>(true)[0]; m_equipCurrentDetailImageBG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailImageBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_equipCurrentDetailName = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipCurrentDetailNeedLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailNeedLevelNum"]).GetComponentsInChildren<UILabel>(true)[0]; //m_equipCurrentDetailGrowLevel = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailGrowLevelNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipCurrentDetailNeedJob = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailNeedJobType"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipCurrentDetailExtra = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailExtraText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipCurrentDetailImageFG = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_equipCurrentDetailImageUsed = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailImageUsed"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_equipCurrentTipCamera = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDetailBG"]).GetComponentsInChildren<SimpleDragCamera>(true)[0]; m_playerDetailCDDecrease = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeCDDecreaseNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailCrit = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeCritNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeDamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailHit = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeHitNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailPVP = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributePVPNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailWreck = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWreckNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailPiercing = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributePiercingNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailExplosionBonus = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeExplosionBonusNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailCritResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeCritResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailDefense = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeDefenceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailHealth = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeHealthNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailPVE = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributePVENum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailSpeedUp = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeSpeedUpNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailWreckResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWreckResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailEarthElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeEarthElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailWindElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWindElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailWaterElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWaterElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailFireElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeFireElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailGoldElemDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeGoldElemDamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailEarthElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeEarthElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailWindElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWindElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailWaterElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeWaterElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailFireElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeFireElemResistenceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerDetailGoldElemResistance = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailAttributeGoldElemResistanceNum"]).GetComponentsInChildren<UILabel>(true)[0]; //m_packageInfoDetailPackage = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailPackage"]).gameObject; //m_packageInfoDetailPlayer = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDetailPlayer"]).gameObject; m_playerInfoEXP = m_myTransform.FindChild(m_widgetToFullName["PlayerExpFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_playerInfoEnergy = m_myTransform.FindChild(m_widgetToFullName["PlayerEnergyFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_playerInfoExpNum = m_myTransform.FindChild(m_widgetToFullName["PlayerExpNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerInfoEnergyNum = m_myTransform.FindChild(m_widgetToFullName["PlayerEnergyNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerInfoJob = m_myTransform.FindChild(m_widgetToFullName["PlayerJobName"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerInfoHealth = m_myTransform.FindChild(m_widgetToFullName["PlayerBloodNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerInfoDamage = m_myTransform.FindChild(m_widgetToFullName["PlayerAttackNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerInfoDefense = m_myTransform.FindChild(m_widgetToFullName["PlayerDefenceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_playerInfoPower = m_myTransform.FindChild(m_widgetToFullName["PlayerPowerInfoNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_diamondTipLevel = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailLevelNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_diamondTipType = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailTypeNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_diamondTipDesc = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_diamondTipName = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0]; m_ssDiamondTipIcon = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_diamondTipIconBg = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageBG"]).GetComponentsInChildren<UISprite>(true)[0]; m_diamondMaxStack = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailMaxStackNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_diamondInfoTip = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoTip"]).gameObject; m_socialTip = m_myTransform.FindChild(m_widgetToFullName["SocialTip"]).gameObject; m_materialTipName = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0]; m_materialTipLevel = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailLevelNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_materialTipStack = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailStackNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_materialTipDecs = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_materialTipPrice = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailPriceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_materialTipPriceIcon = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailPriceIcon"]).GetComponentsInChildren<UISprite>(true)[0]; m_materialTipIcon = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_materialTipIconBg = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoDetailImageBG"]).GetComponentsInChildren<UISprite>(true)[0]; m_materialTip = m_myTransform.FindChild(m_widgetToFullName["MaterialInfoTip"]).gameObject; m_propTipName = m_myTransform.FindChild(m_widgetToFullName["PropInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0]; m_propTipStack = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailStackNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_propTipDecs = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_propTipPrice = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailPriceNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_propTipPriceIcon = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailPriceIcon"]).GetComponentsInChildren<UISprite>(true)[0]; m_propTipIcon = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_propTipIconBg = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailImageBG"]).GetComponentsInChildren<UISprite>(true)[0]; m_propTip = m_myTransform.FindChild(m_widgetToFullName["PropInfoTip"]).gameObject; m_propTipUseBtn = m_myTransform.FindChild(m_widgetToFullName["PropInfoDetailCompose"]).gameObject; m_equipSlotBelt = m_myTransform.FindChild(m_widgetToFullName["BeltText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotBreast = m_myTransform.FindChild(m_widgetToFullName["BreastPlateText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotCuish = m_myTransform.FindChild(m_widgetToFullName["CuishText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotHand = m_myTransform.FindChild(m_widgetToFullName["HandGuardText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotHead = m_myTransform.FindChild(m_widgetToFullName["HeadEquipText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotNecklace = m_myTransform.FindChild(m_widgetToFullName["NecklaceText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotRingLeft = m_myTransform.FindChild(m_widgetToFullName["RingLeftText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotRingRight = m_myTransform.FindChild(m_widgetToFullName["RingRightText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotShoes = m_myTransform.FindChild(m_widgetToFullName["ShoesText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotShouders = m_myTransform.FindChild(m_widgetToFullName["ShoudersText"]).GetComponentsInChildren<UILabel>(true)[0]; m_equipSlotWeapon = m_myTransform.FindChild(m_widgetToFullName["WeaponText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblDialogTitle = m_myTransform.FindChild(m_widgetToFullName["DialogTitle"]).GetComponentsInChildren<UILabel>(true)[0]; m_goPackageItemGridList = m_myTransform.FindChild(m_widgetToFullName["PackageItemGridList"]).gameObject; m_myTransform.FindChild(m_widgetToFullName["EquipModelImageBG"]).gameObject.AddComponent<EquipModelImge>(); m_texShowCharacterWinBG = m_myTransform.FindChild(m_widgetToFullName["PlayerEquipBGTexBG"]).GetComponentsInChildren<UITexture>(true)[0]; for (int i = 0; i < DIAMONDHOLENUM; ++i) { //m_equipDetailDiamondHoleInfo[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDiamonHole" + i + "Text"]).GetComponentsInChildren<UILabel>(true)[0]; //m_equipCurrentDetailDiamondHoleInfo[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDiamonHole" + i + "Text"]).GetComponentsInChildren<UILabel>(true)[0]; } //string _GridWidgetName = "Item"; //for (int i = 0; i < VOLUME; ++i) //{ // m_listGridFG.Add(m_myTransform.FindChild(m_widgetToFullName[_GridWidgetName + i + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0]); // m_listGridUp.Add(m_myTransform.FindChild(m_widgetToFullName[_GridWidgetName + i + "Up"]).GetComponentsInChildren<UISlicedSprite>(true)[0]); // m_listGridNum.Add(m_myTransform.FindChild(m_widgetToFullName[_GridWidgetName + i + "Num"]).GetComponentsInChildren<UILabel>(true)[0]); //} for (int i = 0; i < 4; ++i) { //m_arrNewDiamondHoleIcon[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipInfoDiamonHole" + (i + 9) + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0].gameObject; //m_arrCurrentDiamondHoleIcon[i] = m_myTransform.FindChild(m_widgetToFullName["PackageEquipCurrentInfoDiamonHole" + (i + 9) + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0].gameObject; } basicAttr = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailBasicAttribute"]).gameObject; elemAttr = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailElementAttribute"]).gameObject; Camera mySourceCam = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0]; m_myTransform.FindChild(m_widgetToFullName["PackageCamera"]).GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = mySourceCam; m_myTransform.FindChild(m_widgetToFullName["EquipCamera"]).GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = mySourceCam; for (int i = 0; i < 40; ++i) { AddPacakgeItemGrid(MogoUIManager.Instance.CommonAtlas); } m_menuTabUpLabelList[(int)MenuUITab.PlayerTab] = m_myTransform.FindChild(m_widgetToFullName["IconPlayerTextUp"]).GetComponent<UILabel>(); m_menuTabUpLabelList[(int)MenuUITab.PackageTab] = m_myTransform.FindChild(m_widgetToFullName["IconPackageTextUp"]).GetComponent<UILabel>(); m_menuTabUpLabelList[(int)MenuUITab.SkillTab] = m_myTransform.FindChild(m_widgetToFullName["IconSkillTextUp"]).GetComponent<UILabel>(); m_menuTabUpLabelList[(int)MenuUITab.TongTab] = m_myTransform.FindChild(m_widgetToFullName["IconTongTextUp"]).GetComponent<UILabel>(); m_menuTabUpLabelList[(int)MenuUITab.SocialTab] = m_myTransform.FindChild(m_widgetToFullName["IconSocialTextUp"]).GetComponent<UILabel>(); m_menuTabUpLabelList[(int)MenuUITab.SettingsTab] = m_myTransform.FindChild(m_widgetToFullName["IconSettingsTextUp"]).GetComponent<UILabel>(); m_menuTabDownLabelList[(int)MenuUITab.PlayerTab] = m_myTransform.FindChild(m_widgetToFullName["IconPlayerTextDown"]).GetComponent<UILabel>(); m_menuTabDownLabelList[(int)MenuUITab.PackageTab] = m_myTransform.FindChild(m_widgetToFullName["IconPackageTextDown"]).GetComponent<UILabel>(); m_menuTabDownLabelList[(int)MenuUITab.SkillTab] = m_myTransform.FindChild(m_widgetToFullName["IconSkillTextDown"]).GetComponent<UILabel>(); m_menuTabDownLabelList[(int)MenuUITab.TongTab] = m_myTransform.FindChild(m_widgetToFullName["IconTongTextDown"]).GetComponent<UILabel>(); m_menuTabDownLabelList[(int)MenuUITab.SocialTab] = m_myTransform.FindChild(m_widgetToFullName["IconSocialTextDown"]).GetComponent<UILabel>(); m_menuTabDownLabelList[(int)MenuUITab.SettingsTab] = m_myTransform.FindChild(m_widgetToFullName["IconSettingsTextDown"]).GetComponent<UILabel>(); m_packageTabLabelList[(int)PackageUITab.EquipmentTab] = m_myTransform.FindChild(m_widgetToFullName["NormalIconText"]).GetComponent<UILabel>(); m_packageTabLabelList[(int)PackageUITab.JewelTab] = m_myTransform.FindChild(m_widgetToFullName["GemIconText"]).GetComponent<UILabel>(); m_packageTabLabelList[(int)PackageUITab.MaterialTab] = m_myTransform.FindChild(m_widgetToFullName["MaterialIconText"]).GetComponent<UILabel>(); foreach (var pair in m_packageTabLabelList) { if (pair.Key == (int)PackageUITab.EquipmentTab) PackageTabDown(pair.Key); else PackageTabUp(pair.Key); } m_playerDetailTabLabelList[(int)PlayerDetailUITab.BasicAttributeTab] = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailBasicAttributeButtonText"]).GetComponent<UILabel>(); m_playerDetailTabLabelList[(int)PlayerDetailUITab.ElementAttributeTab] = m_myTransform.FindChild(m_widgetToFullName["PlayerDetailElementAttributeButtonText"]).GetComponent<UILabel>(); foreach (var pair in m_playerDetailTabLabelList) { if (pair.Key == (int)PlayerDetailUITab.BasicAttributeTab) PlayerDetailTabDown(pair.Key); else PlayerDetailTabUp(pair.Key); } }
// Use this for initialization void Start() { filler = GetComponent <UIFilledSprite>(); }
public override void CallWhenCreate() { m_myTransform.FindChild("BottomLeft/Controller").gameObject.AddComponent<ControlStick>(); m_goAssistantDialog = m_myTransform.FindChild(m_widgetToFullName["AssistantDialog"]).gameObject; m_goAssistantDialogText = m_myTransform.FindChild(m_widgetToFullName["AssistantDialogText"]).GetComponentsInChildren<UILabel>(true)[0]; m_goAssistantDialogText.text = LanguageData.GetContent(46008); m_goSendHelp = m_myTransform.FindChild(m_widgetToFullName["SendHelp"]).gameObject; m_goDoorOfBuryOpenTip = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenTip"]).gameObject; m_goDoorOfBuryOpenTipWord = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenTipWord"]).gameObject; m_goDoorOfBuryOpenTipWord.AddComponent<DoorOfBuryTipUIMgr>().Initialize(); m_socialTip = m_myTransform.FindChild(m_widgetToFullName["SocialTip"]).gameObject; m_goSanctuaryOpenTip = FindTransform("SanctuaryOpenTip").gameObject; m_goMissionFoggyAbyssOpenTip = FindTransform("MissionFoggyAbyssOpenTip").gameObject; m_UICamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0]; m_myTransform.FindChild("Bottom").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild("BottomLeft").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild("BottomRight").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild("BottomLeft/Controller").GetComponentsInChildren<ControlStick>(true)[0].RelatedCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0]; m_myTransform.FindChild("Top").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild("TopLeft").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild("TopRight").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild("Center").GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = m_UICamera; m_myTransform.FindChild(m_widgetToFullName["NormalMainUIBG"]).gameObject.AddComponent<TouchControll>(); m_lblTipText = m_myTransform.FindChild(m_widgetToFullName["BattleRecordTipText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblDoorOfBuryTipTitle = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenTipTitleText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblDoorOfBuryTip1 = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenTipText1"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblDoorOfBuryTip2 = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenTipText2"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblVIPLevel = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerVIP"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblAssistantDialog = m_myTransform.FindChild(m_widgetToFullName["AssistantDialogText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblNewChatLabel = m_myTransform.FindChild(m_widgetToFullName["NormalMainUICommunityText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblPlayerBloodText = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerBloodText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblContributeTipTitle = m_myTransform.FindChild(m_widgetToFullName["ContributeTipTitle"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblContributeTipTodayRank = m_myTransform.FindChild(m_widgetToFullName["TodayRank"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblContributeTipWeekRank = m_myTransform.FindChild(m_widgetToFullName["WeekRank"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblContributeTipCurrentRewardNum = m_myTransform.FindChild(m_widgetToFullName["CurrentRewardNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblContributeTipNextRewardConditionNum = m_myTransform.FindChild(m_widgetToFullName["NextRewardConditionNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblContributeTipNextRewardNum = m_myTransform.FindChild(m_widgetToFullName["NextRewardNum"]).GetComponentsInChildren<UILabel>(true)[0]; // ChineseData SetContributeTipChineseData(); FindTransform("EquipmentConsumeIconText").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46852); FindTransform("PVPPlayIconText").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46856); FindTransform("PVEPlayIconText").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46857); m_spCurrentRewardItem = m_myTransform.FindChild(m_widgetToFullName["CurrentRewardItemFG"]).GetComponentsInChildren<UISprite>(true)[0]; m_spNextRewardItem = m_myTransform.FindChild(m_widgetToFullName["NextRewardItemFG"]).GetComponentsInChildren<UISprite>(true)[0]; m_goContributeTip = m_myTransform.FindChild(m_widgetToFullName["ContributeTip"]).gameObject; m_goContributeTipOKBtn = m_myTransform.FindChild(m_widgetToFullName["ContributeTipOK"]).gameObject; m_fsPlayerBlood = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerBloodFG"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsPlayerAnger = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerAngerFG"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsPlayerExp = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerExpFG"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_spVipLevelNum1 = m_myTransform.FindChild(m_widgetToFullName["VipLevel"]).GetComponentsInChildren<UISprite>(true)[0]; m_spVipLevelNum2 = m_myTransform.FindChild(m_widgetToFullName["VipLevel2"]).GetComponentsInChildren<UISprite>(true)[0]; m_energyString = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerStrenthText"]).GetComponentsInChildren<UILabel>(true)[0]; m_spNormalMainUIPlayerStrenthFG = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerStrenthFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_goCommunity = m_myTransform.FindChild(m_widgetToFullName["NormalMainUICommunity"]).gameObject; m_goCommunityLabel = m_myTransform.FindChild(m_widgetToFullName["NormalMainUICommunityText"]).GetComponentsInChildren<UILabel>(true)[0]; m_spCommunityIconBGUp = m_myTransform.FindChild(m_widgetToFullName["NormalMainUICommunityIconBGUp"]).GetComponentsInChildren<UISprite>(true)[0]; m_spCommunityIconBGDown = FindTransform("NormalMainUICommunityIconBGDown").GetComponentsInChildren<UISprite>(true)[0]; // 主界面漂移按钮 { m_maplistGoIconPlays[IconPlays.ControllerIcon] = FindTransform("NoramlMainUIControllerIcon").gameObject; m_maplistGoIconPlays[IconPlays.NMCommunityIcon] = FindTransform("NMCommunity").gameObject; m_maplistGoIconPlays[IconPlays.NMHelpTip] = FindTransform("NMHelpTip").gameObject; FindTransform("HelpTip").gameObject.AddComponent<TipUIManager>(); } // IconPlaysBottomRightH { m_maplistIconPlaysBottomRightH[IconPlaysBottomRightH.PackageIcon] = FindTransform("NMPackageIcon").gameObject; m_maplistIconPlaysBottomRightH[IconPlaysBottomRightH.EquipmentIcon] = FindTransform("NMEquipmentConsumeIcon").gameObject; m_maplistIconPlaysBottomRightH[IconPlaysBottomRightH.DragonIcon] = FindTransform("NMDragonConsumeIcon").gameObject; m_maplistIconPlaysBottomRightH[IconPlaysBottomRightH.DiamondToGoldIcon] = FindTransform("NMDiamondToGoldIcon").gameObject; m_maplistIconPlaysBottomRightH[IconPlaysBottomRightH.SpriteIcon] = FindTransform("NMSpriteIcon").gameObject; m_maplistIconPlaysBottomRightH[IconPlaysBottomRightH.WingIcon] = FindTransform("NMWingIcon").gameObject; m_goNMWingIcon2 = FindTransform("NMWingIcon2").gameObject; for (int i = 1; i <= IconPlaysBottomRightH.MaxCount; ++i) { m_listIconPlaysBottomRightHPos.Add(FindTransform("NoramlMainUIBTNListHPos" + i).gameObject); } } // IconPlaysBottomRightV { m_maplistIconPlaysBottomRightV[IconPlaysBottomRightV.AttributeIcon] = FindTransform("NMAttributeIcon").gameObject; m_maplistIconPlaysBottomRightV[IconPlaysBottomRightV.MallConsumeIcon] = FindTransform("NMMallConsumeIcon").gameObject; for (int i = 1; i <= IconPlaysBottomRightV.MaxCount; ++i) { m_listIconPlaysBottomRightVPos.Add(FindTransform("NoramlMainUIBTNListVPos" + i).gameObject); } } // IconPlaysTopRightH { m_maplistIconPlaysTopRightH[IconPlaysTopRightH.AutoTaskPlayIcon] = FindTransform("AutoTaskPlayIcon").gameObject; m_maplistIconPlaysTopRightH[IconPlaysTopRightH.DailyTaskIcon] = FindTransform("XDailyTaskIcon").gameObject; m_maplistIconPlaysTopRightH[IconPlaysTopRightH.ChallengeIcon] = FindTransform("PVEPlayIcon").gameObject; m_maplistIconPlaysTopRightH[IconPlaysTopRightH.ArenaIcon] = FindTransform("PVPPlayIcon").gameObject; m_maplistIconPlaysTopRightH[IconPlaysTopRightH.ChargeRewardIcon] = FindTransform("ChargeRewardIcon").gameObject; for (int i = 0; i < IconPlaysTopRightH.MaxCount; ++i) { m_listIconPlaysTopRightHPos.Add(FindTransform("NormalMainUIPlaysListPos" + i).gameObject); } } // 排行榜和VIP m_goNormalMainUIRanking = FindTransform("NormalMainUIRanking").gameObject; m_goNormalMainUIRanking.SetActive(false); m_goNormalMainUIRankingBtn = FindTransform("NormalMainUIRankingBtn").gameObject; m_tranNormalMainUIRankingBtnOriginPos = FindTransform("NormalMainUIRankingBtnOriginPos"); m_tranNormalMainUIRankingBtnPos = FindTransform("NormalMainUIRankingBtnPos"); m_goNormalMainUIPlayerVIP = FindTransform("NormalMainUIPlayerVIP").gameObject; m_tranNormalMainUIPlayerVIPPos1 = FindTransform("NormalMainUIPlayerVIPPos1"); m_tranNormalMainUIPlayerVIPPos2 = FindTransform("NormalMainUIPlayerVIPPos2"); m_goAutoTaskBtn = m_myTransform.FindChild(m_widgetToFullName["AutoTaskPlayIcon"]).gameObject; m_myTransform.FindChild(m_widgetToFullName["XDailyTaskIcon"]).gameObject.AddComponent<DailyTaskIcon>(); m_myTransform.FindChild(m_widgetToFullName["XDailyTaskIcon"]).BroadcastMessage("HideDailyTaskFinishedNotice", SendMessageOptions.DontRequireReceiver); m_goGOPVEPlayIconNotice = FindTransform("GOPVEPlayIconNotice").gameObject; m_goGOPVPPlayIconNotice = FindTransform("GOPVPPlayIconNotice").gameObject; m_goGOChargeRewardIconNotice = FindTransform("GOChargeRewardIconNotice").gameObject; m_goMallConsumeIconNotice = FindTransform("MallConsumeIconNotice").gameObject; m_goIconPlaysOriginPos = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlaysListOriginPos"]).gameObject; m_goIconPlaysNMOriginPos = m_myTransform.FindChild(m_widgetToFullName["NMBTNListOriginPos"]).gameObject; m_goIconPlaysNMHOriginPos = FindTransform("NMBTNListHOriginPos").gameObject; m_goIconPlaysNMVOriginPos = FindTransform("NMBTNListVOriginPos").gameObject; m_goGODiamondToGoldIconLast = m_myTransform.FindChild(m_widgetToFullName["GODiamondToGoldIconLast"]).gameObject; m_lblDiamondToGoldIconLastTimes = m_myTransform.FindChild(m_widgetToFullName["DiamondToGoldIconLastTimes"]).GetComponent<UILabel>(); m_goNormalMainUIVIPBuffBtn = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIVIPBuffBtn"]).gameObject; m_goGONormalMainUIVIPBuffInfo = m_myTransform.FindChild(m_widgetToFullName["GONormalMainUIVIPBuffInfo"]).gameObject; m_lblNormalMainUIVIPBuffName = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIVIPBuffName"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblNormalMainUIVIPBuffInfoLevel = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIVIPBuffInfoLevel"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblNormalMainUIVIPBuffInfoLastTime = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIVIPBuffInfoLastTime"]).GetComponentsInChildren<UILabel>(true)[0]; m_spNormalMainUIVIPBuffInfoLevelVIPNum0 = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIVIPBuffInfoLevelVIPNum0"]).GetComponentsInChildren<UISprite>(true)[0]; m_spNormalMainUIVIPBuffInfoLevelVIPNum1 = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIVIPBuffInfoLevelVIPNum1"]).GetComponentsInChildren<UISprite>(true)[0]; m_lblChargeRewardIconText = m_myTransform.FindChild(m_widgetToFullName["ChargeRewardIconText"]).GetComponentsInChildren<UILabel>(true)[0]; m_spChargeRewardIconBGUp = m_myTransform.FindChild(m_widgetToFullName["ChargeRewardIconBGUp"]).GetComponentsInChildren<UISprite>(true)[0]; m_goNormalMainUIPlayerExpList = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerExpList"]).gameObject; m_goGONormalMainUIPlayerExpListFG = m_myTransform.FindChild(m_widgetToFullName["GONormalMainUIPlayerExpListFG"]).gameObject; m_lblNormalMainUIPlayerExpListNum = m_myTransform.FindChild(m_widgetToFullName["NormalMainUIPlayerExpListNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_goNormalMainUIPlayerExpList.SetActive(true); AddPlayerExpFG(); m_goArenaCDTipBtnOpen = m_myTransform.FindChild(m_widgetToFullName["ArenaCDTipBtnOpen"]).gameObject; m_goArenaCDTipCountDown = m_myTransform.FindChild(m_widgetToFullName["ArenaCDTipCountDown"]).gameObject; m_lblArenaCDTipCountDownName = m_myTransform.FindChild(m_widgetToFullName["ArenaCDTipCountDownName"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaCDTipCountDownNum = m_myTransform.FindChild(m_widgetToFullName["ArenaCDTipCountDownNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_goDoorOfBuryOpenCDTipBtnOpen = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenCDTipBtnOpen"]).gameObject; m_goDoorOfBuryOpenCDTipCountDown = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenCDTipCountDown"]).gameObject; m_lblDoorOfBuryOpenCDTipCountDownName = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenCDTipCountDownName"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblDoorOfBuryOpenCDTipCountDownNum = m_myTransform.FindChild(m_widgetToFullName["DoorOfBuryOpenCDTipCountDownNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblUpgradePowerCurrentNum = m_myTransform.FindChild(m_widgetToFullName["UpgradePowerCurrentNum"]).GetComponentsInChildren<UILabel>(true)[0]; Initialize(); //EventDispatcher.TriggerEvent("ShowMogoNormalMainUI");//这里有莫名其妙的东西 By MaiFeo m_lblTipText.text = Mogo.GameData.LanguageData.GetContent(180002); m_goNormalMainUIRankingBtnFxPos = FindTransform("NormalMainUIRankingBtnFxPos").gameObject; m_lblNormalMainUIVIPBuffBtnText = FindTransform("NormalMainUIVIPBuffBtnText").GetComponentsInChildren<UILabel>(true)[0]; m_lblNormalMainUIVIPBuffBtnLine = FindTransform("NormalMainUIVIPBuffBtnLine").GetComponentsInChildren<UILabel>(true)[0]; ////////////////////////////////////////////////////////////////////////// // 主界面图标位置 ////////////////////////////////////////////////////////////////////////// m_MainCamera = GameObject.Find("Camera").GetComponent<Camera>(); m_NoramlMainUIBTNListHCam = FindTransform("NoramlMainUIBTNListHCam").GetComponentsInChildren<Camera>(true)[0]; m_NoramlMainUIBTNListVCam = FindTransform("NoramlMainUIBTNListVCam").GetComponentsInChildren<Camera>(true)[0]; m_goNoramlMainUIBTNListH = FindTransform("NoramlMainUIBTNListH").gameObject; m_goNoramlMainUIBTNListV = FindTransform("NoramlMainUIBTNListV").gameObject; m_listNoramlMainUIBTNListHPos.Clear(); for (int pos = 1; pos <= NoramlMainUIBTNListH_Num; pos++) { m_listNoramlMainUIBTNListHPos.Add(FindTransform(string.Format("NormalMainUIBTNListHPos{0}", pos))); } m_listNoramlMainUIBTNListVPos.Clear(); for (int pos = 1; pos <= NoramlMainUIBTNListV_Num; pos++) { m_listNoramlMainUIBTNListVPos.Add(FindTransform(string.Format("NormalMainUIBTNListVPos{0}", pos))); } InitControllerIconAnim(); InitNoramlMainUIBTNListHAnim(); InitNoramlMainUIBTNListVAnim(); InitCommunityIconAnim(); InitHelpTipAnim(); }
/// <summary> /// Initialize the cached values. /// </summary> void Init() { mInitDone = true; if (foreground != null) { mFGWidget = foreground.GetComponent<UIWidget>(); mFGFilled = (mFGWidget != null) ? mFGWidget as UIFilledSprite : null; mFGTrans = foreground.transform; if (fullSize == Vector2.zero) fullSize = foreground.localScale; } else if (mCol != null) { if (fullSize == Vector2.zero) fullSize = mCol.size; } else { Debug.LogWarning("UISlider expected to find a foreground object or a box collider to work with", this); } }
public override void CallWhenLoadResources() { m_instance = this; ID = MFUIManager.MFUIID.BattleMainUI; MFUIManager.GetSingleton().RegisterUI(ID, m_myGameObject); FillFullNameData(m_myTransform); m_goMainUIBottom = m_myTransform.FindChild(m_widgetToFullName["Bottom"]).gameObject; m_goMainUIBottomLeft = m_myTransform.FindChild(m_widgetToFullName["BottomLeft"]).gameObject; m_goMainUIBottomRight = m_myTransform.FindChild(m_widgetToFullName["BottomRight"]).gameObject; m_goMainUITop = m_myTransform.FindChild("Top").gameObject; m_goMainUITopLeft = m_myTransform.FindChild(m_widgetToFullName["TopLeft"]).gameObject; m_goMainUITopRight = m_myTransform.FindChild(m_widgetToFullName["TopRight"]).gameObject; m_goController = m_myTransform.FindChild("BottomLeft/Controller").gameObject; m_goController.AddComponent<ControlStick>(); // 设置各部分控件的Camera Camera camera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0]; m_goMainUIBottom.GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera; m_goMainUIBottomLeft.GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera; m_goMainUIBottomRight.GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera; m_goMainUITop.GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera; m_goMainUITopLeft.GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera; m_goMainUITopRight.GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = camera; m_goController.GetComponentsInChildren<ControlStick>(true)[0].RelatedCamera = camera; m_myTransform.FindChild(m_widgetToFullName["MainUIBG"]).gameObject.AddComponent<TouchControll>(); m_fsNormalAttackCD = m_myTransform.FindChild(m_widgetToFullName["NormalAttackCD"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_goSelfAttack = m_myTransform.FindChild(m_widgetToFullName["SelfAttack"]).gameObject; m_goCancelManaged = m_myTransform.FindChild(m_widgetToFullName["CancelManagedBtn"]).gameObject; m_lblPlayerBlood = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerBloodText"]).GetComponentsInChildren<UILabel>(true)[0]; m_fsPlayerBloodFG = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerBloodFG"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_ssPlayerHead = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerHead"]).GetComponentsInChildren<UISlicedSprite>(true)[0]; m_fsPlayerAnger = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerAngerFG"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsPlayerExp = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerExpFG"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsAffectCD = m_myTransform.FindChild(m_widgetToFullName["AffectCD"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsAffectCD.color = new Color(0.5f, 0.5f, 0.5f); m_fsOutputCD = m_myTransform.FindChild(m_widgetToFullName["OutputCD"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsOutputCD.color = new Color(0.5f, 0.5f, 0.5f); m_fsMoveCD = m_myTransform.FindChild(m_widgetToFullName["MoveCD"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsMoveCD.color = new Color(0.5f, 0.5f, 0.5f); m_fsSpriteSkillCD = FindTransform("MainUISpriteSkillBtnCD").GetComponentsInChildren<UIFilledSprite>(true)[0]; m_fsSpriteSkillCD.color = new Color(0.5f, 0.5f, 0.5f); m_hpBottleCD = m_myTransform.FindChild(m_widgetToFullName["HpCD"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; //m_hpBottleCD.atlas = MogoUIManager.Instance.GetSkillIconAtlas(); m_fsSpecialCD = m_myTransform.FindChild(m_widgetToFullName["SpecialCD"]).GetComponentInChildren<UIFilledSprite>() as UIFilledSprite; m_fsNormalTargetBlood = m_myTransform.FindChild(m_widgetToFullName["NormalTargetBloodFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; //m_fsBossTargetBlood = m_myTransform.FindChild(m_widgetToFullName["BossTargetBloodFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_member1 = m_myTransform.FindChild(m_widgetToFullName["TeamMember1"]).gameObject; m_member2 = m_myTransform.FindChild(m_widgetToFullName["TeamMember2"]).gameObject; m_member3 = m_myTransform.FindChild(m_widgetToFullName["TeamMember3"]).gameObject; m_member1Image = m_myTransform.FindChild(m_widgetToFullName["TeamMember1LevelBG"]).GetComponentsInChildren<UISprite>(true)[0]; m_member2Image = m_myTransform.FindChild(m_widgetToFullName["TeamMember2LevelBG"]).GetComponentsInChildren<UISprite>(true)[0]; m_member3Image = m_myTransform.FindChild(m_widgetToFullName["TeamMember3LevelBG"]).GetComponentsInChildren<UISprite>(true)[0]; m_fsMember1Blood = m_myTransform.FindChild(m_widgetToFullName["TeamMember1BloodFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_fsMember2Blood = m_myTransform.FindChild(m_widgetToFullName["TeamMember2BloodFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_fsMember3Blood = m_myTransform.FindChild(m_widgetToFullName["TeamMember3BloodFG"]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_lblSelfAttack = m_myTransform.FindChild(m_widgetToFullName["SelfAttackText"]).GetComponentsInChildren<UILabel>(true)[0]; m_spSelfAttack = m_myTransform.FindChild(m_widgetToFullName["SelfAttackSprite"]).GetComponentsInChildren<UISprite>(true)[0]; //m_comboAttack = m_myTransform.FindChild(m_widgetToFullName["ComboAttack"]).GetComponentsInChildren<ComboAttack>(true)[0]; m_comboAttack = m_myTransform.FindChild(m_widgetToFullName["ComboAttack"]).gameObject.AddComponent<ComboAttack>(); m_bloodAnim = m_fsPlayerBloodFG.transform.parent.GetComponentsInChildren<MogoBloodAnim>(true)[0]; m_bossBloodAnim0 = m_myTransform.FindChild(m_widgetToFullName["BossTargetBlood"]).GetComponentsInChildren<MogoBloodAnim>(true)[0]; m_smallBossBloodAnim0 = m_myTransform.FindChild(m_widgetToFullName["SmallBossTargetBlood"]).GetComponentsInChildren<MogoBloodAnim>(true)[0]; for (int i = 0; i < 5; ++i) { //////Mogo.Util.LoggerHelper.Debug(i + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!"); m_fsBossTargetBloodList[i] = m_myTransform.FindChild(m_widgetToFullName["BossTargetBloodFG" + i]).GetComponentsInChildren<UIFilledSprite>(true)[0]; m_fsSmallBossTargetBloodList[i] = m_myTransform.FindChild(m_widgetToFullName["SmallBossTargetBloodFG" + i]).GetComponentsInChildren<UIFilledSprite>(true)[0]; } // 左上角玩家信息Pos m_goMainUIPlayerInfo = FindTransform("MainUIPlayerInfo").gameObject; m_vecMainUIPlayerInfoPosDefault = FindTransform("MainUIPlayerInfoPosDefault").transform.localPosition; m_vecMainUIPlayerInfoPosPVP = FindTransform("MainUIPlayerInfoPosPVP").transform.localPosition; // 占塔贡献榜 m_goOccupyTowerRank = FindTransform("OccupyTowerRank").gameObject; m_lblOccupyTowerRankTitle = FindTransform("OccupyTowerRankTitle").GetComponentsInChildren<UILabel>(true)[0]; m_listOccupyTowerRank.Clear(); for (int rank = 1; rank <= MAX_OCCUPY_TOWER_RANK; rank++) { UILabel rankLabel = FindTransform(string.Format("OccupyTowerRank{0}", rank)).GetComponentsInChildren<UILabel>(true)[0]; m_listOccupyTowerRank.Add(rankLabel); } // 占塔战斗信息 m_goOccupyTowerNotice = FindTransform("OccupyTowerNotice").gameObject; m_lblOccupyTowerNoticeCountDownNum = FindTransform("OccupyTowerNoticeCountDownNum").GetComponentsInChildren<UILabel>(true)[0]; m_spOccupyTowerNoticeEnemyBloodFG = FindTransform("OccupyTowerNoticeEnemyBloodFG").GetComponentsInChildren<UISprite>(true)[0]; m_spOccupyTowerNoticeOwnBloodFG = FindTransform("OccupyTowerNoticeOwnBloodFG").GetComponentsInChildren<UISprite>(true)[0]; m_spOccupyTowerNoticeEnemyBloodAnim = FindTransform("OccupyTowerNoticeEnemyBloodAnim").GetComponentsInChildren<UISprite>(true)[0]; m_spOccupyTowerNoticeOwnBloodAnim = FindTransform("OccupyTowerNoticeOwnBloodAnim").GetComponentsInChildren<UISprite>(true)[0]; m_lblOccupyTowerNoticeEnemyBloodNum = FindTransform("OccupyTowerNoticeEnemyBloodNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblOccupyTowerNoticeOwnBloodNum = FindTransform("OccupyTowerNoticeOwnBloodNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblOccupyTowerNoticeEnemyScore = FindTransform("OccupyTowerNoticeEnemyScore").GetComponentsInChildren<UILabel>(true)[0]; m_lblOccupyTowerNoticeOwnScore = FindTransform("OccupyTowerNoticeOwnScore").GetComponentsInChildren<UILabel>(true)[0]; m_occupyTowerNoticeEnemyBloodAnim = FindTransform("OccupyTowerNoticeEnemyBlood").GetComponentsInChildren<MogoBloodAnim>(true)[0]; m_occupyTowerNoticeOwnBloodAnim = FindTransform("OccupyTowerNoticeOwnBlood").GetComponentsInChildren<MogoBloodAnim>(true)[0]; m_lblContributeRankText = m_myTransform.FindChild(m_widgetToFullName["CurrentRankText"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblFirstRank = m_myTransform.FindChild(m_widgetToFullName["FirstRank"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblSecRank = m_myTransform.FindChild(m_widgetToFullName["SecondRank"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblTriRank = m_myTransform.FindChild(m_widgetToFullName["TriRank"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblComboAttackNum = m_myTransform.FindChild(m_widgetToFullName["ComboAttackNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblDamageNum = m_myTransform.FindChild(m_widgetToFullName["DamageNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_lblInstanceCountDown = m_myTransform.FindChild(m_widgetToFullName["InstanceCountDown"]).GetComponentsInChildren<UILabel>(true)[0]; m_goAutoFight = m_myTransform.FindChild(m_widgetToFullName["AutoFightBtn"]).gameObject; m_goAutoFightText = m_myTransform.FindChild(m_widgetToFullName["AutoFightBtnText"]).gameObject; m_goNormalAttackBtn = m_myTransform.FindChild(m_widgetToFullName["NormalAttack"]).gameObject; m_spNormalAttackFG = m_goNormalAttackBtn.transform.FindChild("NormalAttackBGUp").GetComponent<UISprite>(); m_spNormalAttackBG = m_goNormalAttackBtn.transform.FindChild("NormalAttackBGDown").GetComponent<UISprite>(); m_goSkill0Btn = m_myTransform.FindChild(m_widgetToFullName["Move"]).gameObject; m_goSkill1Btn = m_myTransform.FindChild(m_widgetToFullName["Affect"]).gameObject; m_goSkill2Btn = m_myTransform.FindChild(m_widgetToFullName["Output"]).gameObject; m_goSkill2Btn.AddComponent<MogoDebugWidget>(); m_goBottle = m_myTransform.FindChild(m_widgetToFullName["MainUIItem"]).gameObject; m_goSpriteSkillBtn = FindTransform("MainUISpriteSkillBtn").gameObject; m_goCommunityBtn = m_myTransform.FindChild(m_widgetToFullName["Community"]).gameObject; UILabel lblText = m_goAutoFightText.transform.GetComponentsInChildren<UILabel>(true)[0]; if (LanguageData.dataMap.ContainsKey(180000)) { lblText.text = LanguageData.dataMap[180000].content; } m_goAutoFightStateText = m_myTransform.FindChild(m_widgetToFullName["AutoFightStateText"]).gameObject; m_goAutoFightStateText.SetActive(false); // 角色经验条(Bottom) m_goMainUIPlayerExpList = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerExpList"]).gameObject; m_goGOMainUIPlayerExpListFG = m_myTransform.FindChild(m_widgetToFullName["GOMainUIPlayerExpListFG"]).gameObject; m_lblMainUIPlayerExpListNum = m_myTransform.FindChild(m_widgetToFullName["MainUIPlayerExpListNum"]).GetComponentsInChildren<UILabel>(true)[0]; m_goMainUIPlayerExpList.SetActive(true); AddPlayerExpFG(); // 试炼之塔提示信息 m_goGOClimbTowerCurrent = m_myTransform.FindChild(m_widgetToFullName["GOClimbTowerCurrent"]).gameObject; m_spClimbTowerCurrentNum1 = m_myTransform.FindChild(m_widgetToFullName["ClimbTowerCurrentNum1"]).GetComponentsInChildren<UISprite>(true)[0]; m_spClimbTowerCurrentNum2 = m_myTransform.FindChild(m_widgetToFullName["ClimbTowerCurrentNum2"]).GetComponentsInChildren<UISprite>(true)[0]; m_spClimbTowerCurrentNum3 = m_myTransform.FindChild(m_widgetToFullName["ClimbTowerCurrentNum3"]).GetComponentsInChildren<UISprite>(true)[0]; // 左上角倒计时 m_goTheCountDown1 = FindTransform("TheCountDown1").gameObject; m_goTheCountDown2 = FindTransform("TDCountDown").gameObject; m_lblTheCountDown1Num = FindTransform("TheCountDown1Num").GetComponentsInChildren<UILabel>(true)[0]; m_lblTheCountDown2Num = FindTransform("TDCountDown").GetComponentsInChildren<UILabel>(true)[0]; m_CDPosClimbTower = FindTransform("CDPosClimbTower").transform.localPosition; m_goDiamondProtectBtn = m_myTransform.FindChild(m_widgetToFullName["DiamondProtectBtn"]).gameObject; m_goBuildingProtectBtn = m_myTransform.FindChild(m_widgetToFullName["BuildingProtectBtn"]).gameObject; // 精灵技能施放 m_goMainUISpriteSkill = FindTransform("MainUISpriteSkill").gameObject; LoadFingerTailUI(); Initialize(); MFUIGameObjectPool.GetSingleton().NotRegisterGameObjectList(ID); m_myGameObject.SetActive(false); if (MogoWorld.thePlayer != null) { MogoWorld.thePlayer.UpdateSkillToManager(); } #region 塔防血条 go_tdNotice = m_myTransform.FindChild(m_widgetToFullName["TDNotice"]).gameObject; go_tdTip = m_myTransform.FindChild(m_widgetToFullName["TDTip"]).gameObject; sp_tdBlood = m_myTransform.FindChild(m_widgetToFullName["TDBloodFG"]).gameObject.GetComponentsInChildren<UISprite>(true)[0]; lbl_tdWave = m_myTransform.FindChild(m_widgetToFullName["TDWaveText"]).gameObject.GetComponentsInChildren<UILabel>(true)[0]; lbl_tdTip = m_myTransform.FindChild(m_widgetToFullName["TDTipText"]).gameObject.GetComponentsInChildren<UILabel>(true)[0]; #endregion }