using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] private float points; [SerializeField] private CannonScript cannon; // Start is called before the first frame update void Start() { points = 0; } // Update is called once per frame void Update() { } public float getPoints(){ return points; } public void setPoints(float nPoints){ points = nPoints; } public void spendPoints(float amount){ if(amount <= points){ points = points - amount; } } public void gainPoints(float amount){ points += amount; } }