From 84222b9b846862321c07b016609a840637cbe589 Mon Sep 17 00:00:00 2001 From: Ravbug Date: Sun, 12 May 2024 17:26:32 -0700 Subject: [PATCH] Update for API changes --- RavEngine | 2 +- main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RavEngine b/RavEngine index 6acf562..ec2ab0d 160000 --- a/RavEngine +++ b/RavEngine @@ -1 +1 @@ -Subproject commit 6acf562137856f14581688419480cbe2be97670c +Subproject commit ec2ab0df2fcd7062c9bf2cd52913bfcc2119a9f0 diff --git a/main.cpp b/main.cpp index 23ad078..b47872b 100644 --- a/main.cpp +++ b/main.cpp @@ -39,7 +39,7 @@ struct HelloCubeWorld : public RavEngine::World { // RavEngine Entities do not come with a Transform by default. For convenience, a "GameObject" is also provided. However, this // is just an entity with a transform component applied automatically, do not confuse it with Unity's version of a GameObject. // When you call this, it immediately creates the entity in the world. Entity creation and deletion must happen on the main thread. - auto cubeEntity = CreatePrototype(); + auto cubeEntity = Instantiate(); // We want to display a cube in this world. RavEngine uses a component-based composition model // for describing scene objects. However, you can also subclass RavEngine::Entity and perform @@ -63,7 +63,7 @@ struct HelloCubeWorld : public RavEngine::World { // We want to be able to see our cube, so we need a camera. In RavEngine, cameras are also components, so // we need another entity to hold that. - auto cameraEntity = CreatePrototype(); + auto cameraEntity = Instantiate(); // Create the CameraComponent. auto& cameraComponent = cameraEntity.EmplaceComponent(); @@ -75,7 +75,7 @@ struct HelloCubeWorld : public RavEngine::World { cubeEntity.GetTransform().LocalTranslateDelta(vector3(0, 0, -5)); // We want some lighting on our cube. In RavEngine, lights are also components, so we'll need an entity for those. - auto lightsEntity = CreatePrototype(); + auto lightsEntity = Instantiate(); lightsEntity.EmplaceComponent().SetIntensity(4); // a light that mimics the sun lightsEntity.EmplaceComponent().SetIntensity(0.2); // a weak fill light that affects all surfaces equally