Beispiel #1
0
        public void Init(ShipModel ship)
        {
            this.ship            = ship;
            this.labelName.text  = ship.Name;
            this.labelLevel.text = ship.Level.ToString();
            this.stars.init(ship.Srate);
            this.shipTypeMarkIcon.mainTexture = ResourceManager.LoadShipTypeIcon(ship);
            UIRemodelEquipSlotItem[] array = this.slots;
            for (int i = 0; i < array.Length; i++)
            {
                UIRemodelEquipSlotItem uIRemodelEquipSlotItem = array[i];
                uIRemodelEquipSlotItem.Hide();
            }
            int j;

            for (j = 0; j < ship.SlotitemList.get_Count(); j++)
            {
                this.slots[j].Initialize(j, ship);
                this.slots[j].SetOnUIRemodelEquipSlotItemActionListener(new UIRemodelEquipSlotItem.UIRemodelEquipSlotItemAction(this.OnUIRemodelEquipSlotItemActionListener));
                this.slots[j].Show();
            }
            if (ship.HasExSlot())
            {
                this.slots[j].Initialize(j, ship.SlotitemEx, ship);
                this.slots[j].Show();
            }
        }
 public void Initialize(KeyControl keyController, ShipModel shipModel)
 {
     keyController.ClearKeyAll();
     keyController.firstUpdate = true;
     this.keyController        = keyController;
     base.set_enabled(true);
     this.ship          = shipModel;
     this.validShip     = UserInterfaceRemodelManager.instance.IsValidShip();
     this.validUnsetAll = UserInterfaceRemodelManager.instance.mRemodelManager.IsValidUnsetAll(UserInterfaceRemodelManager.instance.focusedShipModel.MemId);
     UIRemodelEquipSlotItem[] array = this.slots;
     for (int i = 0; i < array.Length; i++)
     {
         UIRemodelEquipSlotItem uIRemodelEquipSlotItem = array[i];
         if (this.validShip)
         {
             uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(new UIRemodelEquipSlotItem.UIRemodelEquipSlotItemAction(this.UIRemodelEquipSlotItemAction));
         }
         else
         {
             uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(null);
         }
         uIRemodelEquipSlotItem.Hide();
     }
     this.InitSlotItems(this.ship);
     ParameterType[] array2 = new ParameterType[]
     {
         ParameterType.Taikyu,
         ParameterType.Karyoku,
         ParameterType.Soukou,
         ParameterType.Raisou,
         ParameterType.Kaihi,
         ParameterType.Taiku,
         ParameterType.Tous,
         ParameterType.Taisen,
         ParameterType.Soku,
         ParameterType.Sakuteki,
         ParameterType.Leng,
         ParameterType.Lucky
     };
     int[] array3 = new int[]
     {
         shipModel.MaxHp,
         shipModel.Karyoku,
         shipModel.Soukou,
         shipModel.Raisou,
         shipModel.Kaihi,
         shipModel.Taiku,
         shipModel.TousaiMaxAll,
         shipModel.Taisen,
         shipModel.Soku,
         shipModel.Sakuteki,
         shipModel.Leng,
         shipModel.Lucky
     };
     for (int j = 0; j < array2.Length; j++)
     {
         UIRemodelParameter component = this.parameters.get_transform().GetChild(j).GetComponent <UIRemodelParameter>();
         component.Initialize(array2[j], array3[j]);
     }
     this.currentFocusItem = null;
     this._BeforeItem      = this.slots[0];
     this.Focus();
 }