/// <summary> /// Spawns the entity instance from the given prototype on the current map /// </summary> public Entity SpawnEntity(string prototype, Vector2 position) { Entity e = engine.data.InstantiateEntity(prototype); engine.RegisterEntity(e); e.position = position; currentMap.levelEntities.Add(e); currentMap.PutOnTile(e, position.X, position.Y); return(e); }