Inline TryGetComponent completely

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 14:05:23 +01:00
parent f3edecf994
commit 2ff4ec65d5
34 changed files with 98 additions and 84 deletions

View File

@@ -48,8 +48,8 @@ namespace Content.IntegrationTests.Tests.Commands
var human = entityManager.SpawnEntity("DamageableDummy", MapCoordinates.Nullspace);
// Sanity check
Assert.True(human.TryGetComponent(out DamageableComponent damageable));
Assert.True(human.TryGetComponent(out MobStateComponent mobState));
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human.Uid, out DamageableComponent damageable));
Assert.True(IoCManager.Resolve<IEntityManager>().TryGetComponent(human.Uid, out MobStateComponent mobState));
mobState.UpdateState(0);
Assert.That(mobState.IsAlive, Is.True);
Assert.That(mobState.IsCritical, Is.False);