Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class PlayerController : MonoBehaviour
- {
- int hp = 3;
- [SerializeField] Text hpText;
- void Start()
- {
- ChHP(-1);
- }
- public void ChHP(int healthChangeValue)//Change Heath Point Method
- {
- hp += healthChangeValue;
- hpText.text = hp.ToString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement