private UILabel _labelSelectedInfo; //被选中的契约的信息 public new void Init() { _btnStrength = FindChild("Center/Buttons/BtnStrength").GetComponent <Button>(); _btnPhysique = FindChild("Center/Buttons/BtnPhysique").GetComponent <Button>(); _btnAgility = FindChild("Center/Buttons/BtnAgility").GetComponent <Button>(); _btnIntelligence = FindChild("Center/Buttons/BtnIntelligence").GetComponent <Button>(); _labelStrength = FindChild("Center/Buttons/BtnStrength/LabelStrength").GetComponent <UILabel>(); _labelPhysique = FindChild("Center/Buttons/BtnPhysique/LabelPhysique").GetComponent <UILabel>(); _labelAgility = FindChild("Center/Buttons/BtnAgility/LabelAgility").GetComponent <UILabel>(); _labelIntelligence = FindChild("Center/Buttons/BtnIntelligence/LabelIntelligence").GetComponent <UILabel>(); _labelSelectedInfo = FindChild("Center/ItemInfoLabel").GetComponent <UILabel>(); _itemParent = FindChild("Center/Items"); _deedItem = FindChild("Center/DeedItem"); DeedItemPool.Instance.Init(_deedItem.transform); _deedMode = Singleton <DeedMode> .Instance; buttons = new List <Button> { null, _btnStrength, _btnPhysique, _btnAgility, _btnIntelligence }; _btnStrength.onClick += OnDeedTypeBtnClick; _btnPhysique.onClick += OnDeedTypeBtnClick; _btnAgility.onClick += OnDeedTypeBtnClick; _btnIntelligence.onClick += OnDeedTypeBtnClick; _labelSelectedInfo.text = ""; _deedMode.TypeStrings = new string[] { LanguageManager.GetWord("Equip.Str"), LanguageManager.GetWord("Equip.Phy"), LanguageManager.GetWord("Equip.Agi"), LanguageManager.GetWord("Equip.Wit") }; }
private DeedMode _deedMode; //数据中心 public void Init() { _btnDeed = NGUITools.FindInChild <Button>(gameObject, "Button"); _btnSelect = NGUITools.FindInChild <Button>(gameObject, "Item"); _icon = NGUITools.FindInChild <UISprite>(gameObject, "Item/Icon"); _selectedIcon = NGUITools.FindInChild <UISprite>(gameObject, "SelectedIcon"); _btnDeed.onClick += OnDeedClick; _btnSelect.onClick += OnSelected; CancleSelected(); _deedMode = Singleton <DeedMode> .Instance; _deedMode.dataUpdated += DeedModeDataUpdate; }
protected override void NetListener() { _deedMode = Singleton <DeedMode> .Instance; AppNet.main.addCMD(CMD.CMD_18_1, Fun_18_1); //契约信息 AppNet.main.addCMD(CMD.CMD_18_2, Fun_18_2); //契约签署结果 }