Refactor UpdateKinematics() and fix a lot of Content warnings (#1709)
Most warnings were related to EntityQuery and IPhysicsComponent. Partially fixes #1650 and fixes #1682
This commit is contained in:
@@ -24,16 +24,15 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeNetworkEvent<PlayMeleeWeaponAnimationMessage>(PlayWeaponArc);
|
||||
EntityQuery = new TypeEntityQuery(typeof(MeleeWeaponArcAnimationComponent));
|
||||
}
|
||||
|
||||
public override void FrameUpdate(float frameTime)
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var entity in RelevantEntities)
|
||||
foreach (var arcAnimationComponent in EntityManager.ComponentManager.EntityQuery<MeleeWeaponArcAnimationComponent>())
|
||||
{
|
||||
entity.GetComponent<MeleeWeaponArcAnimationComponent>().Update(frameTime);
|
||||
arcAnimationComponent.Update(frameTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user