18 lines
455 B
C#
18 lines
455 B
C#
using Encompass;
|
|
using PongFE.Components;
|
|
using PongFE.Messages;
|
|
|
|
namespace PongFE.Spawners
|
|
{
|
|
public class UITextSpawner : Spawner<UITextSpawnMessage>
|
|
{
|
|
protected override void Spawn(UITextSpawnMessage message)
|
|
{
|
|
var entity = CreateEntity();
|
|
|
|
AddComponent(entity, new PositionComponent(message.Position));
|
|
AddComponent(entity, new UITextComponent(message.Font, message.Text));
|
|
}
|
|
}
|
|
}
|