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
game_protocol_hard_pile = hromad
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_furniture_shelf = polic
......@@ -264,6 +287,7 @@ game_protocol_descriptor_green = zelen
game_protocol_descriptor_orange = oranžov
game_protocol_descriptor_white = bíl
game_protocol_descriptor_yellow = žlut
game_protocol_descriptor_brown = hněd
game_protocol_descriptor_big = velk
game_protocol_descriptor_small = mal
......@@ -289,6 +313,10 @@ game_protocol_descriptor_light = hoříc
game_protocol_descriptor_light_off = zhasnut
game_protocol_descriptor_open = otevřen
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_g = ého
......
......@@ -144,6 +144,7 @@ game_protocol_medium_umbrella = Schirm
game_protocol_medium_watch = Uhr
game_protocol_hard_box = Schachtel
game_protocol_hard_box_s = Schachtel
game_protocol_hard_flask = Phiole
game_protocol_hard_ingredient = Zutat
game_protocol_hard_liquid = Flüssigkeit
......@@ -158,6 +159,27 @@ game_protocol_hard_pen = Feder
game_protocol_hard_pile = Stapel
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_furniture_shelf = Regal
......@@ -180,6 +202,8 @@ game_protocol_descriptor_green = grün
game_protocol_descriptor_orange = orangefarben
game_protocol_descriptor_white = weiß
game_protocol_descriptor_yellow = gelb
game_protocol_descriptor_brown = braun
game_protocol_descriptor_big = groß
game_protocol_descriptor_small = klein
......@@ -207,6 +231,9 @@ game_protocol_descriptor_light = brennend
game_protocol_descriptor_light_off = ausgeschaltet
game_protocol_descriptor_open = offen
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
......
......@@ -273,7 +273,8 @@ game_protocol_medium_umbrella = dáždnik
game_protocol_medium_watch = hodink
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_ingredient = prísad
game_protocol_hard_liquid = tekutin
......@@ -291,6 +292,30 @@ game_protocol_hard_pen = per
game_protocol_hard_pile = hromad
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_furniture_shelf = polic
......@@ -314,6 +339,7 @@ game_protocol_descriptor_green = zelen
game_protocol_descriptor_orange = oranžov
game_protocol_descriptor_white = biel
game_protocol_descriptor_yellow = žlt
game_protocol_descriptor_brown = hned
game_protocol_descriptor_big = veľk
game_protocol_descriptor_small = mal
......@@ -339,7 +365,10 @@ game_protocol_descriptor_tin = cínov
game_protocol_descriptor_light = horiac
game_protocol_descriptor_light_off = zhasnut
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
......
Subproject commit d48f0101969ce29b45e73d3184133ed4b18fa964
Subproject commit 639658e27b59ae5209f7268e5af981d994876ba6
......@@ -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),
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),
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);
private final cz.nic.tablexia.shared.model.definitions.GameDefinition modelGameDefinition;
......
......@@ -649,6 +649,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
public void addObjectForOutline(ObjectModel objectModel, boolean needUpdate){
Vector2 screenPosition = objectModel.getScreenPosition();
outLineGroup.addObject(
objectModel,
objectModel.getType(),
objectModel.getTexture(),
objectModel.getTypePosition(),
......@@ -868,13 +869,11 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
WallType wallType = null;
if(putPoint != null) {
Color putColor = getColorByClick(putPoint.x, putPoint.y);
furnitureType = isAtFurniture(putColor);
furnitureType = isAtFurniture(putPoint);
}
if(wallPoint != null) {
Color wallColor = getColorByClick(wallPoint.x, wallPoint.y);
wallType = isAtWall(wallColor);
wallType = isAtWall(wallPoint);
}
//1. Check furniture position
......@@ -884,7 +883,6 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
//2. Check floor position
if(isAtFloor(centerColor)){
//object move to floor
return new PositionTransfer(RoomPosition.FLOOR, null, null);
}
......@@ -893,7 +891,7 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
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) {
......@@ -902,21 +900,23 @@ public class ProtocolGame extends AbstractTablexiaGame<ProtocolGameState> {
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());
}
private WallType isAtWall(Color touchColor) {
private WallType isAtWall(Vector2 checkPoint) {
Color touchColor = getColorByClick(checkPoint.x, checkPoint.y);
WallType wallType = WallType.getWallTypeByColor(touchColor);
if(wallType == null)
wallType = isAtWallBehindFurniture(touchColor);
wallType = isAtWallBehindFurniture(touchColor, checkPoint);
return wallType;
}
private WallType isAtWallBehindFurniture(Color touchColor){
return FurnitureType.getFurnitureWallByColor(touchColor);
private WallType isAtWallBehindFurniture(Color touchColor, Vector2 objectPoint){
return FurnitureType.getFurnitureWallByColor(touchColor, objectPoint , roomGroup.getWidth(), roomGroup.getHeight(), getGameDifficulty());
}
private Color getColorByClick(float x, float y) {
......
......@@ -390,6 +390,7 @@ public final class ProtocolAssets {
//////////////////////////// TEXT
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 INGREDIENT_TEXT = "game_protocol_hard_ingredient";
public static final String LIQUID_TEXT = "game_protocol_hard_liquid";
......@@ -403,11 +404,100 @@ public final class ProtocolAssets {
public static final String PILE_TEXT = "game_protocol_hard_pile";
//////////////////////////// OBJECT DESCRIPTION
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 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;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.games.protocol.ProtocolGame;
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.furniture.Furniture;
import cz.nic.tablexia.game.games.protocol.gameobjects.wall.WallType;
......@@ -128,15 +129,15 @@ public class GameObject extends ObjectModel {
//////////////////////////// INITIALIZATION
public void initPoints(){
float xCenter = objectImage.getDrawable().getMinWidth() * type.getCenterRatio()[0];
float yCenter = objectImage.getDrawable().getMinHeight() * type.getCenterRatio()[1];
float minWidth = objectImage.getDrawable().getMinWidth();
float minHeight = objectImage.getDrawable().getMinHeight();
float xCenter = minWidth * type.getCenterRatio()[0];
float yCenter = minHeight * type.getCenterRatio()[1];
centerPosition = new Vector2(xCenter, yCenter);
float[] pointRatio = type.getPutRatio();
float minWidth = objectImage.getDrawable().getMinWidth();
float minHeight = objectImage.getDrawable().getMinHeight();
if(pointRatio != null) {
putPoint = new Vector2(minWidth * pointRatio[0], minHeight * pointRatio[1]);
}
......@@ -149,16 +150,36 @@ public class GameObject extends ObjectModel {
}
}
private void changeWallPointPosition(){
if(type.getWallRatio() == null)
return;
float minWidth = objectImage.getDrawable().getMinWidth();
float minHeight = objectImage.getDrawable().getMinHeight();
if(!middle) {
wallPoint.x = minWidth * (rotate ? (1f - type.getWallRatio()[0]) : type.getWallRatio()[0]);
wallPoint.y = minHeight * type.getWallRatio()[1];
}else {
wallPoint.x = minWidth / 2;
wallPoint.y = minHeight / 2;
}
}
private void initEdgePoint(WallObjectDescriptor descriptor){
float minWidth = objectImage.getDrawable().getMinWidth();
float minHeight = objectImage.getDrawable().getMinHeight();
if(!middle) {
rBPoint = new Vector2(minWidth * (rotate ? (1.f - descriptor.getlBRatio()[0]) : descriptor.getrBRatio()[0]), minHeight * (rotate ? descriptor.getlBRatio()[1] : descriptor.getrBRatio()[1]));
rTPoint = new Vector2(minWidth * (rotate ? (1.f - descriptor.getlTRatio()[0]) : descriptor.getrTRatio()[0]), minHeight * (rotate ? descriptor.getlTRatio()[1] : descriptor.getrTRatio()[1]));
EdgePoints edgePoints = descriptor.getEdgePoints();
rBPoint = new Vector2(minWidth * (rotate ? (1.f - edgePoints.getlBRatio()[0]) : edgePoints.getrBRatio()[0]), minHeight * (rotate ? edgePoints.getlBRatio()[1] : edgePoints.getrBRatio()[1]));
rTPoint = new Vector2(minWidth * (rotate ? (1.f - edgePoints.getlTRatio()[0]) : edgePoints.getrTRatio()[0]), minHeight * (rotate ? edgePoints.getlTRatio()[1] : edgePoints.getrTRatio()[1]));
lBPoint = new Vector2(minWidth * (rotate ? (1.f - descriptor.getrBRatio()[0]) : descriptor.getlBRatio()[0]), minHeight * (rotate ? descriptor.getrBRatio()[1] : descriptor.getlBRatio()[1]));
lTPoint = new Vector2(minWidth * (rotate ? (1.f - descriptor.getrTRatio()[0]) : descriptor.getlTRatio()[0]), minHeight * (rotate ? descriptor.getrTRatio()[1] : descriptor.getlTRatio()[1]));
lBPoint = new Vector2(minWidth * (rotate ? (1.f - edgePoints.getrBRatio()[0]) : edgePoints.getlBRatio()[0]), minHeight * (rotate ? edgePoints.getrBRatio()[1] : edgePoints.getlBRatio()[1]));
lTPoint = new Vector2(minWidth * (rotate ? (1.f - edgePoints.getrTRatio()[0]) : edgePoints.getlTRatio()[0]), minHeight * (rotate ? edgePoints.getrTRatio()[1] : edgePoints.getlTRatio()[1]));
}else {
float topRatio = 0.97f;
float bottomRatio = 0.04f;
......@@ -286,9 +307,11 @@ public class GameObject extends ObjectModel {
this.rotate = rotate;
objectDrawable.flip(rotate ^ objectDrawable.isFlipX(), false);
if(canPutOnPosition(RoomPosition.WALL))
if(canPutOnPosition(RoomPosition.WALL)) {
changeWallPointPosition();
initEdgePoint(WallObjectDescriptor.getDescriptorByType(type));
}
}
public void middleTexture(boolean useMiddleTexture){
if(middle == useMiddleTexture)
......
......@@ -110,12 +110,34 @@ public enum GameObjectType implements TypeObjectDescriptor {
PEN (ProtocolAssets.PEN_CARD, ProtocolAssets.PEN_OBJECT, ProtocolAssets.PEN_TEXT, new float[]{0.4f,0.16f}, new float[]{0.5f, 0.5f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
PILE_OF_BOXES (ProtocolAssets.PILE_OF_BOXES_CARD, ProtocolAssets.PILE_OF_BOXES_OBJECT, ProtocolAssets.PILE_TEXT, new float[]{0.44f,0.047f}, null, null, new RoomPosition[]{RoomPosition.FLOOR}),
ROUND_FLASK (ProtocolAssets.ROUND_FLASK_CARD, ProtocolAssets.ROUND_FLASK_OBJECT, ProtocolAssets.FLASK_TEXT, new float[]{0.58f,0.136f}, new float[]{0.5f, 0.13f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
SMALL_BOX (ProtocolAssets.SMALL_BOX_CARD, ProtocolAssets.SMALL_BOX_OBJECT, ProtocolAssets.BOX_TEXT, new float[]{0.54f,0.17f}, new float[]{0.5f, 0.42f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
SMALL_BOX (ProtocolAssets.SMALL_BOX_CARD, ProtocolAssets.SMALL_BOX_OBJECT, ProtocolAssets.BOX_S_TEXT, new float[]{0.54f,0.17f}, new float[]{0.5f, 0.42f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
SMOKE_TUBE (ProtocolAssets.SMOKE_TUBE_CARD, ProtocolAssets.SMOKE_TUBE_OBJECT, ProtocolAssets.TUBE_TEXT, new float[]{0.358f,0.089f}, new float[]{0.358f,0.089f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
TUBE (ProtocolAssets.TUBE_CARD, ProtocolAssets.TUBE_OBJECT, ProtocolAssets.TUBE_TEXT, new float[]{0.42f,0.12f}, new float[]{0.42f,0.12f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
TUBES_IN_STAND (ProtocolAssets.TUBES_IN_STAND_CARD, ProtocolAssets.TUBES_IN_STAND_OBJECT, ProtocolAssets.TUBES_TEXT, new float[]{0.44f,0.07f}, new float[]{0.52f, 0.23f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
WHITE_INGREDIENT (ProtocolAssets.WHITE_INGREDIENT_CARD, ProtocolAssets.WHITE_INGREDIENT_OBJECT, ProtocolAssets.INGREDIENT_TEXT, new float[]{0.57f,0.14f}, new float[]{0.52f, 0.14f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
YELLOW_LIQUID (ProtocolAssets.YELLOW_LIQUID_CARD, ProtocolAssets.YELLOW_LIQUID_OBJECT, ProtocolAssets.LIQUID_TEXT, new float[]{0.55f,0.104f}, new float[]{0.5f, 0.14f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE});
YELLOW_LIQUID (ProtocolAssets.YELLOW_LIQUID_CARD, ProtocolAssets.YELLOW_LIQUID_OBJECT, ProtocolAssets.LIQUID_TEXT, new float[]{0.55f,0.104f}, new float[]{0.5f, 0.14f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
//BONUS
BAG (ProtocolAssets.BAG_CARD, ProtocolAssets.BAG_OBJECT, ProtocolAssets.BAG_TEXT, new float[]{0.44f, 0.07f}, new float[]{0.62f, 0.29f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
BIG_BOOK (ProtocolAssets.BIG_BOOK_CARD, ProtocolAssets.BIG_BOOK_OBJECT, ProtocolAssets.BOOK_TEXT, new float[]{0.44f, 0.08f}, new float[]{0.5f, 0.5f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
BIG_GLOBE (ProtocolAssets.BIG_GLOBE_CARD, ProtocolAssets.BIG_GLOBE_OBJECT, ProtocolAssets.GLOBE_TEXT, new float[]{0.5f, 0.04f}, null, null, new RoomPosition[]{RoomPosition.FLOOR}),
BROWN_BOOK (ProtocolAssets.BROWN_BOOK_CARD, ProtocolAssets.BROWN_BOOK_OBJECT, ProtocolAssets.BOOK_TEXT, new float[]{0.62f, 0.06f}, new float[]{0.5f, 0.58f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
ELEPHANT (ProtocolAssets.ELEPHANT_CARD, ProtocolAssets.ELEPHANT_OBJECT, ProtocolAssets.STATUETTE_ELEPHANT_TEXT, new float[]{0.45f, 0.1f}, new float[]{0.4f, 0.25f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
GIRAFFE (ProtocolAssets.GIRAFFE_CARD, ProtocolAssets.GIRAFFE_OBJECT, ProtocolAssets.STATUETTE_GIRAFFE_TEXT, new float[]{0.5f, 0.06f}, new float[]{0.5f, 0.2f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
GRAY_BOOK (ProtocolAssets.GRAY_BOOK_CARD, ProtocolAssets.GRAY_BOOK_OBJECT, ProtocolAssets.BOOK_TEXT, new float[]{0.44f, 0.12f}, new float[]{0.5f, 0.5f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
KABUKI (ProtocolAssets.KABUKI_CARD, ProtocolAssets.KABUKI_OBJECT, ProtocolAssets.KABUKI_MASK_TEXT, new float[]{0.63f, 0.35f}, null, new float[]{0.5f, 0.5f}, new RoomPosition[]{RoomPosition.WALL}),
KIMONO (ProtocolAssets.KIMONO_CARD, ProtocolAssets.KIMONO_OBJECT, ProtocolAssets.KIMONO_TEXT, new float[]{0.45f, 0.02f}, null, null, new RoomPosition[]{RoomPosition.FLOOR}),
LETTERS (ProtocolAssets.LETTERS_CARD, ProtocolAssets.LETTERS_OBJECT, ProtocolAssets.LETTER_TEXT, new float[]{0.31f, 0.12f}, new float[]{0.45f, 0.5f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
LION (ProtocolAssets.LION_CARD, ProtocolAssets.LION_OBJECT, ProtocolAssets.STATUETTE_LION_TEXT, new float[]{0.5f, 0.1f}, new float[]{0.5f, 0.3f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
MASK_AFRICA (ProtocolAssets.MASK_AFRICA_CARD, ProtocolAssets.MASK_AFRICA_OBJECT, ProtocolAssets.MASK_TEXT, new float[]{0.6f, 0.45f}, null, new float[]{0.5f, 0.5f}, new RoomPosition[]{RoomPosition.WALL}),
SHELLS (ProtocolAssets.SHELLS_CARD, ProtocolAssets.SHELLS_OBJECT, ProtocolAssets.BOX_TEXT, new float[]{0.42f, 0.07f}, new float[]{0.5f, 0.5f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
SMALL_BOOK (ProtocolAssets.SMALL_BOOK_CARD, ProtocolAssets.SMALL_BOOK_OBJECT, ProtocolAssets.BOOK_TEXT, new float[]{0.57f, 0.1f}, new float[]{0.5f, 0.5f}, null, new RoomPosition[]{RoomPosition.FLOOR, RoomPosition.FURNITURE}),
SMALL_GLOBE (ProtocolAssets.SMALL_GLOBE_CARD, ProtocolAssets.SMALL_GLOBE_OBJECT, ProtocolAssets.GLOBE_TEXT, new float[]{0.58f, 0.1f}, new float[]{0.56f, 0.12f}, null, new RoomPosition[]{