using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class parryreact : MonoBehaviour
{
public Animator anim;
public StanceMeter tired;
public HealthBarForPlayer heal;
public bool canAdd = true;
public bool immune = false;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "smallparry" && canAdd)
{
// 不响应的部分,请删除注释
anim.Play("feedback", 0, 0f);
tired = other.gameObject.GetComponent<StanceMeter>();
tired.stance += 10;
canAdd = false;
}
else
{
}
}
void OnTriggerExit2D(Collider2D other)
{
canAdd = true;
}
}
评论 (0)