#include <cube.h>
#include <Redacted3D/engine/engine.h>
#include <ball.h>

void Cube::pre_render()  {
    //hVelocity = 1;
    getGeometry();
    hMove(velAngle, hVelocity);
    vMove(vVelocity);

    angle.x = angle.x + 24*engine->frameDelta;
    angle.y = angle.y + 24*engine->frameDelta;
    angle.z = angle.z + 24*engine->frameDelta;
}

void Cube::update(float elapsed) {

}
Cube::Cube() {
    name = "cube";
    modelPath = "assets/models/cube.obj";
    texturePath = "assets/textures/multi/";
    setScale(0.5f);
    hVelocity = 0;
    vVelocity = 0;
}

void Cube::loadTexture() {
    //MultiTexture texture(this, texturePath.c_str(), true);
    std::vector<std::string> textures;
    textures.emplace_back("assets/textures/motion/default.png");
    textures.emplace_back("assets/textures/motion/1.png");
    textures.emplace_back("assets/textures/motion/2.png");
    textures.emplace_back("assets/textures/motion/3.png");
    textures.emplace_back("assets/textures/motion/4.png");
    textures.emplace_back("assets/textures/motion/5.png");
    textures.emplace_back("assets/textures/motion/6.png");
    MotionTexture texture(this, textures, 250, true);
}
