PlayerStats.cs 571 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class PlayerStats : MonoBehaviour
  5. {
  6. public int collisionCounter;
  7. public int coinCounter;
  8. // Start is called before the first frame update
  9. void Start()
  10. {
  11. collisionCounter = 0;
  12. coinCounter = 0;
  13. }
  14. // Update is called once per frame
  15. void Update()
  16. {
  17. }
  18. public void IncreaseCollisionCounter()
  19. {
  20. collisionCounter += 1;
  21. }
  22. public void IncreaseCoinCounter()
  23. {
  24. coinCounter += 1;
  25. }
  26. }