From 12da815e9e1f27b6e1e89b405ed2dc52a55815ce Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Wed, 14 Feb 2024 17:13:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20resource=5Fmanager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- program/resource_manager.cpp | 0 program/resource_manager.h | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 program/resource_manager.cpp create mode 100644 program/resource_manager.h diff --git a/program/resource_manager.cpp b/program/resource_manager.cpp new file mode 100644 index 0000000..e69de29 diff --git a/program/resource_manager.h b/program/resource_manager.h new file mode 100644 index 0000000..bdc8007 --- /dev/null +++ b/program/resource_manager.h @@ -0,0 +1,13 @@ +// Менеджер ресурсов - управляет загрузкой и выгрузкой игровых ресурсов +class ResourceManager { +public: + // Загружает ресурс (текстура, модель, звук и т.д.) + void loadResource(const std::string& resourcePath); + + // Возвращает загруженный ресурс + template + ResourceType getResource(const std::string& resourceName); + + // Освобождает ресурсы + void unloadAllResources(); +};