From 68c6e53f195677a3f91deb1526275fd38e00341d Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Wed, 11 Dec 2024 14:38:08 +0100 Subject: make format --- src/example/sound.cpp | 54 --------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/example/sound.cpp (limited to 'src/example') diff --git a/src/example/sound.cpp b/src/example/sound.cpp deleted file mode 100644 index a9b0930..0000000 --- a/src/example/sound.cpp +++ /dev/null @@ -1,54 +0,0 @@ - - -#include "api/Asset.h" -#include "api/AudioSource.h" -#include "api/BehaviorScript.h" -#include "api/Camera.h" -#include "api/GameObject.h" -#include "api/LoopManager.h" -#include "api/Scene.h" -#include "api/Script.h" -#include "manager/ComponentManager.h" -#include "types.h" -#include - -using namespace crepe; - - -class ScriptTest : public Script { - void init(){ - auto & audio = this->get_component(); - audio.play(); - } - void update(){ - } -}; - - -class TestSound : public Scene { -public: - void load_scene(){ - Mediator & mediator = this->mediator; - ComponentManager & mgr = mediator.component_manager; - - GameObject obj = mgr.new_object("SOUND"); - GameObject cam = mgr.new_object("cam"); - cam.add_component(ivec2{100,100},vec2{100,100}, Camera::Data{}); - - Asset asset{"asset/audio/sample.ogg"}; - auto & test = obj.add_component(asset); - obj.add_component().set_script(); - - - } - - std::string get_name() const { return "TestScene"; }; - -}; - -int main(){ - LoopManager engine; - engine.add_scene(); - engine.start(); - return 0; -} -- cgit v1.2.3