public void SetModel(ShipModel ship) { this.ShipName.text = ship.Name; this.ShipLV.textInt = ship.Level; this.SteelNum.textInt = ship.GetResourcesForRepair().Steel; this.FuelNum.textInt = ship.GetResourcesForRepair().Fuel; this.NeedDay.textInt = ship.RepairTime; this.UseKit.text = "使用しない"; this.shipBanner.SetShipData(ship); }
public void SetModel(ShipModel ship) { ShipName.text = ship.Name; ShipLV.textInt = ship.Level; UILabel steelNum = SteelNum; MaterialInfo resourcesForRepair = ship.GetResourcesForRepair(); steelNum.textInt = resourcesForRepair.Steel; UILabel fuelNum = FuelNum; MaterialInfo resourcesForRepair2 = ship.GetResourcesForRepair(); fuelNum.textInt = resourcesForRepair2.Fuel; NeedDay.textInt = ship.RepairTime; UseKit.text = "使用しない"; shipBanner.SetShipData(ship); }
public bool IsValidStartRepair(int ship_mem_id, bool use_repairkit) { ShipModel shipModel = _ships.Find((ShipModel x) => x.MemId == ship_mem_id); if (shipModel == null) { return(false); } if (shipModel.TaikyuRate >= 100.0) { return(false); } if (shipModel.IsInMission() || shipModel.IsInRepair()) { return(false); } if (shipModel.IsBling()) { return(false); } if (shipModel.IsBlingWaitFromEscortDeck()) { return(false); } MaterialInfo resourcesForRepair = shipModel.GetResourcesForRepair(); if (base.Material.Fuel < resourcesForRepair.Fuel) { return(false); } if (base.Material.Steel < resourcesForRepair.Steel) { return(false); } if (use_repairkit && base.Material.RepairKit < 1) { return(false); } DeckModelBase deck = shipModel.getDeck(); if (deck != null) { if (deck.IsEscortDeckMyself()) { return(false); } return(deck.AreaId == MapArea.Id); } if (shipModel.IsBlingWaitFromDeck() && shipModel.AreaIdBeforeBlingWait == MapArea.Id) { return(true); } if (MapArea.Id == 1) { return(true); } return(false); }
public void UpdateInfo(ShipModel value_ship) { ship = value_ship; csb.SetShipData(value_ship); Vector3 localPosition = base.gameObject.transform.localPosition; if (!(localPosition.y < 100f)) { ele_l = GameObject.Find("dialog/label_shipname").GetComponent <UILabel>(); ele_l.text = ship.Name; ele_l = GameObject.Find("dialog/label_lv").GetComponent <UILabel>(); ele_l.text = ship.Level + string.Empty; if (ship.DamageStatus != 0) { _isSmoked = true; } else { _isSmoked = false; csb_smokes = null; } if (ship.ConditionState == FatigueState.Exaltation) { _isKira = true; } else { _isKira = false; } MaterialInfo resourcesForRepair = ship.GetResourcesForRepair(); ele_l = GameObject.Find("dialog/label_param").GetComponent <UILabel>(); ele_l.text = resourcesForRepair.Steel + "\n" + resourcesForRepair.Fuel + "\n"; ele_l.text += ((!_sw) ? (ship.RepairTime + string.Empty) : "0"); ele_l.text += "\u3000\n使用"; if (_sw) { ele_l.text += "する"; before_hp = ship.NowHp; } else { ele_l.text += "しない"; } } }