Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class CashTesting : MonoBehaviour {
- private float cashPerRound = 1000;
- public float cashPerKill;
- public float scale;
- public int cash = 0;
- public float roundKills = 0;
- public int roundNum = 1;
- // Use this for initialization
- void Start () {
- endOfRound();
- }
- // Update is called once per frame
- void Update () {
- }
- void endOfRound()
- {
- if (roundNum > 10)
- {
- cashPerRound = 500;
- cashPerKill = 8;
- }
- float roundPrice = cashPerRound * roundNum;
- if (roundKills > 0) {
- cash += (int)roundPrice + (int)(cashPerKill * roundKills * scale);
- Debug.Log(cash);
- } else
- {
- cash += (int)roundPrice + (int)(cashPerKill * 1 * scale);
- Debug.Log(cash);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement