diff --git a/assets/bush.png b/assets/bush.png new file mode 100644 index 00000000..f7d93bf5 Binary files /dev/null and b/assets/bush.png differ diff --git a/configurations/demo-config-1/locations/location-1/location-1.json b/configurations/demo-config-1/locations/location-1/location-1.json index 5cb6e075..43b49b95 100644 --- a/configurations/demo-config-1/locations/location-1/location-1.json +++ b/configurations/demo-config-1/locations/location-1/location-1.json @@ -1,13 +1,55 @@ { "tag": "location-1", "objects": [ - { "tag": "object-1", "position": { "row": 1, "col": 8 }, "type": "collectible", "assetPath": "assets/diamond.png" }, - { "tag": "object-2", "position": { "row": 6, "col": 3 }, "type": "collectible", "assetPath": "assets/key.png" }, - { "tag": "object-3", "position": { "row": 1, "col": 1 }, "type": "quiz", "assetPath": "assets/zombie.png" }, - { "tag": "object-4", "position": { "row": 3, "col": 2 }, "type": "dialog", "assetPath": "assets/zombie.png" }, - { "tag": "object-5", "position": { "row": 8, "col": 8 }, "type": "dialog", "assetPath": "assets/chest.png" } + { "tag": "mul-1", "position": { "row": 4, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 3 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 3 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 8 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "object-1", "position": { "row": 7, "col": 8 }, "assetPath": "assets/diamond.png" }, + { "tag": "object-2", "position": { "row": 6, "col": 3 }, "assetPath": "assets/key.png" }, + { "tag": "object-3", "position": { "row": 2, "col": 0 }, "assetPath": "assets/zombie.png" }, + { "tag": "object-4", "position": { "row": 3, "col": 7 }, "assetPath": "assets/zombie.png" }, + { "tag": "object-5", "position": { "row": 9, "col": 8 }, "assetPath": "assets/chest.png" }, + { "tag": "object-6", "position": { "row": 9, "col": 9 }, "assetPath": "assets/bush.png" } ], "backgroundPath": "assets/map.png", + "north": "location-2", "width": 10, "height": 10 } diff --git a/configurations/demo-config-1/locations/location-1/objects/object-1.json b/configurations/demo-config-1/locations/location-1/objects/object-1.json new file mode 100644 index 00000000..6e24f567 --- /dev/null +++ b/configurations/demo-config-1/locations/location-1/objects/object-1.json @@ -0,0 +1,4 @@ +{ + "tag": "object-1", + "onLeftClick": {"tag": "change-location", "type": "location-change", "target-location": "location-2", "target-position": {"row": 9, "col": 0}} +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-1/objects/object-2.json b/configurations/demo-config-1/locations/location-1/objects/object-2.json new file mode 100644 index 00000000..03164a34 --- /dev/null +++ b/configurations/demo-config-1/locations/location-1/objects/object-2.json @@ -0,0 +1,4 @@ +{ + "tag": "object-2", + "onLeftClick": {"tag": "dialogue-action", "type": "dialogue", "statements": ["A key.,A, keyA, key.A, key.A, key.A, key.A, key.A, key.A key."], "assetPath": "assets/key.png"} +} diff --git a/configurations/demo-config-1/locations/location-1/objects/object-3.json b/configurations/demo-config-1/locations/location-1/objects/object-3.json new file mode 100644 index 00000000..7d324eba --- /dev/null +++ b/configurations/demo-config-1/locations/location-1/objects/object-3.json @@ -0,0 +1,20 @@ +{ + "tag": "object-3", + "assetPath": "assets/zombie.png", + "type": "dialog", + "onLeftClick": { + "tag": "quiz", + "type": "quiz", + "questions": [ + { + "question": "Programy komputerowe chronione są: ", + "a": "prawem autorskim, co wyklucza możliwość uzyskania ochrony patentowej przez program komputerowy", + "b": "prawem autorskim, a w pewnych przypadkach mogą uzyskać ochronę patentową", + "c": "jak utwory literackie", + "d": "nie są chronione", + "correct": "b" + } + ], + "reward": 5 + } +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-1/objects/object-4.json b/configurations/demo-config-1/locations/location-1/objects/object-4.json new file mode 100644 index 00000000..dd424f14 --- /dev/null +++ b/configurations/demo-config-1/locations/location-1/objects/object-4.json @@ -0,0 +1,20 @@ +{ + "tag": "object-4", + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "dialogue-action", + "type": "quiz", + "questions": [ + { + "question": "Warunkiem uznania oznaczenia za znak towarowy jest: ", + "a": "estetyczny wygląd", + "b": "zdolność odróżniająca znaku", + "c": "możliwość graficznego przedstawienia znaku", + "d": "żadne z powyższych", + "correct": "b" + } + + ], + "reward": 5 + } +} diff --git a/configurations/demo-config-1/locations/location-1/objects/object-5.json b/configurations/demo-config-1/locations/location-1/objects/object-5.json new file mode 100644 index 00000000..2f4bf363 --- /dev/null +++ b/configurations/demo-config-1/locations/location-1/objects/object-5.json @@ -0,0 +1,4 @@ +{ + "tag": "object-5", + "onLeftClick": {"tag": "dialogue", "type": "dialogue", "statements": ["A very old chest."], "assetPath": "assets/chest.png"} +} diff --git a/configurations/demo-config-1/locations/location-1/objects/object-6.json b/configurations/demo-config-1/locations/location-1/objects/object-6.json index 07ac4e32..a9c6d1dd 100644 --- a/configurations/demo-config-1/locations/location-1/objects/object-6.json +++ b/configurations/demo-config-1/locations/location-1/objects/object-6.json @@ -1 +1,11 @@ -{ "tag": "object-6", "position": { "row": 6, "col": 1 }, "type": "dialog", "assetPath": "assets/zombie.png" } +{ + "tag": "object-6", + "position": { "row": 6, "col": 1 }, + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "change-location", + "type": "location-change", + "target-location": "location-2", + "target-position": { "row": 6, "col": 1 } + } +} diff --git a/configurations/demo-config-1/locations/location-2/location-2.json b/configurations/demo-config-1/locations/location-2/location-2.json index d2d28801..be870b11 100644 --- a/configurations/demo-config-1/locations/location-2/location-2.json +++ b/configurations/demo-config-1/locations/location-2/location-2.json @@ -1,13 +1,52 @@ { "tag": "location-2", "objects": [ - { "tag": "object-1", "position": { "row": 1, "col": 8 }, "type": "collectible", "assetPath": "assets/diamond.png" }, - { "tag": "object-2", "position": { "row": 6, "col": 3 }, "type": "collectible", "assetPath": "assets/key.png" }, - { "tag": "object-3", "position": { "row": 1, "col": 1 }, "type": "dialog", "assetPath": "assets/zombie.png" }, - { "tag": "object-4", "position": { "row": 3, "col": 2 }, "type": "dialog", "assetPath": "assets/zombie.png" }, - { "tag": "object-5", "position": { "row": 8, "col": 8 }, "type": "dialog", "assetPath": "assets/chest.png" } + { "tag": "mul-1", "position": { "row": 8, "col": 0 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 3 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 3 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 8 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "object-1", "position": { "row": 1, "col": 1 }, "assetPath": "assets/diamond.png" }, + { "tag": "object-2", "position": { "row": 15, "col": 15 }, "assetPath": "assets/key.png" }, + { "tag": "object-3", "position": { "row": 2, "col": 3 }, "assetPath": "assets/zombie.png" }, + { "tag": "object-4", "position": { "row": 6, "col": 0 }, "assetPath": "assets/zombie.png" }, + { "tag": "object-5", "position": { "row": 5, "col": 8 }, "assetPath": "assets/zombie.png" }, + { "tag": "object-6", "position": { "row": 7, "col": 4 }, "assetPath": "assets/chest.png" }, + { "tag": "object-7", "position": { "row": 7, "col": 7 }, "assetPath": "assets/bush.png" } ], - "backgroundPath": "assets/map10x10.png", - "width": 5, - "height": 5 + "backgroundPath": "assets/map.png", + "north": "location-3", + "width": 10, + "height": 10 } diff --git a/configurations/demo-config-1/locations/location-2/objects/object-1.json b/configurations/demo-config-1/locations/location-2/objects/object-1.json new file mode 100644 index 00000000..ed713947 --- /dev/null +++ b/configurations/demo-config-1/locations/location-2/objects/object-1.json @@ -0,0 +1,4 @@ +{ + "tag": "object-1", + "onLeftClick": {"tag": "actiontag" ,"type": "location-change", "target-location": "location-2", "target-position": {"row": 9, "col": 0}} +} diff --git a/configurations/demo-config-1/locations/location-2/objects/object-3.json b/configurations/demo-config-1/locations/location-2/objects/object-3.json new file mode 100644 index 00000000..84c6628e --- /dev/null +++ b/configurations/demo-config-1/locations/location-2/objects/object-3.json @@ -0,0 +1,19 @@ +{ + "tag": "object-3", + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "actiontag", + "type": "quiz", + "questions": [ + { + "question": "Autorskie prawa osobiste przysługują: ", + "a": "twórcy", + "b": "pracodawcy lub twórcy w określonych ustawą przypadkach", + "c": "inwestorowi lub twórcyc", + "d": "żadne z powyższych", + "correct": "a" + } + ], + "reward": 5 + } +} diff --git a/configurations/demo-config-1/locations/location-2/objects/object-4.json b/configurations/demo-config-1/locations/location-2/objects/object-4.json new file mode 100644 index 00000000..d4d2b2d0 --- /dev/null +++ b/configurations/demo-config-1/locations/location-2/objects/object-4.json @@ -0,0 +1,19 @@ +{ + "tag": "object-4", + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "actiontag", + "type": "quiz", + "questions": [ + { + "question": "Autorskie prawa majątkowe przysługują: ", + "a": "twórcy lub pracodawcy lub innemu podmiotowi wskazanemu przez ustawę", + "b": "zawsze twórcy", + "c": "inwestorowi", + "d": "żadne z powyższych", + "correct": "b" + } + ], + "reward": 5 + } +} diff --git a/configurations/demo-config-1/locations/location-2/objects/object-5.json b/configurations/demo-config-1/locations/location-2/objects/object-5.json new file mode 100644 index 00000000..c49149ab --- /dev/null +++ b/configurations/demo-config-1/locations/location-2/objects/object-5.json @@ -0,0 +1,19 @@ +{ + "tag": "object-5", + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "actiontag", + "type": "quiz", + "questions": [ + { + "question": "Programy komputerowe chronione są: ", + "a": "prawem autorskim, co wyklucza możliwość uzyskania ochrony patentowej przez program komputerowy", + "b": "prawem autorskim, a w pewnych przypadkach mogą uzyskać ochronę patentową", + "c": "jak utwory literackie", + "d": "nie są chronione", + "correct": "b" + } + ], + "reward": 5 + } +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-2/objects/object-6.json b/configurations/demo-config-1/locations/location-2/objects/object-6.json new file mode 100644 index 00000000..b83d3480 --- /dev/null +++ b/configurations/demo-config-1/locations/location-2/objects/object-6.json @@ -0,0 +1,4 @@ +{ + "tag": "object-6", + "onLeftClick": {"tag": "action", "type": "dialogue", "statements": ["A very old chest."], "assetPath": "assets/chest.png"} +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-3/location-3.json b/configurations/demo-config-1/locations/location-3/location-3.json new file mode 100644 index 00000000..fdbb2d1a --- /dev/null +++ b/configurations/demo-config-1/locations/location-3/location-3.json @@ -0,0 +1,53 @@ +{ + "tag": "location-3", + "objects": [ + { "tag": "mul-1", "position": { "row": 2, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 1 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 2 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 3 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 3 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 4 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 5 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 6 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 7 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 8 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 0, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 1, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 2, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 3, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 4, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 5, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 6, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 7, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 8, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "mul-1", "position": { "row": 9, "col": 9 }, "assetPath": "assets/bush.png" }, + { "tag": "object-1", "position": { "row": 6, "col": 5 }, "assetPath": "assets/diamond.png"}, + { "tag": "object-2", "position": { "row": 5, "col": 0 }, "assetPath": "assets/zombie.png" }, + { "tag": "object-3", "position": { "row": 1, "col": 1 }, "assetPath": "assets/zombie.png" } + ], + "backgroundPath": "assets/map.png", + "width": 10, + "height": 10 +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-3/objects/object-1.json b/configurations/demo-config-1/locations/location-3/objects/object-1.json new file mode 100644 index 00000000..efb5b13b --- /dev/null +++ b/configurations/demo-config-1/locations/location-3/objects/object-1.json @@ -0,0 +1,4 @@ +{ + "tag": "object-1", + "onLeftClick": {"tag": "actiontag", "type": "game-end", "description": "You won, congratulations!"} +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-3/objects/object-2.json b/configurations/demo-config-1/locations/location-3/objects/object-2.json new file mode 100644 index 00000000..0dc9b241 --- /dev/null +++ b/configurations/demo-config-1/locations/location-3/objects/object-2.json @@ -0,0 +1,19 @@ +{ + "tag": "object-2", + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "actiontag", + "type": "quiz", + "questions": [ + { + "question": "Autorskie prawa majątkowe przysługują: ", + "a": "twórcy lub pracodawcy lub innemu podmiotowi wskazanemu przez ustawę", + "b": "zawsze twórcy", + "c": "inwestorowi", + "d": "żadne z powyższych", + "correct": "b" + } + ], + "reward": 5 + } +} \ No newline at end of file diff --git a/configurations/demo-config-1/locations/location-3/objects/object-3.json b/configurations/demo-config-1/locations/location-3/objects/object-3.json new file mode 100644 index 00000000..a55aa570 --- /dev/null +++ b/configurations/demo-config-1/locations/location-3/objects/object-3.json @@ -0,0 +1,19 @@ +{ + "tag": "object-3", + "assetPath": "assets/zombie.png", + "onLeftClick": { + "tag": "actiontag", + "type": "quiz", + "questions": [ + { + "question": "Warunkiem uznania oznaczenia za znak towarowy jest: ", + "a": "estetyczny wygląd", + "b": "zdolność odróżniająca znaku", + "c": "możliwość graficznego przedstawienia znaku", + "d": "żadne z powyższych", + "correct": "b" + } + ], + "reward": 5 + } +} diff --git a/configurations/demo-config-1/root.json b/configurations/demo-config-1/root.json index 26c8872e..23123efc 100644 --- a/configurations/demo-config-1/root.json +++ b/configurations/demo-config-1/root.json @@ -2,7 +2,8 @@ "tag": "GameByConfig1", "locationTags": [ "location-1", - "location-2" + "location-2", + "location-3" ], "rootLocation": "location-1", "player": { diff --git a/src/main/java/io/rpg/util/ActionFactory.java b/src/main/java/io/rpg/util/ActionFactory.java index b2b3462f..823ca934 100644 --- a/src/main/java/io/rpg/util/ActionFactory.java +++ b/src/main/java/io/rpg/util/ActionFactory.java @@ -49,7 +49,7 @@ private static GameEndAction gameEndActionFromConfig(ActionConfigBundle config) private static DialogueAction dialogueActionFromConfig(ActionConfigBundle config) { // TODO: Move Image creation inside DialogueAction? Idk tbh. - return new DialogueAction(config.getDescription(), new Image(config.getAssetPath())); + return new DialogueAction(config.getDialogueStatements().get(0), new Image("file:" + config.getAssetPath())); } private static LocationChangeAction locationChangeActionFromConfig(ActionConfigBundle config) { @@ -57,6 +57,6 @@ private static LocationChangeAction locationChangeActionFromConfig(ActionConfigB } private static ShowDescriptionAction showDescriptionActionFromConfig(ActionConfigBundle config) { - return new ShowDescriptionAction(config.getDescription(), new Image(config.getAssetPath())); + return new ShowDescriptionAction(config.getDescription(), new Image("file:" + config.getAssetPath())); } }