Update J3ML
This commit is contained in:
@@ -44,12 +44,12 @@ endif()
|
||||
#TODO: Publish release
|
||||
CPMAddPackage(
|
||||
NAME Event
|
||||
URL https://git.redacted.cc/josh/Event/archive/Release-2.zip
|
||||
URL https://git.redacted.cc/josh/Event/archive/Release-5.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReWindow
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/vA0.2.24.zip
|
||||
URL https://git.redacted.cc/Redacted/ReWindow/archive/vA0.2.25.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
@@ -59,7 +59,7 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME J3ML
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-2.zip
|
||||
URL https://git.redacted.cc/josh/j3ml/archive/Release-3.zip
|
||||
)
|
||||
#Broken
|
||||
#CPMAddPackage(
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include <cstdint>
|
||||
#include <types/entity/moby.h>
|
||||
|
||||
class Sphere2 : public Moby {
|
||||
class Ball : public Moby {
|
||||
public:
|
||||
bool alive;
|
||||
uint8_t health;
|
||||
@@ -19,5 +19,5 @@ public:
|
||||
//We will probably end up having a different camera point class controlled by the "world".
|
||||
void update(float elapsed) override;
|
||||
void pre_render() override;
|
||||
Sphere2();
|
||||
Ball();
|
||||
};
|
@@ -1,7 +1,7 @@
|
||||
#include <thread>
|
||||
#include <engine/engine.h>
|
||||
#include <cube.h>
|
||||
#include <sphere.h>
|
||||
#include <ball.h>
|
||||
#include <freeCam.h>
|
||||
#include <demoSky.h>
|
||||
|
||||
@@ -12,7 +12,7 @@ int main()
|
||||
engine->init();
|
||||
engine->window->setVsyncEnabled(false);
|
||||
engine->window->setResizable(false);
|
||||
engine->world->setAmbientLightColor(1.0f, 1.0f, 1.0f, 0.0f);
|
||||
engine->world->setAmbientLightColor(1.2f, 1.2f, 1.2f, 0.0f);
|
||||
Shader test("test", engine->workingDir + "/assets/shaders/defaultVertex.glsl", engine->workingDir + "/assets/shaders/defaultFragment.glsl");
|
||||
|
||||
auto* camera = new(FreeCam);
|
||||
@@ -26,13 +26,13 @@ int main()
|
||||
cube1->velAngle = cube1->lAngle();
|
||||
cube1->SetParent(engine->world);
|
||||
|
||||
auto* cube2 = new(Sphere2);
|
||||
cube2->name = "sphere";
|
||||
cube2->SetPos({5, -2, 0});
|
||||
cube2->velAngle = cube2->rAngle();
|
||||
cube2->SetParent(engine->world);
|
||||
auto* ball = new(Ball);
|
||||
ball->name = "sphere";
|
||||
ball->SetPos({5, -2, 0});
|
||||
ball->velAngle = ball->rAngle();
|
||||
ball->SetParent(engine->world);
|
||||
|
||||
auto *skybox = new(DemoSkybox);
|
||||
auto* skybox = new(DemoSkybox);
|
||||
skybox->angle = {0,0,0};
|
||||
skybox->SetParent(engine->world);
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
#include <sphere.h>
|
||||
void Sphere2::pre_render() {
|
||||
#include <ball.h>
|
||||
void Ball::pre_render() {
|
||||
hVelocity = 1;
|
||||
hMove(velAngle, hVelocity);
|
||||
vMove(vVelocity);
|
||||
}
|
||||
|
||||
void Sphere2::update(float elapsed) {
|
||||
void Ball::update(float elapsed) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Sphere2::Sphere2() {
|
||||
name = "sphere";
|
||||
Ball::Ball() {
|
||||
name = "ball";
|
||||
modelPath = "assets/models/sphere_lo.obj";
|
||||
texturePath = "assets/textures/missing.png";
|
||||
setScale(1.f);
|
@@ -1,21 +1,12 @@
|
||||
#include <cube.h>
|
||||
#include <engine/engine.h>
|
||||
#include <sphere.h>
|
||||
#include <ball.h>
|
||||
|
||||
void Cube::pre_render() {
|
||||
//hVelocity = 1;
|
||||
hMove(velAngle, hVelocity);
|
||||
vMove(vVelocity);
|
||||
|
||||
Moby* moby;
|
||||
for (auto& e : engine->world->GetChildren())
|
||||
if (auto* m = dynamic_cast<Sphere2*>(e))
|
||||
if (m->name == "sphere")
|
||||
moby = m;
|
||||
|
||||
if (moby == this)
|
||||
return;
|
||||
|
||||
angle.x = angle.x + 24*engine->frameDelta;
|
||||
angle.y = angle.y + 24*engine->frameDelta;
|
||||
angle.z = angle.z + 24*engine->frameDelta;
|
||||
|
Reference in New Issue
Block a user