pf_setup({ .size={ 80, 45 }}),
playfield(game_stage.get_root(), pf_setup),
cam_entity(game_stage.get_root(), Game::TransformValues()),
- camera(cam_entity, resources.get<Game::CameraSetup>("main.camera.setup"))
+ camera(cam_entity, resources.get<Game::CameraSetup>("main.camera.setup")),
+ sun_entity(game_stage.get_root(), Game::TransformValues()),
+ sun(sun_entity, resources.get<Game::LightSetup>("sun.light.setup"))
{
game_stage.add_system<GameController>();
game_stage.add_system<Physics>();
player_input.set_control_scheme_type<Controls>(GameView::PlayerInput::ONE_LOCAL_PLAYER);
+ sun_entity->get_transform()->set_rotation(Geometry::Quaternion<float>::rotation(
+ LinAl::Vector<float, 3>(0.0f, 0.0f, -1.0f), LinAl::Vector<float, 3>(0.1f, -0.1f, -1.0f)));
+
director.activate_stage(game_stage);
}
#define BASSTEROIDS_H_
#include <msp/game/camera.h>
+#include <msp/game/light.h>
#include <msp/game/owned.h>
#include <msp/game/resources.h>
#include <msp/gameview/application.h>
Msp::Game::Owned<Msp::Game::Entity> cam_entity;
Msp::Game::Owned<Msp::Game::Camera> camera;
+ Msp::Game::Owned<Msp::Game::Entity> sun_entity;
+ Msp::Game::Owned<Msp::Game::Light> sun;
public:
Bassteroids(int, char **);