41 lines
624 B
C#
41 lines
624 B
C#
![]() |
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
public class PlayerState : MonoBehaviour
|
|||
|
{
|
|||
|
|
|||
|
[Header("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѫ<EFBFBD><D1AA>")]
|
|||
|
public float totalHp;
|
|||
|
[Header("<22><><EFBFBD>ҵ<EFBFBD>ǰѪ<C7B0><D1AA>")]
|
|||
|
public float currentHp;
|
|||
|
[Header("<22>ֿ<EFBFBD><D6BF><EFBFBD>")]
|
|||
|
public float defend;
|
|||
|
|
|||
|
|
|||
|
// Start is called before the first frame update
|
|||
|
void Start()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
// Update is called once per frame
|
|||
|
void Update()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void beHurt(int hurt)
|
|||
|
{
|
|||
|
|
|||
|
Debug.Log(currentHp -= hurt);
|
|||
|
if(currentHp <= 0)
|
|||
|
{
|
|||
|
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|