protected override void InitUI() { base.InitUI(); this.m_petFormation.Clear(); for (int i = 1; i <= 3; i++) { PetFormationUnit component = base.FindTransform("Formation" + i).GetComponent <PetFormationUnit>(); component.SetAction(new Action <int>(this.OnClickFormation), new Action <int>(this.OnClickFormation), i - 1); this.m_petFormation.Add(component); } }
private void Awake() { base.AwakeBase(BindingContext.BindingContextMode.MonoBinding, false); this.m_petFormation.Clear(); for (int i = 1; i <= 3; i++) { PetFormationUnit component = base.FindTransform("Formation" + i).GetComponent <PetFormationUnit>(); component.SetAction(new Action <int>(this.OnClickFormation), new Action <int>(this.OnClickBtnChange), i - 1); this.m_petFormation.Add(component); } this.HaveLinkPet = base.FindTransform("HaveLinkPet"); this.NoLinkPet = base.FindTransform("NoLinkPet"); this.Property1 = base.FindTransform("Property1"); this.Property2 = base.FindTransform("Property2"); this.Property3 = base.FindTransform("Property3"); this.linkedPet1 = base.FindTransform("linkedPet1"); this.linkedPet2 = base.FindTransform("linkedPet2"); this.linkedPet3 = base.FindTransform("linkedPet3"); }