Major refactoring for game objects
This commit is contained in:
1 parent
efb85f7328
commit
2cae9998a0
18 files changed
+547
-716
No files matched your search
@@ -10,10 +10,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Building",
|
||||
"texturePath": "resources/w/dorm/building_base017.png",
|
||||
"meshPath": "resources/w/dorm/dorm_building001.txt",
|
||||
@@ -23,10 +22,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Stairs",
|
||||
"texturePath": "resources/w/dorm/Staircase_Obj002sm.png",
|
||||
"meshPath": "resources/w/dorm/dorm_stairs001.txt",
|
||||
@@ -36,10 +34,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Door",
|
||||
"texturePath": "resources/w/dorm/Entrance003.png",
|
||||
"meshPath": "resources/w/dorm/dorm_entrance001.txt",
|
||||
@@ -49,10 +46,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Bed001",
|
||||
"texturePath": "resources/w/dorm/ikea_bed_bake002.png",
|
||||
"meshPath": "resources/w/dorm/ikea_bed001.txt",
|
||||
@@ -62,10 +58,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Chair001",
|
||||
"texturePath": "resources/w/dorm/ikea_chair_bake002.png",
|
||||
"meshPath": "resources/w/dorm/ikea_chair001.txt",
|
||||
@@ -75,10 +70,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Table001",
|
||||
"texturePath": "resources/w/dorm/ikea_table_bake003.png",
|
||||
"meshPath": "resources/w/dorm/ikea_table001.txt",
|
||||
@@ -88,50 +82,7 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -0.1,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
},
|
||||
{
|
||||
"name": "Phone001",
|
||||
"texturePath": "resources/w/dorm/phone001_tex001.png",
|
||||
"meshPath": "resources/w/dorm/phone001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.8729,
|
||||
"positionY": 1.04917,
|
||||
"positionZ": -12.5262,
|
||||
"scale": 1.0,
|
||||
"interactive": true,
|
||||
"item": {
|
||||
"id": "phone",
|
||||
"name": "Телефон",
|
||||
"description": "Я не могу себе представить жизнь без своего телефона",
|
||||
"icon": "resources/fire2.png",
|
||||
"radius": 0.3
|
||||
},
|
||||
"activateFunction" : "on_phone_pickup"
|
||||
},
|
||||
{
|
||||
"name": "Journal001",
|
||||
"texturePath": "resources/w/dorm/journal001_tex002.png",
|
||||
"meshPath": "resources/w/dorm/journal001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.05146,
|
||||
"positionY": 1.06711,
|
||||
"positionZ": -12.4661,
|
||||
"scale": 1.0,
|
||||
"interactive": true,
|
||||
"item": {
|
||||
"id": "journal",
|
||||
"name": "Журнал",
|
||||
"description": "Это мой журнал куда я вношу свои заметки.",
|
||||
"icon": "resources/fire2.png",
|
||||
"radius": 0.3
|
||||
},
|
||||
"activateFunction" : "on_journal_pickup"
|
||||
"scale": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,7 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"name": "door",
|
||||
@@ -23,8 +22,7 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"name": "inai",
|
||||
@@ -36,10 +34,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Table001",
|
||||
"texturePath": "resources/w/interior/ikea_table_bake003.png",
|
||||
"meshPath": "resources/w/interior/ikea_table001.txt",
|
||||
@@ -49,10 +46,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "Chair001",
|
||||
"texturePath": "resources/w/interior/ikea_chair_bake002.png",
|
||||
"meshPath": "resources/w/interior/ikea_chair001.txt",
|
||||
@@ -62,45 +58,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"name": "Bookshelf001",
|
||||
"texturePath": "resources/w/interior/ikea_bookshelf001_tex001.png",
|
||||
"meshPath": "resources/w/interior/ikea_bookshelf001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 1.9653,
|
||||
"positionY": 1.0911,
|
||||
"positionZ": 0.91977,
|
||||
"scale": 1.0,
|
||||
"interactive": true,
|
||||
"item": {
|
||||
"id": "phone",
|
||||
"name": "Телефон",
|
||||
"description": "Я не могу себе представить жизнь без своего телефона",
|
||||
"icon": "resources/fire2.png",
|
||||
"radius": 0.3
|
||||
},
|
||||
"activateFunction" : "on_bookshelf_clicked"
|
||||
},
|
||||
{
|
||||
"name": "Computer001",
|
||||
"texturePath": "resources/w/interior/computer_texture001.png",
|
||||
"meshPath": "resources/w/interior/computer001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.0916,
|
||||
"positionY": 1.1534,
|
||||
"positionZ": 1.0568,
|
||||
"scale": 1.0,
|
||||
"interactive": true,
|
||||
"activateFunction" : "on_computer_clicked"
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "DiningTable001",
|
||||
"texturePath": "resources/w/interior/dining_table_texture.png",
|
||||
"meshPath": "resources/w/interior/ikea_dining_table001.txt",
|
||||
@@ -110,52 +70,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
"name": "Knife001",
|
||||
"texturePath": "resources/w/white.png",
|
||||
"meshPath": "resources/w/interior/Knife.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": -2.26293,
|
||||
"positionY": 0.91414,
|
||||
"positionZ": 1.56758,
|
||||
"scale": 1.0,
|
||||
"interactive": true,
|
||||
"item": {
|
||||
"id": "knife",
|
||||
"name": "Серебряный нож",
|
||||
"description": "Этот серебряный нож я одолжил у Айпери, и я должен его вернуть.",
|
||||
"icon": "resources/fire2.png",
|
||||
"radius": 0.3
|
||||
},
|
||||
"activateFunction" : "on_knife_pickup"
|
||||
},
|
||||
{
|
||||
"name": "Book001",
|
||||
"texturePath": "resources/w/interior/book_tex002.png",
|
||||
"meshPath": "resources/w/interior/book001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 1.97952,
|
||||
"positionY": 0.95746,
|
||||
"positionZ": 0.786023,
|
||||
"scale": 1.0,
|
||||
"interactive": true,
|
||||
"item": {
|
||||
"id": "phone",
|
||||
"name": "Книга",
|
||||
"description": "Это книга о манасчи Жусупе Мамае.",
|
||||
"icon": "resources/fire2.png",
|
||||
"radius": 0.3
|
||||
},
|
||||
"activateFunction" : "on_book_pickup"
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "stairs",
|
||||
"texturePath": "resources/w/exterior/Staircase001.png",
|
||||
"meshPath": "resources/w/exterior/int_stairs001.txt",
|
||||
@@ -165,10 +82,9 @@
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree001",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -178,10 +94,9 @@
|
||||
"positionX": 10.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 12.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree002",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -191,10 +106,9 @@
|
||||
"positionX": -12,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 19.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree003",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -204,10 +118,9 @@
|
||||
"positionX": -12.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 8.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree004",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -217,10 +130,9 @@
|
||||
"positionX": -12.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree005",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -230,10 +142,9 @@
|
||||
"positionX": -12.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": -8.0,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree006",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -243,10 +154,9 @@
|
||||
"positionX": 8.49915,
|
||||
"positionY": -5.0,
|
||||
"positionZ": -2.59884,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree007",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -256,10 +166,9 @@
|
||||
"positionX": 14.5936,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 5.3401,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree008",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -269,10 +178,9 @@
|
||||
"positionX": 23.9295,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 9.00583,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree009",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -282,10 +190,9 @@
|
||||
"positionX": 29.8128,
|
||||
"positionY": -5.0,
|
||||
"positionZ": -1.45278,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
},
|
||||
{
|
||||
{
|
||||
"name": "tree010",
|
||||
"texturePath": "resources/w/exterior/tree001.png",
|
||||
"meshPath": "resources/w/exterior/tree003.txt",
|
||||
@@ -295,8 +202,7 @@
|
||||
"positionX": 33.1771,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 14.609,
|
||||
"scale": 1.0,
|
||||
"interactive": false
|
||||
"scale": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"objects": [
|
||||
{
|
||||
"name": "Phone001",
|
||||
"texturePath": "resources/w/dorm/phone001_tex001.png",
|
||||
"meshPath": "resources/w/dorm/phone001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.8729,
|
||||
"positionY": 1.04917,
|
||||
"positionZ": -12.5262,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 0.3,
|
||||
"activateFunction": "on_phone_pickup"
|
||||
},
|
||||
{
|
||||
"name": "Journal001",
|
||||
"texturePath": "resources/w/dorm/journal001_tex002.png",
|
||||
"meshPath": "resources/w/dorm/journal001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.05146,
|
||||
"positionY": 1.06711,
|
||||
"positionZ": -12.4661,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 0.3,
|
||||
"activateFunction": "on_journal_pickup"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"objects": [
|
||||
{
|
||||
"name": "Bookshelf001",
|
||||
"texturePath": "resources/w/interior/ikea_bookshelf001_tex001.png",
|
||||
"meshPath": "resources/w/interior/ikea_bookshelf001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 1.9653,
|
||||
"positionY": 1.0911,
|
||||
"positionZ": 0.91977,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 1.5,
|
||||
"activateFunction": "on_bookshelf_clicked"
|
||||
},
|
||||
{
|
||||
"name": "Computer001",
|
||||
"texturePath": "resources/w/interior/computer_texture001.png",
|
||||
"meshPath": "resources/w/interior/computer001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.0916,
|
||||
"positionY": 1.1534,
|
||||
"positionZ": 1.0568,
|
||||
"scale": 1.0,
|
||||
"activateFunction": "on_computer_clicked"
|
||||
},
|
||||
{
|
||||
"name": "Knife001",
|
||||
"texturePath": "resources/w/white.png",
|
||||
"meshPath": "resources/w/interior/Knife.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": -2.26293,
|
||||
"positionY": 0.91414,
|
||||
"positionZ": 1.56758,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 0.3,
|
||||
"activateFunction": "on_knife_pickup"
|
||||
},
|
||||
{
|
||||
"name": "Book001",
|
||||
"texturePath": "resources/w/interior/book_tex002.png",
|
||||
"meshPath": "resources/w/interior/book001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 1.97952,
|
||||
"positionY": 0.95746,
|
||||
"positionZ": 0.786023,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 1.5,
|
||||
"activateFunction": "on_book_pickup"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"id": "phone",
|
||||
"name": "Телефон",
|
||||
"description": "Я не могу себе представить жизнь без своего телефона",
|
||||
"icon": "resources/fire2.png"
|
||||
},
|
||||
{
|
||||
"id": "journal",
|
||||
"name": "Журнал",
|
||||
"description": "Это мой журнал куда я вношу свои заметки.",
|
||||
"icon": "resources/fire2.png"
|
||||
},
|
||||
{
|
||||
"id": "knife",
|
||||
"name": "Серебряный нож",
|
||||
"description": "Этот серебряный нож я одолжил у Айпери, и я должен его вернуть.",
|
||||
"icon": "resources/fire2.png"
|
||||
},
|
||||
{
|
||||
"id": "book",
|
||||
"name": "Книга",
|
||||
"description": "Это книга о манасчи Жусупе Мамае.",
|
||||
"icon": "resources/fire2.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20,12 +20,14 @@ journal_picked_up = false
|
||||
|
||||
function on_phone_pickup()
|
||||
game_api.pickup_item("phone")
|
||||
game_api.deactivate_interactive_object("Phone001")
|
||||
game_api.start_dialogue("dialog_phone_pickup001")
|
||||
phone_picked_up = true
|
||||
end
|
||||
|
||||
function on_journal_pickup()
|
||||
game_api.pickup_item("journal")
|
||||
game_api.deactivate_interactive_object("Journal001")
|
||||
game_api.start_dialogue("dialog_journal_pickup001")
|
||||
journal_picked_up = true
|
||||
end
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
lection_is_over = false
|
||||
|
||||
player_hold_book = false
|
||||
|
||||
function lection_hall_zone001_enter_callback()
|
||||
--game_api.start_dialogue("")
|
||||
@@ -37,13 +38,35 @@ game_api.set_trigger_zone_callbacks("knife_dialog_zone001",
|
||||
|
||||
function on_knife_pickup()
|
||||
game_api.pickup_item("knife")
|
||||
game_api.deactivate_interactive_object("Knife001")
|
||||
end
|
||||
|
||||
|
||||
function on_book_pickup()
|
||||
game_api.pickup_item("book")
|
||||
if not player_hold_book then
|
||||
game_api.pickup_item("book")
|
||||
game_api.deactivate_interactive_object("Book001")
|
||||
player_hold_book = true
|
||||
else
|
||||
game_api.remove_item("book")
|
||||
game_api.activate_interactive_object("Book001")
|
||||
player_hold_book = false
|
||||
end
|
||||
end
|
||||
|
||||
function on_bookshelf_clicked()
|
||||
if not player_hold_book then
|
||||
game_api.pickup_item("book")
|
||||
game_api.deactivate_interactive_object("Book001")
|
||||
player_hold_book = true
|
||||
else
|
||||
game_api.remove_item("book")
|
||||
game_api.activate_interactive_object("Book001")
|
||||
player_hold_book = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function on_npc_interact(npc_index)
|
||||
print("[Lua] NPC interaction! Index: " .. tostring(npc_index))
|
||||
if npc_index == 1 then
|
||||
|
||||
Reference in new issue
Block a user