private void PlayLunge(PlayLungeAnimationMessage msg) { EntityManager .GetEntity(msg.Source) .EnsureComponent <MeleeLungeComponent>() .SetData(msg.Angle); }
private void PlayLunge(PlayLungeAnimationMessage msg) { if (EntityManager.EntityExists(msg.Source)) { msg.Source.EnsureComponent <MeleeLungeComponent>().SetData(msg.Angle); } else { // FIXME: This should never happen. Logger.Error($"Tried to play a lunge animation, but the entity \"{msg.Source}\" does not exist."); } }