void c_stageOne::logic() { entityManager.logicAll(); if ( check_collision(entityManager.get(0)->getBox(), player->getBox()) ){ set_next_State( STATE_HOUSE1 ); } else if ( check_collision(entityManager.get(1)->getBox(), player->getBox()) ){ set_next_State( STATE_HOUSE2 ); } else if ( check_collision(entityManager.get(2)->getBox(), player->getBox()) ){ set_next_State( STATE_STORE ); } else if (check_collision(entityManager.get(3)->getBox(), player->getBox()) ){ set_next_State( STATE_MANOR ); } else if (check_collision(exit, player->getBox()) && c_Manor_2F::isVisited){ set_next_State(STATE_GAMEWIN_WITH_FRIEND); } else if (check_collision(exit, player->getBox()) && !c_Manor_2F::isVisited){ narrator.setMessage( "No point in turning back now..." ); } else narrator.setMessage(""); if (enemy != NULL){ narrator.setMessage("You feel a cold wind through the air..."); } }
void c_Manor::logic() { entityManager.logicAll(); if ( check_collision( manor_player->getBox(), exit->getBox() ) == true ){ set_next_State( STATE_OVERWORLD ); } else if ( check_collision( manor_player->getBox(), upStairs->getBox() ) == true ){ set_next_State( STATE_MANOR2F ); } }
void c_Store::logic() { entityManager.logicAll(); if(!store_player->deadfriend_visited){ update_stereo_Position(); } if (check_collision( store_player->getBox(), exit->getBox()) == true ){ set_next_State(STATE_OVERWORLD); } else if (check_collision( store_player->getBox(), extensionDoor) == true ){ set_next_State(STATE_STORE_EXTENSION); } }
void c_Store_Extension::logic() { entityManager.logicAll(); if ( check_collision(store_player->getBox(), exit) ){ set_next_State(STATE_STORE); } }
void c_Manor_2F::logic() { entityManager.logicAll(); if ( check_collision( manor_player->getBox(), exit->getBox() ) == true ) { set_next_State(STATE_MANOR); } }