AllAssets
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public abstract class CharactersHealthBase : ICharactersHealth
|
||||
{
|
||||
public CharacterHealthyType HealthType { get; set; }
|
||||
public float f_MaxHP { get; set ; }
|
||||
public float f_CurrHP { get ; set; }
|
||||
public float f_MaxMP { get; set; }
|
||||
public float f_CurrMP { get; set; }
|
||||
public Dictionary<CharacterShieldType, float> f_Shield { get; set; }
|
||||
|
||||
public CharactersHealthBase() { }
|
||||
public CharactersHealthBase(CharacterHealthyType healthType, float f_MaxHP, float f_CurrHP, float f_MaxMP, float f_CurrMP, Dictionary<CharacterShieldType, float> f_Shields)
|
||||
{
|
||||
HealthType = healthType;
|
||||
this.f_MaxHP = f_MaxHP;
|
||||
this.f_CurrHP = f_CurrHP;
|
||||
this.f_MaxMP = f_MaxMP;
|
||||
this.f_CurrMP = f_CurrMP;
|
||||
this.f_Shield = f_Shield;
|
||||
}
|
||||
|
||||
public virtual void OnDie()
|
||||
{
|
||||
//播放死亡动画
|
||||
}
|
||||
|
||||
public virtual void OnHurt(float harmNum, CharacterHurtType charactersHurtType)
|
||||
{
|
||||
f_CurrHP-=harmNum;
|
||||
//播放受击动画
|
||||
}
|
||||
|
||||
public virtual void OnRecoverBlood(float bloodNum)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user