game registry internal refactor
This commit is contained in:
parent
be2ebf1223
commit
d5573db251
11 changed files with 68 additions and 188 deletions
|
|
@ -163,7 +163,7 @@ public partial class SurvivalZombieSpawner : Node
|
|||
List<ZombieResource> list = [];
|
||||
foreach (var res in pool)
|
||||
{
|
||||
list.Add(GameRegistry.GetZombieByName(res));
|
||||
list.Add(GameRegistry.GetEntityByName(res) as ZombieResource);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public partial class ZombieSequencer : Node2D
|
|||
|
||||
private void Spawn(string id, int lane)
|
||||
{
|
||||
RuntimeZombieData zombie = GameRegistry.GetZombieByName(id).Scene.Instantiate<RuntimeZombieData>();
|
||||
RuntimeZombieData zombie = GameRegistry.GetEntityByName(id).Scene.Instantiate<RuntimeZombieData>();
|
||||
PoolContainer.Instance.Zombies.AddChild(zombie);
|
||||
|
||||
zombie.GlobalPosition = new Vector2(GlobalPosition.X, FieldParams.RightFieldBoundary.Y - (lane - 1) * FieldParams.TileHeight);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue