Add initial resource and presenter classes for game entities and effects

This commit is contained in:
2025-10-13 12:11:50 +02:00
commit ad3e631d8c
75 changed files with 1423 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
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<PositionComponent>(coreEntity);
}
public void SyncToPresentation(float delta)
{
if (_position != null) GlobalPosition = _position.Position.ToGodot();
}
public void SyncToCore(float delta)
{
}
}