(client) feat:添加临时动画组件,添加逃跑逻辑
This commit is contained in:
@ -29,11 +29,7 @@ namespace Entity
|
||||
{
|
||||
var entity = other.GetComponent<Entity>();
|
||||
if (!entity || entity == bulletSource || entity is Pickup) return;
|
||||
if (Managers.AffiliationManager.Instance.GetRelation(bulletSource.affiliation, entity.affiliation) != Relation.Friendly)
|
||||
{
|
||||
entity.OnHit(this);
|
||||
}
|
||||
else if (Setting.Instance.CurrentSettings.friendlyFire)
|
||||
if (Managers.AffiliationManager.Instance.GetRelation(bulletSource.affiliation, entity.affiliation) != Relation.Friendly || Setting.Instance.CurrentSettings.friendlyFire)
|
||||
{
|
||||
entity.OnHit(this);
|
||||
}
|
||||
@ -41,6 +37,7 @@ namespace Entity
|
||||
{
|
||||
return; // 如果是友好关系且不允许友军伤害,则不处理
|
||||
}
|
||||
|
||||
attributes.health -= 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user