Commit b9c67c27 authored by Aneta Steimarova's avatar Aneta Steimarova

Merge branch 'V3.7' into feature-HD-assets

parents 0f0bc806 62038657
...@@ -243,6 +243,29 @@ game_protocol_hard_pen = per ...@@ -243,6 +243,29 @@ game_protocol_hard_pen = per
game_protocol_hard_pile = hromad game_protocol_hard_pile = hromad
game_protocol_descriptor_of_boxes = krabic game_protocol_descriptor_of_boxes = krabic
game_protocol_bonus_bag = brašn
game_protocol_bonus_globe = glóbus
game_protocol_bonus_statuette_giraffe = sošk
game_protocol_bonus_statuette_lion = sošk
game_protocol_bonus_statuette_elephant = sošk
game_protocol_descriptor_elephant = slona
game_protocol_descriptor_giraffe = žirafy
game_protocol_bonus_kabuki = mask
game_protocol_bonus_mask = mask
game_protocol_bonus_kimono = kimon
game_protocol_bonus_letter = dopis
game_protocol_descriptor_in_packages = v balíčku
game_protocol_descriptor_lion = lva
game_protocol_descriptor_with_shells = s mušlemi
game_protocol_descriptor_of_books = knih
game_protocol_bonus_stand = stojan
game_protocol_descriptor_with_posters = s plakáty
game_protocol_bonus_table = stolek
game_protocol_descriptor_with_maps = s mapami
game_protocol_bonus_compass = kompas
game_protocol_bonus_hat = klobouk
game_protocol_bonus_pile = hromad
game_protocol_wall = zdi game_protocol_wall = zdi
game_protocol_furniture_shelf = polic game_protocol_furniture_shelf = polic
...@@ -264,6 +287,7 @@ game_protocol_descriptor_green = zelen ...@@ -264,6 +287,7 @@ game_protocol_descriptor_green = zelen
game_protocol_descriptor_orange = oranžov game_protocol_descriptor_orange = oranžov
game_protocol_descriptor_white = bíl game_protocol_descriptor_white = bíl
game_protocol_descriptor_yellow = žlut game_protocol_descriptor_yellow = žlut
game_protocol_descriptor_brown = hněd
game_protocol_descriptor_big = velk game_protocol_descriptor_big = velk
game_protocol_descriptor_small = mal game_protocol_descriptor_small = mal
...@@ -289,6 +313,10 @@ game_protocol_descriptor_light = hoříc ...@@ -289,6 +313,10 @@ game_protocol_descriptor_light = hoříc
game_protocol_descriptor_light_off = zhasnut game_protocol_descriptor_light_off = zhasnut
game_protocol_descriptor_open = otevřen game_protocol_descriptor_open = otevřen
game_protocol_descriptor_smoke = dýmíc game_protocol_descriptor_smoke = dýmíc
game_protocol_descriptor_kabuki = kabuki
game_protocol_descriptor_africa = africk
game_protocol_descriptor_chinese = čínsk
game_protocol_descriptor_travel = cestovatelsk
game_protocol_descriptor_mm_s_i = ým game_protocol_descriptor_mm_s_i = ým
game_protocol_descriptor_mm_s_g = ého game_protocol_descriptor_mm_s_g = ého
......
...@@ -144,6 +144,7 @@ game_protocol_medium_umbrella = Schirm ...@@ -144,6 +144,7 @@ game_protocol_medium_umbrella = Schirm
game_protocol_medium_watch = Uhr game_protocol_medium_watch = Uhr
game_protocol_hard_box = Schachtel game_protocol_hard_box = Schachtel
game_protocol_hard_box_s = Schachtel
game_protocol_hard_flask = Phiole game_protocol_hard_flask = Phiole
game_protocol_hard_ingredient = Zutat game_protocol_hard_ingredient = Zutat
game_protocol_hard_liquid = Flüssigkeit game_protocol_hard_liquid = Flüssigkeit
...@@ -158,6 +159,27 @@ game_protocol_hard_pen = Feder ...@@ -158,6 +159,27 @@ game_protocol_hard_pen = Feder
game_protocol_hard_pile = Stapel game_protocol_hard_pile = Stapel
game_protocol_descriptor_of_boxes = Schachteln game_protocol_descriptor_of_boxes = Schachteln
game_protocol_bonus_bag = Umhängetasche
game_protocol_bonus_globe = Globus
game_protocol_bonus_statuette_giraffe = Giraffe Dekofigur
game_protocol_bonus_statuette_lion = Löwe Dekofigur
game_protocol_bonus_statuette_elephant = Elefant Dekofigur
game_protocol_bonus_kabuki = Kabuki-Maske
game_protocol_bonus_mask = Maske
game_protocol_bonus_kimono = Karateanzug
game_protocol_bonus_letter = Briefe
game_protocol_descriptor_in_packages = im Paket
game_protocol_descriptor_with_shells = mit Muscheln
game_protocol_descriptor_of_books = Bücher
game_protocol_bonus_stand = Plakatständer
game_protocol_bonus_table = Tisch
game_protocol_descriptor_with_maps = mit Karten
game_protocol_bonus_compass = Kompass
game_protocol_bonus_hat = Hut
game_protocol_bonus_pile = Haufen
game_protocol_wall = Wand game_protocol_wall = Wand
game_protocol_furniture_shelf = Regal game_protocol_furniture_shelf = Regal
...@@ -180,6 +202,8 @@ game_protocol_descriptor_green = grün ...@@ -180,6 +202,8 @@ game_protocol_descriptor_green = grün
game_protocol_descriptor_orange = orangefarben game_protocol_descriptor_orange = orangefarben
game_protocol_descriptor_white = weiß game_protocol_descriptor_white = weiß
game_protocol_descriptor_yellow = gelb game_protocol_descriptor_yellow = gelb
game_protocol_descriptor_brown = braun
game_protocol_descriptor_big = groß game_protocol_descriptor_big = groß
game_protocol_descriptor_small = klein game_protocol_descriptor_small = klein
...@@ -207,6 +231,9 @@ game_protocol_descriptor_light = brennend ...@@ -207,6 +231,9 @@ game_protocol_descriptor_light = brennend
game_protocol_descriptor_light_off = ausgeschaltet game_protocol_descriptor_light_off = ausgeschaltet
game_protocol_descriptor_open = offen game_protocol_descriptor_open = offen
game_protocol_descriptor_smoke = rauchend game_protocol_descriptor_smoke = rauchend
game_protocol_descriptor_africa = Afrikanisch
game_protocol_descriptor_chinese = Chinesisch
game_protocol_descriptor_travel = reise
game_protocol_descriptor_m_d_1 = e game_protocol_descriptor_m_d_1 = e
......
...@@ -273,7 +273,8 @@ game_protocol_medium_umbrella = dáždnik ...@@ -273,7 +273,8 @@ game_protocol_medium_umbrella = dáždnik
game_protocol_medium_watch = hodink game_protocol_medium_watch = hodink
game_protocol_medium_watch_g = hodiniek game_protocol_medium_watch_g = hodiniek
game_protocol_hard_box = krabičk game_protocol_hard_box = krabic
game_protocol_hard_box_s = krabičk
game_protocol_hard_flask = bank game_protocol_hard_flask = bank
game_protocol_hard_ingredient = prísad game_protocol_hard_ingredient = prísad
game_protocol_hard_liquid = tekutin game_protocol_hard_liquid = tekutin
...@@ -291,6 +292,30 @@ game_protocol_hard_pen = per ...@@ -291,6 +292,30 @@ game_protocol_hard_pen = per
game_protocol_hard_pile = hromad game_protocol_hard_pile = hromad
game_protocol_descriptor_of_boxes = krabíc game_protocol_descriptor_of_boxes = krabíc
game_protocol_bonus_bag = tašk
game_protocol_bonus_globe = glóbus
game_protocol_bonus_statuette_giraffe = sošk
game_protocol_bonus_statuette_lion = sošk
game_protocol_bonus_statuette_elephant = sošk
game_protocol_descriptor_elephant = slona
game_protocol_descriptor_giraffe = žirafy
game_protocol_bonus_kabuki = mask
game_protocol_bonus_mask = mask
game_protocol_bonus_kimono = kimon
game_protocol_bonus_letter = list
game_protocol_descriptor_in_packages = v balíčku
game_protocol_descriptor_lion = lva
game_protocol_descriptor_with_shells = mušličiek
game_protocol_descriptor_of_books = kníh
game_protocol_bonus_stand = stojan
game_protocol_descriptor_with_posters = na plagáty
game_protocol_bonus_table = stolík
game_protocol_descriptor_with_maps = s mapami
game_protocol_bonus_compass = kompas
game_protocol_bonus_hat = klobúk
game_protocol_bonus_pile = hromad
game_protocol_wall = stene game_protocol_wall = stene
game_protocol_furniture_shelf = polic game_protocol_furniture_shelf = polic
...@@ -314,6 +339,7 @@ game_protocol_descriptor_green = zelen ...@@ -314,6 +339,7 @@ game_protocol_descriptor_green = zelen
game_protocol_descriptor_orange = oranžov game_protocol_descriptor_orange = oranžov
game_protocol_descriptor_white = biel game_protocol_descriptor_white = biel
game_protocol_descriptor_yellow = žlt game_protocol_descriptor_yellow = žlt
game_protocol_descriptor_brown = hned
game_protocol_descriptor_big = veľk game_protocol_descriptor_big = veľk
game_protocol_descriptor_small = mal game_protocol_descriptor_small = mal
...@@ -339,7 +365,10 @@ game_protocol_descriptor_tin = cínov ...@@ -339,7 +365,10 @@ game_protocol_descriptor_tin = cínov
game_protocol_descriptor_light = horiac game_protocol_descriptor_light = horiac
game_protocol_descriptor_light_off = zhasnut game_protocol_descriptor_light_off = zhasnut
game_protocol_descriptor_open = otvoren game_protocol_descriptor_open = otvoren
game_protocol_descriptor_kabuki = kabuki
game_protocol_descriptor_africa = africk
game_protocol_descriptor_chinese = čínsk
game_protocol_descriptor_travel = cestovateľsk
#vzor pekny - singular #vzor pekny - singular
......
Subproject commit d48f0101969ce29b45e73d3184133ed4b18fa964 Subproject commit 639658e27b59ae5209f7268e5af981d994876ba6
...@@ -53,7 +53,7 @@ public enum GameDefinition implements ApplicationEvent, IMenuItem, INumberedDefi ...@@ -53,7 +53,7 @@ public enum GameDefinition implements ApplicationEvent, IMenuItem, INumberedDefi
IN_THE_DARKNESS (cz.nic.tablexia.shared.model.definitions.GameDefinition.IN_THE_DARKNESS, ApplicationTextManager.ApplicationTextsAssets.GAME_IN_THE_DARKNESS_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_IN_THE_DARKNESS_DESCRIPTION, InTheDarknessGame.class, true, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE_ERROR, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE_ERROR), IN_THE_DARKNESS (cz.nic.tablexia.shared.model.definitions.GameDefinition.IN_THE_DARKNESS, ApplicationTextManager.ApplicationTextsAssets.GAME_IN_THE_DARKNESS_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_IN_THE_DARKNESS_DESCRIPTION, InTheDarknessGame.class, true, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE_ERROR, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE_ERROR),
RUNES (cz.nic.tablexia.shared.model.definitions.GameDefinition.RUNES, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_DESCRIPTION, RunesGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE), RUNES (cz.nic.tablexia.shared.model.definitions.GameDefinition.RUNES, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_RUNES_DESCRIPTION, RunesGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE),
CRIME_SCENE (cz.nic.tablexia.shared.model.definitions.GameDefinition.CRIME_SCENE, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_DESCRIPTION, CrimeSceneGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE), CRIME_SCENE (cz.nic.tablexia.shared.model.definitions.GameDefinition.CRIME_SCENE, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_CRIME_SCENE_DESCRIPTION, CrimeSceneGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE),
PROTOCOL (cz.nic.tablexia.shared.model.definitions.GameDefinition.PROTOCOL,ApplicationTextManager.ApplicationTextsAssets.GAME_PROTOCOL_TITLE,ApplicationTextManager.ApplicationTextsAssets.GAME_PROTOCOL_DESCRIPTION, ProtocolGame.class,false,ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE,ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE), PROTOCOL (cz.nic.tablexia.shared.model.definitions.GameDefinition.PROTOCOL,ApplicationTextManager.ApplicationTextsAssets.GAME_PROTOCOL_TITLE,ApplicationTextManager.ApplicationTextsAssets.GAME_PROTOCOL_DESCRIPTION, ProtocolGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE,ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE),
SAFE (cz.nic.tablexia.shared.model.definitions.GameDefinition.SAFE, ApplicationTextManager.ApplicationTextsAssets.GAME_SAFE_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_SAFE_DESCRIPTION, SafeGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE); SAFE (cz.nic.tablexia.shared.model.definitions.GameDefinition.SAFE, ApplicationTextManager.ApplicationTextsAssets.GAME_SAFE_TITLE, ApplicationTextManager.ApplicationTextsAssets.GAME_SAFE_DESCRIPTION, SafeGame.class, false, true, ApplicationTextManager.ApplicationTextsAssets.GAME_SCORE, ApplicationTextManager.ApplicationTextsAssets.GAME_AVERAGE_SCORE);
private final cz.nic.tablexia.shared.model.definitions.GameDefinition modelGameDefinition; private final cz.nic.tablexia.shared.model.definitions.GameDefinition modelGameDefinition;
......
...@@ -649,6 +649,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> { ...@@ -649,6 +649,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
public void addObjectForOutline(ObjectModel objectModel, boolean needUpdate){ public void addObjectForOutline(ObjectModel objectModel, boolean needUpdate){
Vector2 screenPosition = objectModel.getScreenPosition(); Vector2 screenPosition = objectModel.getScreenPosition();
outLineGroup.addObject( outLineGroup.addObject(
objectModel,
objectModel.getType(), objectModel.getType(),
objectModel.getTexture(), objectModel.getTexture(),
objectModel.getTypePosition(), objectModel.getTypePosition(),
...@@ -868,13 +869,11 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> { ...@@ -868,13 +869,11 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
WallType wallType = null; WallType wallType = null;
if(putPoint != null) { if(putPoint != null) {
Color putColor = getColorByClick(putPoint.x, putPoint.y); furnitureType = isAtFurniture(putPoint);
furnitureType = isAtFurniture(putColor);
} }
if(wallPoint != null) { if(wallPoint != null) {
Color wallColor = getColorByClick(wallPoint.x, wallPoint.y); wallType = isAtWall(wallPoint);
wallType = isAtWall(wallColor);
} }
//1. Check furniture position //1. Check furniture position
...@@ -884,7 +883,6 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> { ...@@ -884,7 +883,6 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
//2. Check floor position //2. Check floor position
if(isAtFloor(centerColor)){ if(isAtFloor(centerColor)){
//object move to floor
return new PositionTransfer(RoomPosition.FLOOR, null, null); return new PositionTransfer(RoomPosition.FLOOR, null, null);
} }
...@@ -893,7 +891,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> { ...@@ -893,7 +891,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
return new PositionTransfer(RoomPosition.WALL, null, wallType); return new PositionTransfer(RoomPosition.WALL, null, wallType);
} }
return null; return FurnitureType.canPutObjectUnderFurnitures(centerColor, getGameDifficulty()) ? new PositionTransfer(RoomPosition.FLOOR, null, null) : null;
} }
private boolean isAtFloor(Color touchColor) { private boolean isAtFloor(Color touchColor) {
...@@ -902,21 +900,23 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> { ...@@ -902,21 +900,23 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
touchColor.equals(Color.GREEN)); touchColor.equals(Color.GREEN));
} }
private FurnitureType isAtFurniture(Color touchColor) { private FurnitureType isAtFurniture(Vector2 checkPoint) {
Color touchColor = getColorByClick(checkPoint.x, checkPoint.y);
return FurnitureType.getFurnitureTypeByColor(touchColor, getGameDifficulty()); return FurnitureType.getFurnitureTypeByColor(touchColor, getGameDifficulty());
} }
private WallType isAtWall(Color touchColor) { private WallType isAtWall(Vector2 checkPoint) {
Color touchColor = getColorByClick(checkPoint.x, checkPoint.y);
WallType wallType = WallType.getWallTypeByColor(touchColor); WallType wallType = WallType.getWallTypeByColor(touchColor);
if(wallType == null) if(wallType == null)
wallType = isAtWallBehindFurniture(touchColor); wallType = isAtWallBehindFurniture(touchColor, checkPoint);
return wallType; return wallType;
} }
private WallType isAtWallBehindFurniture(Color touchColor){ private WallType isAtWallBehindFurniture(Color touchColor, Vector2 objectPoint){
return FurnitureType.getFurnitureWallByColor(touchColor); return FurnitureType.getFurnitureWallByColor(touchColor, objectPoint , roomGroup.getWidth(), roomGroup.getHeight(), getGameDifficulty());
} }
private Color getColorByClick(float x, float y) { private Color getColorByClick(float x, float y) {
......
...@@ -390,6 +390,7 @@ public final class ProtocolAssets { ...@@ -390,6 +390,7 @@ public final class ProtocolAssets {
//////////////////////////// TEXT //////////////////////////// TEXT
public static final String BOX_TEXT = "game_protocol_hard_box"; public static final String BOX_TEXT = "game_protocol_hard_box";
public static final String BOX_S_TEXT = "game_protocol_hard_box_s";
public static final String FLASK_TEXT = "game_protocol_hard_flask"; public static final String FLASK_TEXT = "game_protocol_hard_flask";
public static final String INGREDIENT_TEXT = "game_protocol_hard_ingredient"; public static final String INGREDIENT_TEXT = "game_protocol_hard_ingredient";
public static final String LIQUID_TEXT = "game_protocol_hard_liquid"; public static final String LIQUID_TEXT = "game_protocol_hard_liquid";
...@@ -403,11 +404,100 @@ public final class ProtocolAssets { ...@@ -403,11 +404,100 @@ public final class ProtocolAssets {
public static final String PILE_TEXT = "game_protocol_hard_pile"; public static final String PILE_TEXT = "game_protocol_hard_pile";
//////////////////////////// OBJECT DESCRIPTION //////////////////////////// OBJECT DESCRIPTION
public static final String IN_STAND = "game_protocol_descriptor_in_stand"; public static final String IN_STAND = "game_protocol_descriptor_in_stand";
public static final String OF_BOXES = "game_protocol_descriptor_of_boxes"; public static final String OF_BOXES = "game_protocol_descriptor_of_boxes";
public static final String SMOKE = "game_protocol_descriptor_smoke"; public static final String SMOKE = "game_protocol_descriptor_smoke";
//-------------------------------------- EASY --------------------------------------
//////////////////////////// BACKGROUND
public static final String TRAVELER_ROOM_BACKGROUND = SCREEN_PATH + "traveler_room";
public static final String TRAVELER_ROOM_COLOR_MAP = SCREEN_PATH + "traveler_room_color_map";
//////////////////////////// FURNITURE
public static final String CABINET_LEFT = FURNITURE_PATH + "cabinet_left";
public static final String CABINET_RIGHT = FURNITURE_PATH + "cabinet_right";
public static final String ROUND_TABLE = FURNITURE_PATH + "round_table";
//////////////////////////// FURNITURE - TEXT
//////////////////////////// CARDS
public static final String BAG_CARD = CARDS_PATH + "bag";
public static final String BIG_BOOK_CARD = CARDS_PATH + "big_book";
public static final String BIG_GLOBE_CARD = CARDS_PATH + "big_globe";
public static final String BROWN_BOOK_CARD = CARDS_PATH + "brown_book";
public static final String ELEPHANT_CARD = CARDS_PATH + "elephant";
public static final String GIRAFFE_CARD = CARDS_PATH + "giraffe";
public static final String GRAY_BOOK_CARD = CARDS_PATH + "gray_book";
public static final String KABUKI_CARD = CARDS_PATH + "kabuki";
public static final String KIMONO_CARD = CARDS_PATH + "kimono";
public static final String LETTERS_CARD = CARDS_PATH + "letters";
public static final String LION_CARD = CARDS_PATH + "lion";
public static final String MASK_AFRICA_CARD = CARDS_PATH + "mask_africa";
public static final String SHELLS_CARD = CARDS_PATH + "shells";
public static final String SMALL_BOOK_CARD = CARDS_PATH + "small_book";
public static final String SMALL_GLOBE_CARD = CARDS_PATH + "small_globe";
public static final String PILE_OF_BOOKS_CARD = CARDS_PATH + "stack_of_books";
public static final String STAND_FOR_POSTER_CARD = CARDS_PATH + "stand_for_poster";
public static final String TABLE_WITH_MAPS_CARD = CARDS_PATH + "table_with_maps";
public static final String CHINESE_VASE_CARD = CARDS_PATH + "chinese_vase";
public static final String COMPASS_CARD = CARDS_PATH + "compass";
public static final String TRAVEL_HAT_CARD = CARDS_PATH + "travel_hat";
//////////////////////////// OBJECTS
public static final String BAG_OBJECT = OBJECTS_PATH + "bag";
public static final String BIG_BOOK_OBJECT = OBJECTS_PATH + "big_book";
public static final String BIG_GLOBE_OBJECT = OBJECTS_PATH + "big_globe";
public static final String BROWN_BOOK_OBJECT = OBJECTS_PATH + "brown_book";
public static final String ELEPHANT_OBJECT = OBJECTS_PATH + "elephant";
public static final String GIRAFFE_OBJECT = OBJECTS_PATH + "giraffe";
public static final String GRAY_BOOK_OBJECT = OBJECTS_PATH + "gray_book";
public static final String KABUKI_OBJECT = OBJECTS_PATH + "kabuki";
public static final String KIMONO_OBJECT = OBJECTS_PATH + "kimono";
public static final String LETTERS_OBJECT = OBJECTS_PATH + "letters";
public static final String LION_OBJECT = OBJECTS_PATH + "lion";
public static final String MASK_AFRICA_OBJECT = OBJECTS_PATH + "mask_africa";
public static final String SHELLS_OBJECT = OBJECTS_PATH + "shells";
public static final String SMALL_BOOK_OBJECT = OBJECTS_PATH + "small_book";
public static final String SMALL_GLOBE_OBJECT = OBJECTS_PATH + "small_globe";
public static final String PILE_OF_BOOKS_OBJECT = OBJECTS_PATH + "stack_of_books";
public static final String STAND_FOR_POSTER_OBJECT = OBJECTS_PATH + "stand_for_poster";
public static final String TABLE_WITH_MAPS_OBJECT = OBJECTS_PATH + "table_with_maps";
public static final String CHINESE_VASE_OBJECT = OBJECTS_PATH + "chinese_vase";
public static final String COMPASS_OBJECT = OBJECTS_PATH + "compass";
public static final String TRAVEL_HAT_OBJECT = OBJECTS_PATH + "travel_hat";
//////////////////////////// TEXT
public static final String BAG_TEXT = "game_protocol_bonus_bag";
public static final String GLOBE_TEXT = "game_protocol_bonus_globe";
public static final String KABUKI_MASK_TEXT = "game_protocol_bonus_kabuki";
public static final String MASK_TEXT = "game_protocol_bonus_mask";
public static final String LETTER_TEXT = "game_protocol_bonus_letter";
public static final String KIMONO_TEXT = "game_protocol_bonus_kimono";
public static final String STAND_TEXT = "game_protocol_bonus_stand";
public static final String COMPASS_TEXT = "game_protocol_bonus_compass";
public static final String HAT_TEXT = "game_protocol_bonus_hat";
public static final String TABLE_B_TEXT = "game_protocol_bonus_table";
public static final String PILE_B_TEXT = "game_protocol_bonus_pile";
public static final String STATUETTE_GIRAFFE_TEXT = "game_protocol_bonus_statuette_giraffe";
public static final String STATUETTE_LION_TEXT = "game_protocol_bonus_statuette_lion";
public static final String STATUETTE_ELEPHANT_TEXT = "game_protocol_bonus_statuette_elephant";
//////////////////////////// OBJECT DESCRIPTION
public static final String ELEPHANT = "game_protocol_descriptor_elephant";
public static final String GIRAFFE = "game_protocol_descriptor_giraffe";
public static final String LION = "game_protocol_descriptor_lion";
public static final String WITH_SHELLS = "game_protocol_descriptor_with_shells";
public static final String OF_BOOKS = "game_protocol_descriptor_of_books";
public static final String WITH_POSTERS = "game_protocol_descriptor_with_posters";
public static final String WITH_MAPS = "game_protocol_descriptor_with_maps";
public static final String IN_PACKAGES = "game_protocol_descriptor_in_packages";
} }
...@@ -30,6 +30,7 @@ import com.badlogic.gdx.utils.Align; ...@@ -30,6 +30,7 @@ import com.badlogic.gdx.utils.Align;
import cz.nic.tablexia.TablexiaSettings; import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.games.protocol.ProtocolGame; import cz.nic.tablexia.game.games.protocol.ProtocolGame;
import cz.nic.tablexia.game.games.protocol.controller.RoomPosition; import cz.nic.tablexia.game.games.protocol.controller.RoomPosition;
import cz.nic.tablexia.game.games.protocol.gameobjects.descriptors.EdgePoints;
import cz.nic.tablexia.game.games.protocol.gameobjects.descriptors.WallObjectDescriptor; import cz.nic.tablexia.game.games.protocol.gameobjects.descriptors.WallObjectDescriptor;
import cz.nic.tablexia.game.games.protocol.gameobjects.furniture.Furniture; import cz.nic.tablexia.game.games.protocol.gameobjects.furniture.Furniture;
import cz.nic.tablexia.game.games.protocol.gameobjects.wall.WallType; import cz.nic.tablexia.game.games.protocol.gameobjects.wall.WallType;
...@@ -128,15 +129,15 @@ public class GameObject extends ObjectModel { ...@@ -128,15 +129,15 @@ public class GameObject extends ObjectModel {
//////////////////////////// INITIALIZATION //////////////////////////// INITIALIZATION
public void initPoints(){ public void initPoints(){
float xCenter = objectImage.getDrawable().getMinWidth() * type.getCenterRatio()[0]; float minWidth = objectImage.getDrawable().getMinWidth();
float yCenter = objectImage.getDrawable().getMinHeight() * type.getCenterRatio()[1]; float minHeight = objectImage.getDrawable().getMinHeight();
float xCenter = minWidth * type.getCenterRatio()[0];
float yCenter = minHeight * type.getCenterRatio()[1];
centerPosition = new Vector2(xCenter, yCenter); centerPosition = new Vector2(xCenter, yCenter);
float[] pointRatio = type.getPutRatio(); float[] pointRatio = type.getPutRatio();
float minWidth = objectImage.getDrawable().getMinWidth();