spawn prefab updated

Unfortunately, only doors are being instantiated. I haven't done enough research for the problem
This commit is contained in:
Jadis0x
2024-05-27 20:15:34 +03:00
parent 231087da51
commit 5968a83932
3 changed files with 56 additions and 14 deletions

View File

@@ -148,6 +148,7 @@ void DrawEntitiesTab() {
}
ImGui::Spacing();
ImGui::Text("Animals");
const char* animals_items[] = { "Rat", "Goat", "Pig" };
static int animal_current = 0;
@@ -155,6 +156,26 @@ void DrawEntitiesTab() {
if (ImGui::Button("Spawn##an")) {
Misc::CarryAnimal(animals_items[animal_current]);
}
ImGui::Text("Prefabs");
const char* prefab_items[] = {
"TV",
"Devour Door Back",
"Devour Door Main",
"Devour Door Room",
"Animal Gate",
"DoorNumber",
"Town Door",
"Inn Double Door",
"Slaughterhouse Fire Escape Door",
"Asylum White Door",
"Town Cell Door",
};
static int prefab_current = 0;
ImGui::Combo("##pref", &prefab_current, prefab_items, IM_ARRAYSIZE(prefab_items));
if (ImGui::Button("Spawn##pref")) {
Misc::SpawnPrefab(prefab_items[prefab_current]);
}
}
void DrawMapSpecificTab() {