示例#1
0
    public void AddCity(CityTable.CityData city, Color color, bool locked)
    {
        var item = Instantiate(_itemTemplate, _itemTemplate.parent, false);

        item.Find("Button/Text").GetComponent <Text>().text      = _rt.T($"{city.name}  ").C(color).T($"Lv.{city.level}").Print();
        item.Find("Button").GetComponent <Button>().interactable = !locked;

        item.gameObject.SetActive(true);
    }
示例#2
0
    void ShowUnit(Unit unit)
    {
        var hp = unit.GetProperty <MaxValueProperty>(PropertyType.Health);

        _out.AddItem(_rich.T(
                         "NAME: {0}, HP: {1:N0}/{2:N0}, ATK: {3:N0}, MAG: {4:N0}, CRIT: {5:P0}, CDMG: {6:P0}, DEF: {7:N0}, MDEF: {8:N0}",
                         unit.Name,
                         hp.Current,
                         hp.Value,
                         unit.GetFloatProperty(PropertyType.PhysicAttack),
                         unit.GetFloatProperty(PropertyType.MagicAttack),
                         unit.GetFloatProperty(PropertyType.CriticalRate),
                         unit.GetFloatProperty(PropertyType.CriticalDamage),
                         unit.GetFloatProperty(PropertyType.PhysicDefense),
                         unit.GetFloatProperty(PropertyType.MagicDefense)).Print());
    }