|
15 | 15 | ******************************************************************************/
|
16 | 16 | package com.bladecoder.engine;
|
17 | 17 |
|
18 |
| -import java.nio.IntBuffer; |
19 |
| -import java.text.MessageFormat; |
| 18 | +import java.nio.IntBuffer; |
| 19 | +import java.text.MessageFormat; |
20 | 20 |
|
21 |
| -import com.bladecoder.engine.BladeEngine; |
22 |
| - |
23 |
| -import com.badlogic.gdx.ApplicationListener; |
24 |
| -import com.badlogic.gdx.Gdx; |
25 |
| -import com.badlogic.gdx.graphics.GL20; |
26 |
| -import com.badlogic.gdx.utils.BufferUtils; |
| 21 | +import com.badlogic.gdx.ApplicationListener; |
| 22 | +import com.badlogic.gdx.Gdx; |
| 23 | +import com.badlogic.gdx.graphics.GL20; |
| 24 | +import com.badlogic.gdx.utils.BufferUtils; |
27 | 25 | import com.bladecoder.engine.assets.EngineAssetManager;
|
28 | 26 | import com.bladecoder.engine.model.World;
|
29 | 27 | import com.bladecoder.engine.ui.SceneScreen;
|
@@ -167,10 +165,18 @@ public void resize(int width, int height) {
|
167 | 165 | }
|
168 | 166 |
|
169 | 167 | @Override
|
170 |
| - public void pause() { |
171 |
| - EngineLogger.debug("GAME PAUSE"); |
172 |
| - ui.pause(); |
173 |
| - World.getInstance().saveGameState(); |
| 168 | + public void pause() { |
| 169 | + SceneScreen scnScr = (SceneScreen) ui.getScreen(Screens.SCENE_SCREEN); |
| 170 | + boolean bot = scnScr.getTesterBot().isEnabled(); |
| 171 | + boolean r = scnScr.getRecorder().isPlaying(); |
| 172 | + |
| 173 | + if(!bot && !r) { |
| 174 | + EngineLogger.debug("GAME PAUSE"); |
| 175 | + ui.pause(); |
| 176 | + World.getInstance().saveGameState(); |
| 177 | + } else { |
| 178 | + EngineLogger.debug("NOT PAUSING WHEN BOT IS RUNNING OR PLAYING RECORDED GAME"); |
| 179 | + } |
174 | 180 | }
|
175 | 181 |
|
176 | 182 | @Override
|
|
0 commit comments