本文整理汇总了C#中Camera.GetComponentsInChildren方法的典型用法代码示例。如果您正苦于以下问题:C# Camera.GetComponentsInChildren方法的具体用法?C# Camera.GetComponentsInChildren怎么用?C# Camera.GetComponentsInChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera
的用法示例。
在下文中一共展示了Camera.GetComponentsInChildren方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Awake
void Awake()
{
instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_spRefreshCtrl = FindTransform("ChallengeUIRefreshCtrl").GetComponentsInChildren<UISprite>(true)[0];
m_tranChallengeGridList = FindTransform("ChallengeGridList");
m_gridListCamera = FindTransform("ChallengeGridListCamera").GetComponentsInChildren<Camera>(true)[0];
m_gridListCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentInChildren<Camera>();
m_gridListMyDragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_gridListMyDragableCamera.LeftArrow = FindTransform("ChallengeUIArrowL").gameObject;
m_gridListMyDragableCamera.RightArrow = FindTransform("ChallengeUIArrowR").gameObject;
m_goChallengeUIPageDOTList = FindTransform("ChallengeUIPageDOTList").gameObject;
gridImgName[(int)ChallengeGridID.ClimbTower] = "tz-slzt";
gridImgName[(int)ChallengeGridID.DoorOfBury] = "tz-jmzm";
gridImgName[(int)ChallengeGridID.Sanctuary] = "tz-tfjl";
//gridImgName[(int)ChallengeGridID.DragonMatch] = "tz-tfjl";
//gridImgName[(int)ChallengeGridID.OgreMustDie] = "tz-tfjl";
gridImgName[(int)ChallengeGridID.DragonMatch] = "tz-flds";
gridImgName[(int)ChallengeGridID.OgreMustDie] = "tz-zjns";
gridImgName[(int)ChallengeGridID.OccupyTower] = "tz-3v3";
Initialize();
}
示例2: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
Camera camera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
m_camActivityGridList = FindTransform("TimeLimitActivityGridListCamera").GetComponentsInChildren<Camera>(true)[0];
m_camActivityGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = camera;
m_dragableCameraActivityGridList = m_camActivityGridList.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_dragableCameraActivityGridList.LeftArrow = FindTransform("TimeLimitActivityUIActivityListArrowL").gameObject;
m_dragableCameraActivityGridList.RightArrow = FindTransform("TimeLimitActivityUIActivityListArrowR").gameObject;
m_goActivityGridList = FindTransform("TimeLimitActivityGridList").gameObject;
m_goTimeLimitActivityUIActivityListUI = FindTransform("TimeLimitActivityUIActivityList").gameObject;
m_goGOTimeLimitActivityUIActivityListPage = FindTransform("GOTimeLimitActivityUIActivityListPage").gameObject;
m_goTimeLimitActivityUIActivityInfoListUI = FindTransform("TimeLimitActivityUIActivityInfoList").gameObject;
m_tranTimeLimitActivityInfoGridList = FindTransform("TimeLimitActivityInfoGridList");
m_infoGridListMogoListImproved = m_tranTimeLimitActivityInfoGridList.GetComponentsInChildren<MogoListImproved>(true)[0];
m_infoGridListMogoListImproved.LeftArrow = FindTransform("TimeLimitActivityUIActivityInfoArrowL").gameObject;
m_infoGridListMogoListImproved.RightArrow = FindTransform("TimeLimitActivityUIActivityInfoArrowR").gameObject;
m_timeLimitActivityGridListCameraFX = FindTransform("TimeLimitActivityGridListCameraFX").GetComponentsInChildren<Camera>(true)[0];
m_timeLimitActivityGridListCameraFX.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = camera;
m_goTimeLimitActivityGridListParticleAnimRoot = FindTransform("TimeLimitActivityGridListParticleAnimRoot").gameObject;
m_goTimeLimitActivityInfoGridListFx = FindTransform("TimeLimitActivityInfoGridListFx").gameObject;
Initialize();
EventDispatcher.TriggerEvent(Events.OperationEvent.GetActivityMessage);
}
示例3: Awake
void Awake()
{
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_instanceRewardItemList = FindTransform("InstancePassRewardItemList");
m_camItemList = FindTransform("InstancePassRewardItemListCamera").GetComponentsInChildren<Camera>(true)[0];
m_camItemList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
for (int i = 0; i < 5; ++i)
{
Mogo.Util.LoggerHelper.Debug("InstancePassRewardItemStartPos/InstancePassReward" +( i + 1).ToString() + "ItemStartPos");
m_vec3StartPos[i] = FindTransform("InstancePassReward" + (i + 1).ToString() + "ItemStartPos").localPosition;
}
m_mbOK = FindTransform("InstancePassRewardUIOK").GetComponentsInChildren<MogoButton>(true)[0];
m_goGOInstancePassRewardUI = FindTransform("GOInstancePassRewardUI").gameObject;
m_goGOInstancePassRewardUI.SetActive(false);
m_goInstancePassRewardUILoseText = FindTransform("InstancePassRewardUILoseText").gameObject;
m_goInstancePassRewardUIWinText = FindTransform("InstancePassRewardUIWinText").gameObject;
m_goInstancePassRewardUIWinText.SetActive(false);
// 胜利动画
m_goPassRewardUIWinTextSP = FindTransform("PassRewardUIWinTextSP").gameObject;
m_goPassRewardUIWinTextBG = FindTransform("PassRewardUIWinTextBG").gameObject;
m_goPassReweardUITopLine = FindTransform("PassRewardUIWinTextBGTopLine").gameObject;
m_goPassReweardUIBottomLine = FindTransform("PassRewardUIWinTextBGBottomLine").gameObject;
}
示例4: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_camLoginRewardGridList = m_myTransform.FindChild(m_widgetToFullName["LoginRewardGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
m_dragableCameraLoginRewardGridList = m_camLoginRewardGridList.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_goLoginRewardGridList = m_myTransform.FindChild(m_widgetToFullName["LoginRewardGridList"]).gameObject;
m_uilLoginTitle = m_myTransform.FindChild(m_widgetToFullName["LoginRewardDialogTitle"]).GetComponentsInChildren<UILabel>(true)[0];
m_camLoginRewardGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
// 提示箭头
m_dragableCameraLoginRewardGridList.LeftArrow = FindTransform("LoginRewardUIArrowL").gameObject;
m_dragableCameraLoginRewardGridList.RightArrow = FindTransform("LoginRewardUIArrowR").gameObject;
Initialize();
EventDispatcher.TriggerEvent(Events.OperationEvent.GetLoginMessage);
// EventDispatcher.TriggerEvent(MarketEvent.DownloadLoginMarket);
}
示例5: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_camAttributeGridList = m_myTransform.FindChild(m_widgetToFullName["AttributeRewardGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
m_camAttributeGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
m_goAttributeGridList = m_myTransform.FindChild(m_widgetToFullName["AttributeRewardGridList"]).gameObject;
Initialize();
EventDispatcher.TriggerEvent(Events.OperationEvent.GetAchievementMessage);
}
示例6: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_tranEquipRecommendUIEquipList = FindTransform("EquipRecommendUIEquipList");
m_equipListCamera = FindTransform("EquipRecommendUIEquipListCamera").GetComponentsInChildren<Camera>(true)[0];
m_equipListCamera.GetComponent<UIViewport>().sourceCamera = GameObject.Find("Camera").GetComponent<Camera>();
m_dragableCamera = m_equipListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_equipListcameraInitPos = m_equipListCamera.transform.localPosition;
m_goEquipRecommendUIArrowB = FindTransform("EquipRecommendUIArrowB").gameObject;
FindTransform("EquipRecommendUIBtnClose").gameObject.AddComponent<EquipRecommendUIButton>();
Initialize();
}
示例7: LoadResourceInsteadOfAwake
public void LoadResourceInsteadOfAwake()
{
if (m_bLoadResourceInsteadOfAwake)
return;
m_bLoadResourceInsteadOfAwake = true;
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_tranUIGridlList = FindTransform("DragonMatchRecordUIGridList");
m_gridListCamera = FindTransform("DragonMatchRecordUIGridListCamera").GetComponentsInChildren<Camera>(true)[0];
m_camInitPos = m_gridListCamera.transform.localPosition;
m_gridListMyDragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_goDragonMatchRecordUIArrow = FindTransform("DragonMatchRecordUIArrow").gameObject;
m_lblDragonMatchRecordUITime = FindTransform("DragonMatchRecordUITime").GetComponentsInChildren<UILabel>(true)[0];
Initialize();
}
示例8: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_tranUIGridlList = FindTransform("EnergyNoEnoughUIGridList");
m_gridListCamera = FindTransform("EnergyNoEnoughUIGridListCamera").GetComponentsInChildren<Camera>(true)[0];
m_camInitPos = m_gridListCamera.transform.localPosition;
m_dragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_dragableCamera.LeftArrow = FindTransform("EnergyNoEnoughUIArrowUp").gameObject;
m_dragableCamera.RightArrow = FindTransform("EnergyNoEnoughUIArrowDown").gameObject;
m_lblEnergyNoEnoughUIProgressBarText = FindTransform("EnergyNoEnoughUIProgressBarText").GetComponentsInChildren<UILabel>(true)[0];
m_lblEnergyNoEnoughUITipText = FindTransform("EnergyNoEnoughUITipText").GetComponentsInChildren<UILabel>(true)[0];
SetEnergyRecover();
m_goEnergyNoEnoughUIProgressBar = FindTransform("EnergyNoEnoughUIProgressBar").gameObject;
m_chooseWayMogoSingleButtonList = FindTransform("EnergyNoEnoughUIChooseWay").GetComponentsInChildren<MogoSingleButtonList>(true)[0];
FindTransform("EnergyNoEnoughUIBtnClose").gameObject.AddComponent<EnergyNoEnoughUIButton>();
FindTransform("ChooseWay1").gameObject.AddComponent<EnergyNoEnoughUIButton>();
FindTransform("ChooseWay2").gameObject.AddComponent<EnergyNoEnoughUIButton>();
FindTransform("ChooseWay3").gameObject.AddComponent<EnergyNoEnoughUIButton>();
m_tabTitleLabelList[0] = FindTransform("ChooseWay1TextTitle").GetComponentsInChildren<UILabel>(true)[0];
m_tabTitleLabelList[1] = FindTransform("ChooseWay2TextTitle").GetComponentsInChildren<UILabel>(true)[0];
m_tabTitleLabelList[2] = FindTransform("ChooseWay3TextTitle").GetComponentsInChildren<UILabel>(true)[0];
m_tabDescLabelList[0] = FindTransform("ChooseWay1TextDesc").GetComponentsInChildren<UILabel>(true)[0];
m_tabDescLabelList[1] = FindTransform("ChooseWay2TextDesc").GetComponentsInChildren<UILabel>(true)[0];
m_tabDescLabelList[2] = FindTransform("ChooseWay3TextDesc").GetComponentsInChildren<UILabel>(true)[0];
for (int i = 0; i <= 2; i++)
{
EnergyNoEnoughUITabUp(i);
}
CurrentDownTab = (int)EnergyNoEnoughUITab.BuyEnergyTab;
Initialize();
}
示例9: Awake
void Awake()
{
m_instance = gameObject.GetComponent<LevelNoEnoughUIViewManager>();
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_tranUIGridlList = FindTransform("LevelNoEnoughUIGridList");
m_gridListCamera = FindTransform("LevelNoEnoughUIGridListCamera").GetComponentsInChildren<Camera>(true)[0];
m_camInitPos = m_gridListCamera.transform.localPosition;
m_dragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_dragableCamera.LeftArrow = FindTransform("LevelNoEnoughUIArrowUp").gameObject;
m_dragableCamera.RightArrow = FindTransform("LevelNoEnoughUIArrowDown").gameObject;
m_goLevelNoEnoughUIProgressBar = FindTransform("LevelNoEnoughUIProgressBar").gameObject;
m_lblLevelNoEnoughUIProgressBarCurLevel = FindTransform("LevelNoEnoughUIProgressBarCurLevel").GetComponentsInChildren<UILabel>(true)[0];
m_lblLevelNoEnoughUIProgressBarNextLevel = FindTransform("LevelNoEnoughUIProgressBarNextLevel").GetComponentsInChildren<UILabel>(true)[0];
m_lblLevelNoEnoughUITipText = FindTransform("LevelNoEnoughUITipText").GetComponentsInChildren<UILabel>(true)[0];
FindTransform("LevelNoEnoughUIBtnClose").gameObject.AddComponent<LevelNoEnoughUIButton>();
Initialize();
}
示例10: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_tranInstanceBossTreasureUIGridlList = m_myTransform.FindChild(m_widgetToFullName["InstanceBossTreasureUIGridList"]);
m_gridListCamera = m_myTransform.FindChild(m_widgetToFullName["InstanceBossTreasureUIGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
m_camRewardItemListInitPos = m_gridListCamera.transform.localPosition;
m_gridListMyDragableCamera = m_gridListCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_gridListMyDragableCamera.LeftArrow = FindTransform("InstanceBossTreasureUIArrowL").gameObject;
m_gridListMyDragableCamera.RightArrow = FindTransform("InstanceBossTreasureUIArrowR").gameObject;
FindTransform("InstanceBossTreasureUIBtnOK").gameObject.AddComponent<InstanceBossTreasureUIButton>();
m_gridListCameraFX = FindTransform("InstanceBossTreasureUIGridListCameraFX").GetComponentsInChildren<Camera>(true)[0];
m_tranInstanceBossTreasureUIGridListFX = FindTransform("InstanceBossTreasureUIGridListFX");
// Boss宝箱奖励UI
m_goInstanceBossTreasureUIRewardUI = FindTransform("InstanceBossTreasureUIRewardUI").gameObject;
m_goInstanceBossTreasureUIRewardUI.SetActive(false);
m_listInstanceBossTreasureUIRewardUIInfo.Clear();
m_listInstanceBossTreasureUIRewardUIInfoText.Clear();
for (int i = 1; i <= MAX_REWARD_COUNT; i++)
{
GameObject goReward = FindTransform("InstanceBossTreasureUIRewardUIInfo" + i).gameObject;
m_listInstanceBossTreasureUIRewardUIInfo.Add(goReward);
m_listInstanceBossTreasureUIRewardUIInfoText.Add(goReward.GetComponentsInChildren<UILabel>(true)[0]);
}
// ChineseData
FindTransform("InstanceBossTreasureUITitle").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46982);
FindTransform("InstanceBossTreasureUITip").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(46983);
Initialize();
}
示例11: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
Camera cam = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIBottomRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUITopRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUITopLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIBottomRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUILeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBottomRight"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseServerUITop"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["ChooseServerUITopLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBottomLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITopLeft"]).GetComponentsInChildren<UIAnchor>(true)[0].uiCamera = cam;
m_camChooseServerGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIServerGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
m_camChooseServerGridList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = cam;
m_dragableCameraChooseServerGridList = m_camChooseServerGridList.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_dragableCameraChooseServerGridList.LeftArrow = FindTransform("ChooseServerUIArrowL").gameObject;
m_dragableCameraChooseServerGridList.RightArrow = FindTransform("ChooseServerUIArrowR").gameObject;
m_lblCreateCharacterText = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUITitleText"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblJobName = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobInfoName"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblJobInfo = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobInfoDetail"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblCharacterNameInput = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIInput"]).GetComponentsInChildren<UIInput>(true)[0];
m_lblRecommendServerName = m_myTransform.FindChild(m_widgetToFullName["RecommendServerUIServerName"]).GetComponentsInChildren<UILabel>(true)[0];
m_goCreateCharacterDetailUIEnterBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtn"]).gameObject;
m_lblEnter = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtnText"]).GetComponentsInChildren<UILabel>(true)[0];
m_spCreateCharacterDetailUIEnterBtnBGUp = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIEnterBtnBGUp"]).GetComponentsInChildren<UISprite>(true)[0];
m_goCharacterNameInput = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIInput"]).gameObject;
m_goRandomBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIRandomBtn"]).gameObject;
m_goChooseCharcterGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseCharacterUIList"]).gameObject;
m_goJobAttrList = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobAttrList"]).gameObject;
m_goChooseServerGridList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerUIServerGridList"]).gameObject;
m_goCreateCharacterUIBackBtn = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterUIBackBtn"]).gameObject;
m_goChooseCharacterUI = m_myTransform.FindChild("ChooseCharacterUI").gameObject;
m_goChooseServerUI = m_myTransform.FindChild("ChooseServerUI").gameObject;
m_goCreateCharacterDetailUI = m_myTransform.FindChild("CreateCharacterDetailUI").gameObject;
m_goCreateCharacterUI = m_myTransform.FindChild("CreateCharacterUI").gameObject;
m_goRecommendServerUI = m_myTransform.FindChild("RecommendServerUI").gameObject;
m_goChooseServerGridPageList = m_myTransform.FindChild(m_widgetToFullName["ChooseServerPageList"]).gameObject;
m_MTBChooseCharacterUIServer = m_myTransform.FindChild("ChooseCharacterUI/ChooseCharacterUIBottomLeft/ChooseCharcterUIServerBtn").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
m_MTBCreateCharacterUIServer = m_myTransform.FindChild("CreateCharacterUI/CreateCharacterUIBottomRight/CreateCharacterUIServerBtn").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
m_MTBLatelyLog0 = m_myTransform.FindChild("ChooseServerUI/ChooseServerUILatelyLogBtn0").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
m_MTBLatelyLog1 = m_myTransform.FindChild("ChooseServerUI/ChooseServerUILatelyLogBtn1").GetComponentsInChildren<MogoTwoStatusButton>(true)[0];
m_goCreateCharacterDetailUIJobIconList = m_myTransform.FindChild(m_widgetToFullName["CreateCharacterDetailUIJobIconList"]).gameObject;
m_spResCtrl = m_myTransform.FindChild(m_widgetToFullName["NewLoginUIResCtrl"]).GetComponentsInChildren<UISprite>(true)[0];
m_atlasCanRelease = m_spResCtrl.atlas;
m_goCurrentUI = m_goChooseCharacterUI;
for (int i = 0; i < 4; ++i)
{
AssetCacheMgr.GetUIInstance("ChooseCharcterUIGrid.prefab", (prefab, id, go) =>
{
GameObject obj = (GameObject)go;
obj.transform.parent = m_goChooseCharcterGridList.transform;
obj.transform.localPosition = new Vector3(0, -m_listChooseCharacterGrid.Count * CHOOSECHARACTERGRIDHEIGHT, 0);
obj.transform.localScale = new Vector3(1, 1, 1);
//obj.GetComponentsInChildren<ChooseCharacterUIGrid>(true)[0].Id = m_listChooseCharacterGrid.Count;
obj.AddComponent<ChooseCharacterUIGrid>().Id = m_listChooseCharacterGrid.Count;
m_goChooseCharcterGridList.GetComponentsInChildren<MogoSingleButtonList>(true)[0].SingleButtonList.Add(obj.GetComponentsInChildren<MogoSingleButton>(true)[0]);
m_listChooseCharacterGrid.Add(obj);
if (m_listChooseCharacterGrid.Count == 4)
{
TruelyFillChooseCharacterGridData();
TruelySetCharacterGridDown();
MogoGlobleUIManager.Instance.ShowWaitingTip(false);
}
});
}
for (int i = 0; i < 3; ++i)
{
//.........这里部分代码省略.........
示例12: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
Initialize();
m_dragCamera = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogIconListCamera"]).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("ComposeDialogIconListArrowU").gameObject;
m_dragableCamera.RightArrow = FindTransform("ComposeDialogIconListArrowD").gameObject;
m_transPanelTable = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogIconListPanelTable"]);
m_goGOComposeDialogBodyPearlUp = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlUp"]).gameObject;
m_goGOComposeDialogBodyPearlLeft = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlLeft"]).gameObject;
m_goGOComposeDialogBodyPearlRight = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlRight"]).gameObject;
m_goGOComposeDialogBodyPearlFinal = m_myTransform.FindChild(m_widgetToFullName["GOComposeDialogBodyPearlFinal"]).gameObject;
m_goGOComposeDialogBodyPearlUp.AddComponent<InventoryGrid>();
m_goGOComposeDialogBodyPearlLeft.AddComponent<InventoryGrid>();
m_goGOComposeDialogBodyPearlRight.AddComponent<InventoryGrid>();
m_goGOComposeDialogBodyPearlFinal.AddComponent<InventoryGrid>();
m_ssComposePearlLeft = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlLeft"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_ssComposePearlRight = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlRight"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_ssComposePearlUp = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlUp"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_ssComposePearlFinal = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyPearlFinal"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_goComposeNowBtn = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogComposeNow"]).gameObject;
m_goComposeBtn = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogCompose"]).gameObject;
for (int i = 0; i < 9; ++i)
{
m_bGridStatus[i] = false;
}
m_texUIBG = m_myTransform.FindChild(m_widgetToFullName["ComposeDialogBodyBGThing0"]).GetComponentsInChildren<UITexture>(true)[0];
}
示例13: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
Initialize();
m_transPackageItemList = m_myTransform.FindChild(m_widgetToFullName["InsetDialogPackageItemList"]);
m_transInsetDialogIconList = m_myTransform.FindChild(m_widgetToFullName["InsetDialogIconList"]);
m_transInsetHoleList = m_myTransform.FindChild(m_widgetToFullName["InsetDialogBody"]);
m_dragCamera = FindTransform("InsetDialogPackageItemListCamera").GetComponentsInChildren<Camera>(true)[0];
m_dragCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];
m_dragIconCamera = FindTransform("InsetDialogIconListCamera").GetComponentsInChildren<Camera>(true)[0];
m_dragIconCamera.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("Camera").GetComponentsInChildren<Camera>(true)[0];
m_dragIconCamera.GetComponentsInChildren<UIViewport>(true)[0].topLeft = GameObject.Find("EquipmentUIIconListBGTopLeft").transform;
m_dragIconCamera.GetComponentsInChildren<UIViewport>(true)[0].bottomRight = GameObject.Find("EquipmentUIIconListBGBottomRight").transform;
m_dragableIconCamera = m_dragIconCamera.GetComponentsInChildren<MyDragableCamera>(true)[0];
m_dragableIconCamera.LeftArrow = FindTransform("InsetDialogIconListArrowU").gameObject;
m_dragableIconCamera.RightArrow = FindTransform("InsetDialogIconListArrowD").gameObject;
m_ssInsetEquipmentIcon = m_myTransform.FindChild(m_widgetToFullName["InsetDialogEquipFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_ssInsetEquipmentIconBG = m_myTransform.FindChild(m_widgetToFullName["InsetDialogEquipBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_goPackageArea = m_myTransform.FindChild(m_widgetToFullName["InsetDialogPackageListPos"]).gameObject;
m_goInsetDialogDiamondTip = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoTip"]).gameObject;
m_lblDiamondTipDesc = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailEffectNum"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblDiamondTipLevel = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailLevelNum"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblDiamondTipName = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoNameText"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblDiamondTipType = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailTypeNum"]).GetComponentsInChildren<UILabel>(true)[0];
m_ssDiamondTipIcon = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageFG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_ssDiamondTipIconBG = m_myTransform.FindChild(m_widgetToFullName["DiamondInfoDetailImageBG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_jewelHoleObj = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole"]).gameObject;
m_jewelHole1 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole0"]).gameObject;
m_jewelHole2 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole1"]).gameObject;
m_jewelHole3 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole2"]).gameObject;
m_jewelHole4 = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole3"]).gameObject;
m_myTransform.FindChild(m_widgetToFullName["InsetDialog1BGMask"]).gameObject.AddComponent<InsetBGMask>();
m_jewelHoleList = new List<GameObject>();
m_jewelHoleList.Add(m_jewelHole1);
m_jewelHoleList.Add(m_jewelHole2);
m_jewelHoleList.Add(m_jewelHole3);
m_jewelHoleList.Add(m_jewelHole4);
m_jewleHoleOriginalPos = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHolePos"]).localPosition;
m_dialog1 = m_myTransform.FindChild(m_widgetToFullName["InsetDialog1"]).gameObject;
m_dialog2 = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2"]).gameObject;
m_dialog2InfoDetail = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2Info"]).gameObject;
m_dialog2Title = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2TopTitle"]).GetComponentsInChildren<UILabel>(true)[0]; ;
m_dialog2EquipIconFg = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2IconFg"]).GetComponentsInChildren<UISprite>(true)[0];
m_dialog2EquipIconBg = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2IconBg"]).GetComponentsInChildren<UISprite>(true)[0];
m_dialog2EquipName = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2EquipName"]).GetComponentsInChildren<UILabel>(true)[0];
m_dialog2LevelNeed = m_myTransform.FindChild(m_widgetToFullName["InsetDialog2NeedLevel"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblJewelListDesc = m_myTransform.FindChild(m_widgetToFullName["InsetDialogPackageText"]).GetComponentsInChildren<UILabel>(true)[0];
m_texInsetSucessSign = m_myTransform.FindChild(m_widgetToFullName["InsetUISucessSign"]).GetComponentsInChildren<UITexture>(true)[0];
m_texComposeSucessSign = m_myTransform.FindChild(m_widgetToFullName["InsetUIComposeSucessSign"]).GetComponentsInChildren<UITexture>(true)[0];
m_myTransform.FindChild(m_widgetToFullName["InsetDialog1Buy"]).gameObject.AddComponent<MogoUIListener>().MogoOnClick =
() =>
{
EventDispatcher.TriggerEvent(InsetManager.ON_BUY);
};
for (int i = 0; i < 4; ++i)
{
m_arrInsetHoleIcon[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "FG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_arrInsetHoleUnloadSign[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "Unload"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_arrInsetHoleUpSign[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "Update"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_arrInsetHoleTooltip[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "ToolTip"]).gameObject;
m_arrInsetHoleBGDown[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "BG"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_arrInsetHoleBGUp[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "BGUp"]).GetComponentsInChildren<UISlicedSprite>(true)[0];
m_arrInsetHoleTypeName[i] = m_myTransform.FindChild(m_widgetToFullName["InsetDialogHole" + i + "TypeName"]).GetComponentsInChildren<UILabel>(true)[0];
}
for (int i = 0; i < 6; ++i)
{
m_gotransformList.Add(m_myTransform.FindChild(m_widgetToFullName["transformList" + i]).gameObject);
}
for (int i = 0; i < 6; i++)
{
if (i > 0)
{
m_gotransformList[i].transform.localPosition = new Vector3(
m_gotransformList[0].transform.localPosition.x + PACKAGEITEMNUMONEPAGE * PACKAGEITEMSPACE * i,
m_gotransformList[i].transform.localPosition.y,
m_gotransformList[i].transform.localPosition.z);
}
}
bool m_bIsAllLoaded = false;
//.........这里部分代码省略.........
示例14: Awake
void Awake()
{
m_instance = this;
m_myTransform = transform;
FillFullNameData(m_myTransform);
m_closeBtn = m_myTransform.FindChild(m_widgetToFullName["SanctuaryUIClose"]).GetComponentsInChildren<MogoButton>(true)[0];
m_myAchieveBtn = m_myTransform.FindChild(m_widgetToFullName["MyAchievementIcon"]).GetComponentsInChildren<MogoButton>(true)[0];
m_weekRankBtn = m_myTransform.FindChild(m_widgetToFullName["WeekRankIcon"]).GetComponentsInChildren<MogoButton>(true)[0];
m_todayRankBtn = m_myTransform.FindChild(m_widgetToFullName["TodayRankIcon"]).GetComponentsInChildren<MogoButton>(true)[0];
m_achieveReardBtn = m_myTransform.FindChild(m_widgetToFullName["NextAchievementItem"]).GetComponentsInChildren<MogoButton>(true)[0];
m_goSanctuaryUIDialogList[0] = m_myTransform.FindChild(m_widgetToFullName["MyAchievementDialog"]).gameObject;
m_goSanctuaryUIDialogList[1] = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialog"]).gameObject;
m_goSanctuaryUIDialogList[2] = m_myTransform.FindChild(m_widgetToFullName["TodayRankDialog"]).gameObject;
m_camRankGrid = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGridListCamera"]).GetComponentsInChildren<Camera>(true)[0];
m_camRewardGrid = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardListCamera"]).GetComponentsInChildren<Camera>(true)[0];
m_camRankGrid.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
m_camRewardGrid.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
m_lblCurrentAchieve = m_myTransform.FindChild(m_widgetToFullName["CurrentAchievementNum"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblNextAchieve = m_myTransform.FindChild(m_widgetToFullName["NextAchievementNum"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblNextAchievementRewardGoldNum = m_myTransform.FindChild(m_widgetToFullName["NextAchievementRewardGoldNum"]).GetComponentsInChildren<UILabel>(true)[0];
m_spAchieveReward = m_myTransform.FindChild(m_widgetToFullName["NextAchievementItemFG"]).GetComponentsInChildren<UISprite>(true)[0];
m_transRankGridList = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGridList"]);
m_transRewardGridList = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardList"]);
m_goRewardTip = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogRewardTip"]).gameObject;
m_goRewardTip.AddComponent<RewardGridTip>().TipNum = 4;
m_lblPlayerRank = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomRank"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblPlayerName = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomName"]).GetComponentsInChildren<UILabel>(true)[0];
m_lblPlayerContribute = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBottomAchieve"]).GetComponentsInChildren<UILabel>(true)[0];
for (int i = 0; i < 5; ++i)
{
m_arrRankPlayerGrid[i] = m_myTransform.FindChild(m_widgetToFullName["WeekRankDialogBodyGrid" + i]).gameObject;
}
m_tranMyAchievementDialogRewardList = FindTransform("MyAchievementDialogRewardList");
m_sanctuaryTabLabelList[(int)SanctuaryUITab.MyAchievementTab] = m_myTransform.FindChild(m_widgetToFullName["MyAchievementIconText"]).GetComponent<UILabel>();
m_sanctuaryTabLabelList[(int)SanctuaryUITab.WeekRankTab] = m_myTransform.FindChild(m_widgetToFullName["WeekRankIconText"]).GetComponent<UILabel>();
m_sanctuaryTabLabelList[(int)SanctuaryUITab.TodayRankTab] = m_myTransform.FindChild(m_widgetToFullName["TodayRankIconText"]).GetComponent<UILabel>();
foreach (var pair in m_sanctuaryTabLabelList)
{
if (pair.Key == (int)SanctuaryUITab.MyAchievementTab)
SanctuaryTabDown(pair.Key);
else
SanctuaryTabUp(pair.Key);
}
// ChineseData
FindTransform("SanctuaryUIName").GetComponentsInChildren<UILabel>(true)[0].text = LanguageData.GetContent(24030);
Initialize();
}
示例15: FillItemGridData
public void FillItemGridData(List<PassRewardGridData> data, Action cb)
{
ClearRewardItemList();
if (m_mbOK == null)
{
OKAct = cb;
}
else
{
if (cb != null)
{
m_mbOK.clickHandler = cb;
}
}
for (int i = 0; i < data.Count; ++i)
{
int index = i;
AssetCacheMgr.GetUIInstance("InstanceRewardItem.prefab", (prefab, guid, go) =>
{
GameObject obj = (GameObject)go;
obj.transform.parent = m_instanceRewardItemList;
obj.transform.localPosition = new Vector3(REWARDITEMSPACE * index, 0, 0);
obj.transform.localScale = new Vector3(0.0008f, 0.0008f, 1);
UISprite spIcon = obj.transform.FindChild("InstanceRewardItemFG").GetComponentsInChildren<UISprite>(true)[0];
UISprite spBG = obj.transform.FindChild("InstanceRewardItemBG").GetComponentsInChildren<UISprite>(true)[0];
UILabel lblNum = obj.transform.FindChild("InstanceRewardItemCount").GetComponentsInChildren<UILabel>(true)[0];
UILabel lblName = obj.transform.FindChild("InstanceRewardItemText").GetComponentsInChildren<UILabel>(true)[0];
InventoryManager.SetIcon(data[index].id, spIcon, 0, null, spBG);
if (lblNum != null)
{
lblNum.text = "";
lblName.text = data[index].iconName;
lblNum.text = string.Concat("x", data[index].num);
}
Mogo.Util.LoggerHelper.Debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ " + spIcon.spriteName);
m_listItem.Add(obj);
if (index == data.Count - 1)
{
if (m_camItemList == null)
{
LoggerHelper.Debug("m_camItemList is null");
m_camItemList = FindTransform("InstancePassRewardItemListCamera").GetComponentsInChildren<Camera>(true)[0];
m_camItemList.GetComponentsInChildren<UIViewport>(true)[0].sourceCamera = GameObject.Find("MogoMainUI").transform.FindChild("Camera").GetComponentsInChildren<Camera>(true)[0];
}
if (m_listItem.Count <= 5)
{
if (m_camItemList != null)
m_camItemList.transform.localPosition = m_vec3StartPos[index];
else
LoggerHelper.Error("m_camItemList is null");
}
else
{
if (m_camItemList != null)
m_camItemList.transform.localPosition = m_vec3StartPos[4];
else
LoggerHelper.Error("m_camItemList is null");
}
if (IsWin)
PlayVictoryAnimation();
}
});
}
}