temp tower rendering
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <td/render/renderer/EntityRenderer.h>
|
||||
#include <td/render/renderer/WorldRenderer.h>
|
||||
#include <td/render/renderer/TowerRenderer.h>
|
||||
|
||||
#include <td/simulation/RealTimeSimulation.h>
|
||||
|
||||
@@ -74,6 +75,9 @@ td::sim::GameHistory GetCustomHistory() {
|
||||
auto spawn = std::make_shared<td::protocol::commands::SpawnTroopCommand>(0, 0, td::Vec2fp{td::FpFloat(77), td::FpFloat(13)}, 0);
|
||||
gh[0].push_back(spawn);
|
||||
|
||||
auto tower = std::make_shared<td::protocol::commands::PlaceTowerCommand>(td::TowerType::Archer, 0, td::TowerCoords{77, 13});
|
||||
gh[0].push_back(tower);
|
||||
|
||||
return gh;
|
||||
}
|
||||
|
||||
@@ -94,11 +98,12 @@ int main(int argc, char** argv) {
|
||||
td::render::RenderPipeline renderer;
|
||||
renderer.AddRenderer<td::render::WorldRenderer>(cam, w);
|
||||
renderer.AddRenderer<td::render::EntityRenderer>(cam, w);
|
||||
renderer.AddRenderer<td::render::TowerRenderer>(cam, w);
|
||||
|
||||
cam.SetCamPos({77, 5, 13});
|
||||
cam.UpdatePerspective(display.GetAspectRatio());
|
||||
|
||||
td::sim::RealTimeSimulation simulation(w, std::move(gh), 2000);
|
||||
td::sim::RealTimeSimulation simulation(w, std::move(gh), 500);
|
||||
|
||||
while (!display.IsCloseRequested()) {
|
||||
display.PollEvents();
|
||||
|
||||
Reference in New Issue
Block a user