mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
ads-game:: do something about gameover, also spin the ship in handle_crashes
This commit is contained in:
parent
7c87df85ac
commit
ae0ab132e1
@ -148,7 +148,7 @@ bool ads_turn(int idelta) {
|
||||
if(right && up) ang = 45;
|
||||
if(right && down) ang = 315;
|
||||
|
||||
ld mul = clicks ? 1 : 0;
|
||||
ld mul = clicks && !game_over ? 1 : 0;
|
||||
if(clicks > 2) mul *= .3;
|
||||
if(pdata.fuel < 0) mul = 0;
|
||||
|
||||
|
@ -207,7 +207,7 @@ bool view_ads_game() {
|
||||
});
|
||||
}
|
||||
|
||||
if(true) {
|
||||
if(!game_over) {
|
||||
poly_outline = 0xFF;
|
||||
color_t shipcolor = 0x2020FFFF;
|
||||
if(ship_pt < invincibility_pt) {
|
||||
|
@ -220,8 +220,8 @@ void handle_crashes() {
|
||||
}
|
||||
}
|
||||
}
|
||||
for(int i=0; i<isize(shape_ship); i+=2) {
|
||||
hyperpoint h = kleinize(hpxyz(shape_ship[i], shape_ship[i+1], 1));
|
||||
if(!game_over) for(int i=0; i<isize(shape_ship); i+=2) {
|
||||
hyperpoint h = spin(ang*degree) * hpxyz(shape_ship[i], shape_ship[i+1], 1);
|
||||
for(auto r: rocks) {
|
||||
if(pointcrash(h, r->pts)) crash_ship();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user