12 float elapsedTime = 0.0f;
25 void init()
override {
26 std::shared_ptr<PerspectiveCamera> main_camera2D = std::dynamic_pointer_cast<PerspectiveCamera>(CameraManager::getInstance().getCamera(
"mainMenu_main"));
31 -TextureManager::getInstance().Get_GLTexture(
"graphnetwork")->width / 2,
32 -TextureManager::getInstance().Get_GLTexture(
"graphnetwork")->height / 2
35 TextureManager::getInstance().Get_GLTexture(
"graphnetwork")->width,
36 TextureManager::getInstance().Get_GLTexture(
"graphnetwork")->height
48 void update(
float deltaTime)
override {
50 elapsedTime += deltaTime;
51 float amplitude = 100.0f;
52 float frequency = 0.002f;
55 float newY = amplitude * sin(frequency * elapsedTime);
57 transform->position.z = newY;
60 std::string GetComponentName()
override {
61 return "MainMenuBackground";
Definition MainMenuBackground.h:7