BITFALL/Assets/Artists/Scripts/Entity/EntityProxyCharacter.cs

28 lines
703 B
C#
Raw Normal View History

2023-06-08 14:09:50 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using BITKit;
using BITKit.Animations;
using BITKit.Entities;
namespace BITFALL.Entites
{
public class EntityProxyCharacter : EntityComponent, IHealthCallback
{
public UnityAnimator animator;
[SerializeReference, SubclassSelector] public References _getDamage;
public override void OnStart()
{
base.OnStart();
entity.RegisterCallback<IHealthCallback>(this);
}
public void OnSetAlive(bool alive)
{
}
public void OnSetHP(int hp)
{
animator.animator.Play(_getDamage,-1,0);
}
}
}