void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); m_lblArenaUIGoldNum = FindTransform("ArenaUIGoldNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIDiamondNum = FindTransform("ArenaUIDiamondNum").GetComponentsInChildren <UILabel>(true)[0]; m_spArenaUITitleProgressBar = FindTransform("ArenaUITitleProgressBar").GetComponentsInChildren <UISprite>(true)[0]; m_lblArenaUITitleProgressBarNum = FindTransform("ArenaUITitleProgressBarNum").GetComponentsInChildren <UILabel>(true)[0]; m_spArenaUIPlayerMedalIcon = FindTransform("ArenaUIPlayerMedalIcon").GetComponentsInChildren <UISprite>(true)[0]; m_lblArenaUIPlayerMedalTitle = FindTransform("ArenaUIPlayerMedalTitle").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIChallengeTimesNum = FindTransform("ArenaUIChallengeTimesNum").GetComponentsInChildren <UILabel>(true)[0]; m_goArenaUIChallengeCD = FindTransform("ArenaUIChallengeCD").gameObject; m_lblArenaUIChallengeCDNum = FindTransform("ArenaUIChallengeCDNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIPlyNameText = FindTransform("ArenaUIPlyNameText").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIPlyForceNum = FindTransform("ArenaUIPlyForceNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIPlyDayScoreNum = FindTransform("ArenaUIPlyDayScoreNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIPlyWeekScoreNum = FindTransform("ArenaUIPlyWeekScoreNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIEnyForceNum = FindTransform("ArenaUIEnyForceNum").GetComponentsInChildren <UILabel>(true)[0]; m_lblArenaUIEnyLevelNum = FindTransform("ArenaUIEnyLevelNum").GetComponentsInChildren <UILabel>(true)[0]; m_spArenaUIEnemyRevengeIcon = FindTransform("ArenaUIEnemyRevengeIcon").GetComponentsInChildren <UISprite>(true)[0]; m_lblArenaUIEnemyRevengeName = FindTransform("ArenaUIEnemyRevengeName").GetComponentsInChildren <UILabel>(true)[0]; m_spArenaUIEnemyStrongIcon = FindTransform("ArenaUIEnemyStrongIcon").GetComponentsInChildren <UISprite>(true)[0]; m_lblArenaUIEnemyStrongName = FindTransform("ArenaUIEnemyStrongName").GetComponentsInChildren <UILabel>(true)[0]; m_spArenaUIEnemyWeakIcon = FindTransform("ArenaUIEnemyWeakIcon").GetComponentsInChildren <UISprite>(true)[0]; m_lblArenaUIEnemyWeakName = FindTransform("ArenaUIEnemyWeakName").GetComponentsInChildren <UILabel>(true)[0]; m_goArenaUIEnemyArrow = FindTransform("ArenaUIEnemyArrow").gameObject; m_goArenaUIEnemyRevengeArrowPos = FindTransform("ArenaUIEnemyRevengeArrowPos").gameObject; m_goArenaUIEnemyStrongArrowPos = FindTransform("ArenaUIEnemyStrongArrowPos").gameObject; m_goArenaUIEnemyWeakArrowPos = FindTransform("ArenaUIEnemyWeakArrowPos").gameObject; m_goArenaUIBtnRefresh = FindTransform("ArenaUIBtnRefresh").gameObject; m_goArenaUIBtnRewardNotice = FindTransform("ArenaUIBtnRewardNotice").gameObject; // 玩家自己模型 m_ArenaUIPlyModelCamera = FindTransform("ArenaUIPlyModelCamera").GetComponentsInChildren <Camera>(true)[0]; m_ArenaUIPlyModelCamera.GetComponentsInChildren <UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.Find("Camera").GetComponentsInChildren <Camera>(true)[0]; LoadPlayerModelByVocation(); // 敌方模型 m_goArenaUIEnyModelShowCase = FindTransform("ArenaUIEnyModelShowCase").gameObject; m_modelShowCase = m_goArenaUIEnyModelShowCase.AddComponent <ModelShowCase>(); m_modelShowCase.left = FindTransform("ArenaUIEnyModelViewTL"); m_modelShowCase.right = FindTransform("ArenaUIEnyModelViewBR"); Initialize(); }
void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); m_lblArenaUIGoldNum = FindTransform("ArenaUIGoldNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIDiamondNum = FindTransform("ArenaUIDiamondNum").GetComponentsInChildren<UILabel>(true)[0]; m_spArenaUITitleProgressBar = FindTransform("ArenaUITitleProgressBar").GetComponentsInChildren<UISprite>(true)[0]; m_lblArenaUITitleProgressBarNum = FindTransform("ArenaUITitleProgressBarNum").GetComponentsInChildren<UILabel>(true)[0]; m_spArenaUIPlayerMedalIcon = FindTransform("ArenaUIPlayerMedalIcon").GetComponentsInChildren<UISprite>(true)[0]; m_lblArenaUIPlayerMedalTitle = FindTransform("ArenaUIPlayerMedalTitle").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIChallengeTimesNum = FindTransform("ArenaUIChallengeTimesNum").GetComponentsInChildren<UILabel>(true)[0]; m_goArenaUIChallengeCD = FindTransform("ArenaUIChallengeCD").gameObject; m_lblArenaUIChallengeCDNum = FindTransform("ArenaUIChallengeCDNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIPlyNameText = FindTransform("ArenaUIPlyNameText").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIPlyForceNum = FindTransform("ArenaUIPlyForceNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIPlyDayScoreNum = FindTransform("ArenaUIPlyDayScoreNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIPlyWeekScoreNum = FindTransform("ArenaUIPlyWeekScoreNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIEnyForceNum = FindTransform("ArenaUIEnyForceNum").GetComponentsInChildren<UILabel>(true)[0]; m_lblArenaUIEnyLevelNum = FindTransform("ArenaUIEnyLevelNum").GetComponentsInChildren<UILabel>(true)[0]; m_spArenaUIEnemyRevengeIcon = FindTransform("ArenaUIEnemyRevengeIcon").GetComponentsInChildren<UISprite>(true)[0]; m_lblArenaUIEnemyRevengeName = FindTransform("ArenaUIEnemyRevengeName").GetComponentsInChildren<UILabel>(true)[0]; m_spArenaUIEnemyStrongIcon = FindTransform("ArenaUIEnemyStrongIcon").GetComponentsInChildren<UISprite>(true)[0]; m_lblArenaUIEnemyStrongName = FindTransform("ArenaUIEnemyStrongName").GetComponentsInChildren<UILabel>(true)[0]; m_spArenaUIEnemyWeakIcon = FindTransform("ArenaUIEnemyWeakIcon").GetComponentsInChildren<UISprite>(true)[0]; m_lblArenaUIEnemyWeakName = FindTransform("ArenaUIEnemyWeakName").GetComponentsInChildren<UILabel>(true)[0]; m_goArenaUIEnemyArrow = FindTransform("ArenaUIEnemyArrow").gameObject; m_goArenaUIEnemyRevengeArrowPos = FindTransform("ArenaUIEnemyRevengeArrowPos").gameObject; m_goArenaUIEnemyStrongArrowPos = FindTransform("ArenaUIEnemyStrongArrowPos").gameObject; m_goArenaUIEnemyWeakArrowPos = FindTransform("ArenaUIEnemyWeakArrowPos").gameObject; m_goArenaUIBtnRefresh = FindTransform("ArenaUIBtnRefresh").gameObject; m_goArenaUIBtnRewardNotice = FindTransform("ArenaUIBtnRewardNotice").gameObject; // 玩家自己模型 m_ArenaUIPlyModelCamera = FindTransform("ArenaUIPlyModelCamera").GetComponentsInChildren<Camera>(true)[0]; m_ArenaUIPlyModelCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0]; LoadPlayerModelByVocation(); // 敌方模型 m_goArenaUIEnyModelShowCase = FindTransform("ArenaUIEnyModelShowCase").gameObject; m_modelShowCase = m_goArenaUIEnyModelShowCase.AddComponent<ModelShowCase>(); m_modelShowCase.left = FindTransform("ArenaUIEnyModelViewTL"); m_modelShowCase.right = FindTransform("ArenaUIEnyModelViewBR"); Initialize(); }