Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class SwordCostCalculator : MonoBehaviour
- {
- [SerializeField] private int _swordsCount;
- [SerializeField] private int _swordPrice;
- private int _totalCost;
- private void Start()
- {
- _totalCost = _swordsCount * _swordPrice;
- Debug.Log($"Стоимость всех мечей = {_totalCost}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement