Advertisement
FlyingFrog

Sword Cost Calcucator

Feb 20th, 2023
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class SwordCostCalculator : MonoBehaviour
  4. {
  5.     [SerializeField] private int _swordsCount;
  6.     [SerializeField] private int _swordPrice;
  7.  
  8.     private int _totalCost;
  9.  
  10.     private void Start()
  11.     {
  12.         _totalCost = _swordsCount * _swordPrice;
  13.         Debug.Log($"Стоимость всех мечей = {_totalCost}");
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement