protected override void OnStart() { scemModel = ModelManager.Instance.Get <SceneModel>(); skillModel = ModelManager.Instance.Get <SkillModel>(); btnShowMenu = transform.FindChild("BtnMenu").GetComponent <Button>(); btnSetting = btnShowMenu.transform.FindChild("BtnSetting").GetComponent <Button>(); btnBack = btnShowMenu.transform.FindChild("BtnBack").GetComponent <Button>(); btnShop = btnShowMenu.transform.FindChild("BtnShop").GetComponent <Button>(); animation = btnShowMenu.GetComponent <Animation>(); btnShowMenu.onClick.AddListener(OnShowMenu); btnSetting.onClick.AddListener(OnOpenSetting); btnBack.onClick.AddListener(OnBackRoom); btnShop.onClick.AddListener(OnOpenShop); btnSetting.gameObject.SetActive(false); btnBack.gameObject.SetActive(false); btnShop.gameObject.SetActive(false); RegisterEvent(); var tSkillNode = transform.FindChild("Skill"); btnVip = tSkillNode.FindChild("BtnVip").GetComponent <Button>(); btnLockFish = tSkillNode.FindChild("BtnLockFish").GetComponent <Button>(); btnLockFish.onClick.AddListener(OnClickLock); btnSkillEp = tSkillNode.FindChild("BtnSkillEp").GetComponent <Button>(); btnSkillEp.onClick.AddListener(OnClickSkill); btnPay = tSkillNode.FindChild("BtnPay").GetComponent <Button>(); btnPay.onClick.AddListener(OnCliclPay); }
protected override void OnStart() { ProgressBar.fillAmount = 0; ModelManager.Instance.Register <SceneModel>(); ModelManager.Instance.Register <SkillModel>(); sceneModel = ModelManager.Instance.Get <SceneModel>(); skillModel = ModelManager.Instance.Get <SkillModel>(); NetManager.Instance.CanProcessCmd = false; StartCoroutine(LoadRes()); }