Миксер
Почини интерфейс
This commit is contained in:
1 parent
1aceea1b79
commit
60c28f54f2
74 files changed
+8060
-1059
No files matched your search
@@ -47,9 +47,7 @@ namespace Code.Example.Platformer.Entity
|
||||
IsDead = true;
|
||||
OnEntityDeath?.Invoke();
|
||||
}
|
||||
|
||||
_eventBus.RaiseEvent<IEntityDamagedHandler>(x=> x.EntityDamaged(gameObject, damage, IsDead));
|
||||
|
||||
|
||||
WaitThreshold().Forget();
|
||||
}
|
||||
|
||||
@@ -60,17 +58,7 @@ namespace Code.Example.Platformer.Entity
|
||||
else _health += heal;
|
||||
|
||||
OnEntityHeal?.Invoke(_health);
|
||||
|
||||
_eventBus.RaiseEvent<IEntityHealedHandler>(x=> x.EntityHealed(gameObject, heal));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public interface IEntityDamagedHandler : IGlobalSubscriber
|
||||
{
|
||||
void EntityDamaged(GameObject entity, int damageCount, bool isDied);
|
||||
}
|
||||
public interface IEntityHealedHandler : IGlobalSubscriber
|
||||
{
|
||||
void EntityHealed(GameObject entity, int healCount);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user