mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
@@ -140,6 +140,9 @@ namespace battleship{
|
||||
|
||||
void ActiveGameState::onDettached() {
|
||||
AbstractAppState::onDettached();
|
||||
|
||||
offerScreen = false;
|
||||
tradingScreen = false;
|
||||
}
|
||||
|
||||
void ActiveGameState::updateCursor(){
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace battleship{
|
||||
Camera *cam = Root::getSingleton()->getCamera();
|
||||
cam->setPosition(Map::getSingleton()->getSpawnPoint(playerId) + Vector3(1, 1, 1) * configData::CAMERA_DISTANCE);
|
||||
cam->lookAt(Vector3(0, -1, -1).norm(), Vector3(0, 1, -1).norm());
|
||||
cam->setFarPlane(1000);
|
||||
|
||||
GameManager *gm = GameManager::getSingleton();
|
||||
StateManager *stateManager = gm->getStateManager();
|
||||
|
||||
@@ -212,9 +212,10 @@ namespace battleship{
|
||||
}
|
||||
|
||||
void Map::Minimap::update(){
|
||||
if(!GameManager::getSingleton()->getStateManager()->getAppStateByType(AppStateType::ACTIVE_STATE)) return;
|
||||
|
||||
Button *mb = ConcreteGuiManager::getSingleton()->getButton("minimap");
|
||||
|
||||
if(!(GameManager::getSingleton()->getStateManager()->getAppStateByType(AppStateType::ACTIVE_STATE) && mb)) return;
|
||||
|
||||
updateCamFrame(mb);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -49,8 +49,10 @@ namespace battleship{
|
||||
|
||||
void ResearchButton::update(){
|
||||
Button::update();
|
||||
|
||||
ActiveGameState *activeState = (ActiveGameState*)(GameManager::getSingleton()->getStateManager()->getAppStateByType((int)AppStateType::ACTIVE_STATE));
|
||||
|
||||
if(!activeState) return;
|
||||
|
||||
vector<int> technologies = activeState->getPlayer()->getTechnologies();
|
||||
bool hasTech = (find(technologies.begin(), technologies.end(), techId) != technologies.end());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user