]> git.tdb.fi Git - libs/game.git/blobdiff - examples/bassteroids/source/gamecontroller.cpp
Load the various setups through resources
[libs/game.git] / examples / bassteroids / source / gamecontroller.cpp
index 97701e379fa603d9bc6ad265351bc0ffa48f845f..d4b232db4d897ff28d698064b41bc97b04d09d2b 100644 (file)
@@ -8,9 +8,7 @@ using namespace Msp;
 
 GameController::GameController(Game::Stage &s):
        System(s),
-       asteroid_setup{ .physical={ .body={ .mass=200, .moment_of_inertia=2160 }, .collider={ .type=ColliderType::CIRCLE, .radius=3.0f } },
-               .hittable={ .damaging=true, .hits={ .max_hits=3, .vulnerable_to=1 }, .damage={ .amount=10, .type=1 }},
-               .mesh={ .object_name="Asteroid 1.object" }}
+       asteroid_setup(stage.get_resources().get<AsteroidSetup>("asteroid1.roid.setup"))
 { }
 
 void GameController::tick(Time::TimeDelta)