update for game logic

This commit is contained in:
Mohamed Nouffer
2022-11-08 15:29:42 +05:30
parent 991c6694c2
commit 78970ef5c3
2 changed files with 42 additions and 43 deletions

View File

@ -173,7 +173,7 @@ class DestinationController extends GetxController {
is_in_checkin.value = false;
});
}
else if(is_in_rog.value == true)
else if(is_in_rog.value == true && indexController.rog_mode == 1)
{
print("----- in location popup checkin cp - ${d.cp}----");
chekcs = 2;
@ -244,7 +244,7 @@ class DestinationController extends GetxController {
print("--- loc already checked in ${location_already_checked_in} ---");
if(isUser_logged_in && d.cp == -1 && location_already_checked_in){
//check for rogaining
if(is_at_goal.value == false && rogaining_counted.value && indexController.rog_mode == 1){
if(is_at_goal.value == false && rogaining_counted.value){
//goal
print("---- in goal -----");
chekcs = 5;
@ -369,11 +369,15 @@ class DestinationController extends GetxController {
// }
void resetRogaining(){
currentSelectedDestinations.forEach((element) {
deleteDestination(element);
});
is_in_checkin.value = false;
is_in_rog.value = false;
is_at_start.value = false;
is_at_goal.value = false;
destinations.clear();
_start = 0;
chekcs = 0;