Commit d9f889c4 authored by Aneta Steimarova's avatar Aneta Steimarova

#929 Fixed issue with click on object in Crime scene game

parent 37c71b4f
NewUserScenario
TestScenarioSpecial
TestScenarioHallOfFameRobberyTrophies
TestScenarioHeapOfTrophies
TestGameShootingRangeEasyNoneStar
TestGameRobberyMediumOneStar
TestGameInTheDarknessMedium
TestGameNightWatchMediumNoneStar
TestGamePursuitHardThreeStar
TestGameCrimeSceneEasyNoneStar
TestGameCrimeSceneEasyOneStar
TestGameCrimeSceneEasyTwoStar
TestGameCrimeSceneEasyThreeStar
TestGameCrimeSceneMediumNoneStar
TestGameCrimeSceneMediumOneStar
TestGameCrimeSceneMediumTwoStar
TestGameCrimeSceneMediumThreeStar
TestGameCrimeSceneHardNoneStar
TestGameCrimeSceneHardOneStar
TestGameKidnappingEasyTwoStar
TestGameRunesMediumThreeStar
TestGameProtocolEasyOneStar
TestGameSafeHardNoneStars
TestStatisticsInTheDarkness
TestEncyclopedia
TestProfile
OfficeTestScenario
TestGameCrimeSceneHardTwoStar
TestGameCrimeSceneHardThreeStar
......@@ -384,7 +384,7 @@ public abstract class AbstractTestScenario implements Runnable {
* @return true when successful
*/
//TODO - Add support for different fingers (pointers) and buttons
private boolean clickAt(final int x, final int y, final Stage stage) {
public boolean clickAt(final int x, final int y, final Stage stage) {
if (stage == null) {
logError("Stage is null");
stopTheTest();
......
......@@ -267,8 +267,7 @@ public class TestGameCrimeScene extends AbstractTestGame {
clickPosition = checkCollisionWithAnotherObjects(clickPosition,gameObject,objectLayer,gameMap);
//Click on game object
boolean result = touchDown(clickPosition.x, clickPosition.y,0, Input.Buttons.LEFT,gameObject.getStage());
result &= touchUp(clickPosition.x, clickPosition.y,0,Input.Buttons.LEFT,gameObject.getStage());
boolean result = clickAt((int)clickPosition.x, (int)clickPosition.y, gameObject.getStage());
if(!result){
logError("Cannot click on game object" + gameObject.getGameObjectType());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment