From 4f3de714cd04ee5d99167f415843573d6bbd9f62 Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 14 Nov 2022 00:32:08 +0100 Subject: Implemented naive turrets and targeting mechanics Coupling between components, implementation of systems and behaviour of some state-related methods should be refactored, but the overall look is nice. --- battles/src/scenarios.cpp | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'battles/src/scenarios.cpp') diff --git a/battles/src/scenarios.cpp b/battles/src/scenarios.cpp index cf348ca..3b35f44 100644 --- a/battles/src/scenarios.cpp +++ b/battles/src/scenarios.cpp @@ -17,26 +17,27 @@ example() { const universe::ShipType halo {"halo", 6.0}; const universe::ShipType cube {"cube", 12.0}; - const universe::ShipType bell {"bell", 20.0}; + const universe::ShipType bell {"bell", 30.0}; + const universe::TurretType cannon {"cannon", 1.0, 1.0, 0.5}; return { "example", { - {0, halo, {}}, - {0, halo, {}}, - {0, cube, {}}, - {0, cube, {}}, - {0, cube, {}}, - {0, bell, {}}, - {0, bell, {}}, - {0, bell, {}}, - {1, halo, {}}, - {1, halo, {}}, - {1, bell, {}}, - {1, cube, {}}, - {1, cube, {}}, - {1, cube, {}}, - {1, bell, {}}, - {1, bell, {}}, + {0, halo, {cannon}}, + {0, halo, {cannon}}, + {0, cube, {cannon, cannon}}, + {0, cube, {cannon, cannon}}, + {0, cube, {cannon, cannon}}, + {0, bell, {cannon}}, + {0, bell, {cannon}}, + {0, bell, {cannon}}, + {1, halo, {cannon}}, + {1, halo, {cannon}}, + {1, bell, {cannon}}, + {1, cube, {cannon, cannon}}, + {1, cube, {cannon, cannon}}, + {1, cube, {cannon, cannon}}, + {1, bell, {cannon}}, + {1, bell, {cannon}}, }, }; } -- cgit v1.1