Beispiel #1
0
    void updatePanel()
    {
        UnitTypes units = UnitTypes.instance;

        sprite.sprite = units.getSprite(spawn);
        unitName.text = spawn.ToString();
        UnitStats stats = units.getStats(spawn);

        health.text      = "Health: " + stats.health;
        moveSpeed.text   = "Move Speed: " + stats.moveSpeed;
        damage.text      = "Damage: " + stats.damage;
        attackSpeed.text = "Attack Speed: " + (1.0f / stats.attackRate).ToString("F1");
        cost.text        = "Cost: " + stats.cost;
    }