2022-11-04 13:05:20 +01:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using TMPro;
|
|
|
|
|
|
|
|
|
|
public class Akciopont : MonoBehaviour
|
|
|
|
|
{
|
2023-09-27 23:15:38 +02:00
|
|
|
[SerializeField] private TMP_Text _text;
|
2023-06-12 13:05:47 +02:00
|
|
|
private int akciopont = 0;
|
2022-11-04 13:05:20 +01:00
|
|
|
|
2023-06-12 13:05:47 +02:00
|
|
|
public int getAkciopont(){ return akciopont; }
|
2022-11-04 13:05:20 +01:00
|
|
|
|
2023-06-12 13:05:47 +02:00
|
|
|
private void Start(){
|
|
|
|
|
setText();
|
2022-11-04 13:05:20 +01:00
|
|
|
}
|
|
|
|
|
|
2023-06-12 13:05:47 +02:00
|
|
|
private void setText(){
|
2023-09-27 23:15:38 +02:00
|
|
|
_text.text = "Akciopontok: " + akciopont;
|
2022-11-04 13:05:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateAkciopont(int number) {
|
2022-11-12 12:18:08 +01:00
|
|
|
akciopont += number;
|
2023-06-12 13:05:47 +02:00
|
|
|
setText();
|
2022-11-04 13:05:20 +01:00
|
|
|
}
|
2022-11-07 17:25:24 +01:00
|
|
|
|
|
|
|
|
public void resetAkciopont() {
|
2022-11-12 12:18:08 +01:00
|
|
|
akciopont = 0;
|
2023-06-12 13:05:47 +02:00
|
|
|
setText();
|
2022-11-07 17:25:24 +01:00
|
|
|
}
|
2022-11-04 13:05:20 +01:00
|
|
|
}
|