Added basic entity scripts
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Babushka.scripts.CSharp.GameEntity.Types;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
using Entity = Babushka.scripts.CSharp.GameEntity.Entities.Entity;
|
||||
|
||||
namespace Babushka.scripts.CSharp.GameEntity.Management;
|
||||
|
||||
public partial class EntityNodeCreator : Node
|
||||
{
|
||||
[Export] private Dictionary<EntityType, PackedScene> _entityPrefabs;
|
||||
|
||||
public T Create<T>(EntityType type) where T:Entity
|
||||
{
|
||||
return _entityPrefabs[type].Instantiate<T>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user