using CryptonymThunder.Code.Extensions; using GameCore.ECS; using GameCore.ECS.Interfaces; using GameCore.Physics; using Godot; namespace CryptonymThunder.Code.Presenters; [GlobalClass] public partial class TransformPresenterComponent : Node3D, IPresenterComponent, IEntityPresenter { private PositionComponent _position; public Entity CoreEntity { get; set; } public void Initialize(Entity coreEntity, World world) { CoreEntity = coreEntity; _position = world.GetComponent(coreEntity); } public void SyncToPresentation(float delta) { if (_position != null) GlobalPosition = _position.Position.ToGodot(); } public void SyncToCore(float delta) { } }