Пример #1
0
 private void SetPet(ChangePetChooseUnit unit, Pet dataPet, PetInfo petInfo)
 {
     unit.SetItem(dataPet, petInfo);
     if (PetManagerBase.IsPetLimit(dataPet))
     {
         unit.SetImageLimit(true);
         ChangePetChooseUI.limit_pet = true;
     }
     else
     {
         unit.SetImageLimit(false);
     }
 }
Пример #2
0
 private void Awake()
 {
     base.AwakeBase(BindingContext.BindingContextMode.MonoBinding, false);
     this.UIs         = base.FindTransform("UIs");
     this.PetUnitList = new List <ChangePetChooseUnit>();
     for (int i = 1; i < 4; i++)
     {
         ChangePetChooseUnit component = base.FindTransform("Pet" + i).GetComponent <ChangePetChooseUnit>();
         if (component != null)
         {
             this.PetUnitList.Add(component);
         }
     }
     this.BtnChangeFormation  = base.FindTransform("BtnChangeFormation").GetComponent <ButtonCustom>();
     this.TextFormationSelect = base.FindTransform("TextFormationSelect").GetComponent <Text>();
     this.PetsBar             = base.FindTransform("PetsBar").GetComponent <ButtonCustom>();
     this.FormationSelector   = base.FindTransform("FormationSelector");
     this.BtnChangeFormation.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtnChangeFormation);
     this.PetsBar.onClickCustom            = new ButtonCustom.VoidDelegateObj(this.OnClickPetsBar);
 }