Now have the basics of the turn based battle engine with AI rebellion working.
This commit is contained in:
parent
f3b20f30c5
commit
c78b2ae75e
8 changed files with 114 additions and 73 deletions
10
boss/ui.cpp
10
boss/ui.cpp
|
|
@ -72,11 +72,11 @@ namespace boss {
|
|||
}
|
||||
|
||||
if(result.player_did > 0) {
|
||||
zoom(boss_is.cell);
|
||||
zoom("boss14", 1.8);
|
||||
} else if(result.enemy_did > 0) {
|
||||
zoom(player_is.cell);
|
||||
zoom(player_is.cell, 2.0);
|
||||
} else {
|
||||
zoom("");
|
||||
zoom("", 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,14 +115,14 @@ namespace boss {
|
|||
$arena.play_animations();
|
||||
}
|
||||
|
||||
void UI::zoom(const std::string &cell_name) {
|
||||
void UI::zoom(const std::string &cell_name, double ratio) {
|
||||
if(cell_name == "") {
|
||||
dbc::log("!!!!!!!!! you should add this to guecs");
|
||||
$camera.reset($view_texture, BOSS_VIEW_WIDTH, BOSS_VIEW_HEIGHT);
|
||||
} else {
|
||||
auto& cell = $arena.$ui.cell_for(cell_name);
|
||||
|
||||
$camera.resize(BOSS_VIEW_WIDTH/2, BOSS_VIEW_HEIGHT/2);
|
||||
$camera.resize(double(BOSS_VIEW_WIDTH)/ratio, double(BOSS_VIEW_HEIGHT)/ratio);
|
||||
$camera.move(float(cell.mid_x), float(cell.mid_y));
|
||||
$camera.play();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue