About to test prefabs but I need more horsepower

This commit is contained in:
2023-03-22 18:00:39 -07:00
parent 162fabaf44
commit 1ce962f916
3 changed files with 3 additions and 14 deletions

View File

@ -1,13 +1,3 @@
<prefab> <prefab name="FPSLabel" type="ui/debug">
<asset type="bitmapfont" name="font_bitmap" texture="bmfont.png" rows="16" columns="16" /> <UILabel ref="label" text="Hello World" />
<component ref="canvas" type="UICanvas" />
<children>
<item>
<component ref="label" type="scene/components/ui/UILabel::UILabel" text="Hello World" font="font_bitmap" />
</item>
<!-- So here you can either do <item> which is recursive, or a prefab if you desire. -->
</children>
</prefab> </prefab>

View File

@ -30,7 +30,7 @@ void GameCamera::onStart() {
if(current != slowTarget) { if(current != slowTarget) {
float_t m = 6.0f; float_t m = 6.0f;
float_t s = delta * 3.0f; float_t s = delta * 3.0f;
current += glm::vec2( current += glm::vec2(.
mathClamp<float_t>((slowTarget.x - current.x) * s, -m, m), mathClamp<float_t>((slowTarget.x - current.x) * s, -m, m),
mathClamp<float_t>((slowTarget.y - current.y) * s, -m, m) mathClamp<float_t>((slowTarget.y - current.y) * s, -m, m)
); );

View File

@ -18,7 +18,6 @@ namespace Dawn {
glm::vec2 lookOffsetScale = glm::vec2(6.0f, 3.0f); glm::vec2 lookOffsetScale = glm::vec2(6.0f, 3.0f);
float_t movementScrollSpeed = 0.5f; float_t movementScrollSpeed = 0.5f;
glm::vec3 zoomOffset = glm::vec3(0, 30.0f, 7.5f); glm::vec3 zoomOffset = glm::vec3(0, 30.0f, 7.5f);
PlayerController *player = nullptr; PlayerController *player = nullptr;
GameCamera(SceneItem *item); GameCamera(SceneItem *item);