Exemple #1
0
 public void Initialize(KeyControl keyController, ShipModel shipModel)
 {
     keyController.ClearKeyAll();
     keyController.firstUpdate = true;
     this.keyController        = keyController;
     base.enabled  = true;
     ship          = shipModel;
     validShip     = UserInterfaceRemodelManager.instance.IsValidShip();
     validUnsetAll = UserInterfaceRemodelManager.instance.mRemodelManager.IsValidUnsetAll(UserInterfaceRemodelManager.instance.focusedShipModel.MemId);
     UIRemodelEquipSlotItem[] array = slots;
     foreach (UIRemodelEquipSlotItem uIRemodelEquipSlotItem in array)
     {
         if (validShip)
         {
             uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(UIRemodelEquipSlotItemAction);
         }
         else
         {
             uIRemodelEquipSlotItem.SetOnUIRemodelEquipSlotItemActionListener(null);
         }
         uIRemodelEquipSlotItem.Hide();
     }
     InitSlotItems(ship);
     ParameterType[] array2 = new ParameterType[12]
     {
         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[12]
     {
         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 = ((Component)parameters.transform.GetChild(j)).GetComponent <UIRemodelParameter>();
         component.Initialize(array2[j], array3[j]);
     }
     currentFocusItem = null;
     _BeforeItem      = slots[0];
     Focus();
 }
 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();
 }