Polish up AI
This commit is contained in:
@@ -263,8 +263,12 @@ void inputUnitAction(Game *game, InputState *input) {
|
||||
|
||||
for (i32 i = 0; i < unitIdx; i++) {
|
||||
ecs_entity_t entity = entities[i].entity;
|
||||
setAIBehaviour(entity, game->BTs.unit, &(AIBlackboard) {
|
||||
BzBTNode *BT = game->BTs.unit;
|
||||
if (ecs_has(ECS, entity, Worker))
|
||||
BT = game->BTs.unitEvasive;
|
||||
setAIBehaviour(entity, BT, &(AIBlackboard) {
|
||||
.moveToPos = positions[i],
|
||||
.shouldMoveTo = true,
|
||||
.proximity = 1.0f,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -406,11 +406,11 @@ void drawMainMenuUI(Game *game, f32 dt) {
|
||||
if (uiMainMenuButton("Play", true)) {
|
||||
setScreen(game, SCREEN_GAME);
|
||||
unloadMap(game);
|
||||
loadMap(game, "assets/maps/tree_test.tmj", false);
|
||||
//loadMap(game, "assets/maps/tree_test.tmj", false);
|
||||
//loadMap(game, "assets/maps/entity_test.tmj", false);
|
||||
//loadMap(game, "assets/maps/worker_test.tmj", false);
|
||||
//loadMap(game, "assets/maps/battle_test.tmj", false);
|
||||
//loadMap(game, "assets/maps/map_01.tmj", false);
|
||||
loadMap(game, "assets/maps/map_01.tmj", false);
|
||||
}
|
||||
if (uiMainMenuButton("Settings", true)) {
|
||||
setScreen(game, SCREEN_SETTINGS);
|
||||
|
||||
Reference in New Issue
Block a user