protected override void Awake() { base.Awake(); helpPageGo = transform.Find("HelpPage").gameObject; monsterPageGo = transform.Find("MonsterPage").gameObject; towerPageGo = transform.Find("TowerPage").gameObject; slideCanCoverScrollView = transform.Find("HelpPage").Find("Scroll View").GetComponent <SlideCanCoverScrollView>(); slideScrollView = transform.Find("TowerPage").Find("Scroll View").GetComponent <SlideScrollView>(); helpPanelTween = transform.DOLocalMoveX(0, 0.5f); helpPanelTween.SetAutoKill(false); helpPanelTween.Pause(); }
protected override void Awake() { base.Awake(); playerManager = mUIFacade.mPlayerManager; bigLevelPage = new Transform[bigLevelPageCount]; slideScrollView = transform.Find("Scroll View").GetComponent <SlideScrollView>(); //显示大关卡信息 for (int i = 0; i < bigLevelPageCount; i++) { bigLevelPage[i] = bigLevelContentTrans.GetChild(i); ShowBigLevelState(playerManager.unLockedNormalModelBigLevelList[i], playerManager.unLockedeNormalModelLevelNum[i], 5, bigLevelPage[i], i + 1); } hasRigisterEvent = true; }
private List <GameObject> towerContentImageGos; //实例化出来的建塔列表UI protected override void Awake() { base.Awake(); filePath = "GameOption/Normal/Level/"; playerManager = mUIFacade.mPlayerManager; levelContentImageGos = new List <GameObject>(); towerContentImageGos = new List <GameObject>(); levelContentTrans = transform.Find("Scroll View").Find("Viewport").Find("Content"); img_LockBtnGo = transform.Find("Img_LockBtn").gameObject; emp_TowerTrans = transform.Find("Emp_Tower"); img_BGLeft = transform.Find("Img_BGLeft").GetComponent <Image>(); img_BGRight = transform.Find("Img_BGRight").GetComponent <Image>(); tex_TotalWaves = transform.Find("Img_TotalWaves").Find("Text").GetComponent <Text>(); slideScrollView = transform.Find("Scroll View").GetComponent <SlideScrollView>(); currentBigLevelID = 1; currentLevelID = 1; }
private Transform[] bigLevelPage; //每一个大关卡的信息(Content中的对象) // private bool hasRigisterEvent; //是否已经注册 protected override void Awake() { base.Awake(); playerManager = uiFacade.playerManager; bigLevelPage = new Transform[bigLevelPageCount]; slideScrollView = transform.Find("Scroll View").GetComponent <SlideScrollView>(); //显示大关卡信息 for (int i = 0; i < bigLevelPageCount; i++) { bigLevelPage[i] = bigLevelContentTrans.GetChild(i); //ToDo Remove HardCode ShowBigLevelState(playerManager.normalModelBigLevelList[i], playerManager.unLockedNormalModelLevelList[i], 5, bigLevelPage[i], i + 1); RigisterEvent(bigLevelPage[i], i + 1); //在Awake方法注册一次 } // hasRigisterEvent = true; }