Added covers, cross-fade
This commit is contained in:
parent
0f2b2e55af
commit
e618c91415
@ -27,7 +27,7 @@
|
||||
{
|
||||
"name": "inai",
|
||||
"texturePath": "resources/w/exterior/Building_work014.png",
|
||||
"meshPath": "resources/w/exterior/int_building002.txt",
|
||||
"meshPath": "resources/w/interior/Building_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
{
|
||||
"name": "Bookshelf001",
|
||||
"texturePath": "resources/w/interior/ikea_bookshelf001_tex001.png",
|
||||
"meshPath": "resources/w/interior/ikea_bookshelf001.txt",
|
||||
"meshPath": "resources/w/interior/ikea_bookshelf001_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 1.9653,
|
||||
"positionY": 1.0911,
|
||||
"positionZ": 0.91977,
|
||||
"positionX": 1.96532,
|
||||
"positionY": 0.96841,
|
||||
"positionZ": 0.919766,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 0.5,
|
||||
"activateFunction": "on_bookshelf_clicked"
|
||||
@ -17,13 +17,14 @@
|
||||
{
|
||||
"name": "Computer001",
|
||||
"texturePath": "resources/w/interior/computer_texture001.png",
|
||||
"meshPath": "resources/w/interior/computer001.txt",
|
||||
"meshPath": "resources/w/interior/computer001_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 5.0916,
|
||||
"positionY": 1.1534,
|
||||
"positionZ": 1.0568,
|
||||
"interactionRadius": 0.6,
|
||||
"scale": 1.0,
|
||||
"activateFunction": "on_computer_clicked"
|
||||
},
|
||||
@ -50,10 +51,24 @@
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 1.97952,
|
||||
"positionY": 0.95746,
|
||||
"positionZ": 0.786023,
|
||||
"positionZ": 0.85755,
|
||||
"scale": 0.5,
|
||||
"interactionRadius": 0.3,
|
||||
"activateFunction": "on_book_pickup"
|
||||
},
|
||||
{
|
||||
"name": "Note001",
|
||||
"texturePath": "resources/w/interior/note001_text001.png",
|
||||
"meshPath": "resources/w/interior/note001_001.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 3.82193,
|
||||
"positionY": 1.0438,
|
||||
"positionZ": 1.38456,
|
||||
"scale": 1.0,
|
||||
"interactionRadius": 0.3,
|
||||
"activateFunction": "on_note_pickup"
|
||||
},
|
||||
{
|
||||
"name": "Room_S_0_Leaf001",
|
||||
@ -147,6 +162,134 @@
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.5,
|
||||
"activateFunction": "on_hall_door_click"
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_Corridor_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_Corridor_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_Main_Hall_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_Main_Hall_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_North_1_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_North_1_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_South_1_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_South_1_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_North_2_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_North_2_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_South_2_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_South_2_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_North_3_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_North_3_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
},
|
||||
{
|
||||
"name": "Room_Cover_South_3_001",
|
||||
"texturePath": "resources/black.png",
|
||||
"meshPath": "resources/w/interior/Room_Cover_South_3_002.txt",
|
||||
"rotationX": 0.0,
|
||||
"rotationY": 0.0,
|
||||
"rotationZ": 0.0,
|
||||
"positionX": 0.0,
|
||||
"positionY": -5.0,
|
||||
"positionZ": 0.0,
|
||||
"scale": 1.0,
|
||||
"pivotX": 0.0,
|
||||
"pivotY": 0.0,
|
||||
"pivotZ": 0.0,
|
||||
"interactionRadius": 0.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -40,6 +40,95 @@
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"interactionRadius": 2.0,
|
||||
"enabled" : false
|
||||
},
|
||||
{
|
||||
"id": "npc_04_ghost",
|
||||
"name": "Призрак",
|
||||
"texturePath": "resources/w/ghost_skin001.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"positionX": -0.28594,
|
||||
"positionY": 0,
|
||||
"positionZ": 13.9641,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"interactionRadius": 1.0
|
||||
},
|
||||
{
|
||||
"id": "ghost_01x",
|
||||
"name": "Тень",
|
||||
"texturePath": "resources/w/ghost_skin002.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
|
||||
"animationActionAttackPath": "resources/w/float_attack003.anim",
|
||||
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
|
||||
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
|
||||
"positionX": 0.0,
|
||||
"positionY": 0.0,
|
||||
"positionZ": -6.4,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"hp": 35,
|
||||
"canAttack": true
|
||||
},
|
||||
{
|
||||
"id": "ghost_02x",
|
||||
"name": "Тень",
|
||||
"texturePath": "resources/w/ghost_skin002.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
|
||||
"animationActionAttackPath": "resources/w/float_attack003.anim",
|
||||
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
|
||||
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
|
||||
"positionX": -5.0,
|
||||
"positionY": 0.0,
|
||||
"positionZ": 12.0,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"hp": 35,
|
||||
"canAttack": true
|
||||
},
|
||||
{
|
||||
"id": "ghost_03x",
|
||||
"name": "Тень",
|
||||
"texturePath": "resources/w/ghost_skin002.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
|
||||
"animationActionAttackPath": "resources/w/float_attack003.anim",
|
||||
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
|
||||
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
|
||||
"positionX": 5.0,
|
||||
"positionY": 0.0,
|
||||
"positionZ": 12.0,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"hp": 35,
|
||||
"canAttack": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
"positionX": -0.141875,
|
||||
"positionY": 0.0,
|
||||
"positionZ": 9.75898,
|
||||
"radius": 1.7,
|
||||
"radius": 1.5,
|
||||
"hysteresis": 0.1,
|
||||
"enabled": true
|
||||
},
|
||||
@ -27,7 +27,7 @@
|
||||
"hysteresis": 0.1,
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
{
|
||||
"id": "book_dialog_zone001",
|
||||
"positionX":-0.757994,
|
||||
"positionY": 0.0,
|
||||
|
||||
@ -213,6 +213,32 @@
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "note_dialog001",
|
||||
"start": "line_1",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "line_1",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
||||
"text": "Здесь написано: прочитай меня вслух.",
|
||||
"next": "line_2"
|
||||
},
|
||||
{
|
||||
"id": "line_2",
|
||||
"type": "Line",
|
||||
"speaker": "Бекзат",
|
||||
"portrait": "resources/w/gg/gg2_s_podsvetkoy5.png",
|
||||
"text": "[Читает].",
|
||||
"next": "end_1"
|
||||
},
|
||||
{
|
||||
"id": "end_1",
|
||||
"type": "End"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "book_dialog002",
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
//precisionmediump float;
|
||||
uniform sampler2D Texture;
|
||||
uniform float uAlpha;
|
||||
varying vec2 texCoord;
|
||||
varying float fogDistance;
|
||||
|
||||
@ -14,5 +15,5 @@ void main()
|
||||
float fogFactor = clamp((fogDistance - 30.0) / 10.0, 0.0, 1.0);
|
||||
vec3 finalColor = mix(color.rgb, fogColor, fogFactor);
|
||||
|
||||
gl_FragColor = vec4(finalColor, color.a);
|
||||
gl_FragColor = vec4(finalColor, color.a * uAlpha);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
uniform sampler2D Texture;
|
||||
uniform sampler2D uShadowMap;
|
||||
uniform vec3 uLightDir;
|
||||
uniform float uAlpha;
|
||||
|
||||
varying vec2 texCoord;
|
||||
varying vec4 fragPosLightSpace;
|
||||
@ -74,5 +75,5 @@ void main()
|
||||
float fogFactor = clamp((fogDistance - 30.0) / 10.0, 0.0, 1.0);
|
||||
color.rgb = mix(color.rgb, fogColor, fogFactor);
|
||||
|
||||
gl_FragColor = color;
|
||||
gl_FragColor = vec4(color.rgb, color.a * uAlpha);
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ precision mediump float;
|
||||
uniform sampler2D Texture;
|
||||
uniform sampler2D uShadowMap;
|
||||
uniform vec3 uLightDir;
|
||||
uniform float uAlpha;
|
||||
|
||||
varying vec2 texCoord;
|
||||
varying vec4 fragPosLightSpace;
|
||||
@ -72,5 +73,5 @@ void main()
|
||||
float fogFactor = clamp((fogDistance - 30.0) / 10.0, 0.0, 1.0);
|
||||
color.rgb = mix(color.rgb, fogColor, fogFactor);
|
||||
|
||||
gl_FragColor = color;
|
||||
gl_FragColor = vec4(color.rgb, color.a * uAlpha);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
precision mediump float;
|
||||
uniform sampler2D Texture;
|
||||
uniform float uAlpha;
|
||||
varying vec2 texCoord;
|
||||
varying float fogDistance;
|
||||
|
||||
@ -14,5 +15,5 @@ void main()
|
||||
float fogFactor = clamp((fogDistance - 30.0) / 10.0, 0.0, 1.0);
|
||||
vec3 finalColor = mix(color.rgb, fogColor, fogFactor);
|
||||
|
||||
gl_FragColor = vec4(finalColor, color.a);
|
||||
gl_FragColor = vec4(finalColor, color.a * uAlpha);
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ teacher_told_about_book = false
|
||||
|
||||
night_time = false
|
||||
|
||||
player_in_darklands = false
|
||||
|
||||
function lection_hall_zone001_enter_callback()
|
||||
--game_api.start_dialogue("")
|
||||
--Start cutscene
|
||||
@ -32,8 +34,10 @@ function knife_dialog_zone001_enter_callback()
|
||||
game_api.switch_navigation(0)
|
||||
end
|
||||
else
|
||||
if (night_time == false) then
|
||||
game_api.start_dialogue("knife_dialog_second001")
|
||||
game_api.set_trigger_zone_enabled(1, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -114,22 +118,25 @@ game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
|
||||
function on_library_door_click()
|
||||
if (night_time) then
|
||||
game_api.start_dialogue("door_night_dialog001")
|
||||
else
|
||||
if (not lection_is_over) then
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
end
|
||||
if (night_time) then
|
||||
game_api.start_dialogue("door_night_dialog001")
|
||||
else
|
||||
if (not lection_is_over) then
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function on_teachers_door_click()
|
||||
if (not lection_is_over) then
|
||||
if (not teacher_arrived) then
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
else
|
||||
if (not teacher_door_opened) then
|
||||
teacher_door_opened = true
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -138,12 +145,15 @@ function on_hall_door_click()
|
||||
if (not hall_door_opened) then
|
||||
hall_door_opened = true
|
||||
game_api.rotate_object("Hall_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Main_Hall_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
end)
|
||||
game_api.set_npc_enabled(0, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function on_teacher_arrived()
|
||||
teacher_arrived = true
|
||||
print("Teacher arrived")
|
||||
end
|
||||
|
||||
@ -165,6 +175,7 @@ end
|
||||
end
|
||||
|
||||
function on_computer_clicked()
|
||||
print("on_computer_clicked--")
|
||||
if (night_time == false) then
|
||||
if (player_hold_book) then
|
||||
game_api.start_cutscene("test_cutscene_02")
|
||||
@ -176,7 +187,11 @@ end
|
||||
|
||||
function on_teacher_arrived_intermediate()
|
||||
game_api.rotate_object("Room_N_2_Leaf001", -90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_North_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
end)
|
||||
game_api.npc_walk_to(0, 3.19574, 0, 6.45595, on_teacher_arrived)
|
||||
teacher_arrived = true
|
||||
end
|
||||
|
||||
|
||||
@ -192,11 +207,93 @@ end)
|
||||
game_api.set_cutscene_callback("test_cutscene_02", function()
|
||||
print("Cutscene 2 done!")
|
||||
night_time = true
|
||||
game_api.set_trigger_zone_enabled(1, false)
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.switch_navigation(0)
|
||||
game_api.rotate_object("Room_N_2_Leaf001", 90, 0.01, nil)
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.activate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
game_api.activate_interactive_object("Room_Cover_North_1_001")
|
||||
game_api.activate_interactive_object("Room_Cover_North_2_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_3_001")
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 1, 0.01, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 1, 0.01, nil)
|
||||
game_api.fade_object("Room_Cover_North_1_001", 1, 0.01, nil)
|
||||
game_api.fade_object("Room_Cover_Main_Hall_001", 1, 0.01, nil)
|
||||
game_api.activate_interactive_object("Note001")
|
||||
|
||||
end)
|
||||
|
||||
function on_note_pickup()
|
||||
game_api.start_dialogue("note_dialog001")
|
||||
game_api.pickup_item("note_spell")
|
||||
game_api.deactivate_interactive_object("Note001")
|
||||
|
||||
-- After the moving to darklands:
|
||||
player_in_darklands = true
|
||||
darklands_fadein = 2.0
|
||||
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_South_1_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_1_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_South_2_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_2_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_North_1_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_1_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_North_2_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_North_3_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_Cover_Main_Hall_001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
end)
|
||||
|
||||
game_api.fade_object("Room_S_0_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_S_0_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_S_1_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_S_1_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_S_2_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_S_2_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_N_1_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_N_1_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Room_N_2_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Room_N_2_Leaf001")
|
||||
end)
|
||||
game_api.fade_object("Hall_Leaf001", 0, darklands_fadein, function()
|
||||
game_api.deactivate_interactive_object("Hall_Leaf001")
|
||||
end)
|
||||
|
||||
game_api.set_npc_enabled(2, true)
|
||||
game_api.set_npc_enabled(3, true)
|
||||
game_api.set_npc_enabled(4, true)
|
||||
game_api.set_npc_enabled(5, true)
|
||||
|
||||
end
|
||||
|
||||
|
||||
game_api.set_trigger_zone_callbacks("teacher_dialog_zone001",
|
||||
teacher_zone001_enter_callback,
|
||||
nil
|
||||
@ -207,4 +304,16 @@ game_api.set_trigger_zone_callbacks("book_dialog_zone001",
|
||||
book_dialog_zone001_exit_callback
|
||||
)
|
||||
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_1_001")
|
||||
game_api.deactivate_interactive_object("Note001")
|
||||
|
||||
|
||||
game_api.set_npc_enabled(0, false)
|
||||
|
||||
game_api.set_npc_enabled(2, false)
|
||||
game_api.set_npc_enabled(3, false)
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
|
||||
print("Lua script loaded successfully!")
|
||||
1820
resources/w/interior/Building_002.txt
Normal file
1820
resources/w/interior/Building_002.txt
Normal file
File diff suppressed because it is too large
Load Diff
9
resources/w/interior/Room_Cover_Corridor_002.txt
Normal file
9
resources/w/interior/Room_Cover_Corridor_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(7.88, -1.38, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(-15.88, 1.38, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(-15.88, -1.38, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(7.88, 1.38, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_Main_Hall_002.txt
Normal file
9
resources/w/interior/Room_Cover_Main_Hall_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(15.88, -5.83, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(8.12, 5.83, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(8.12, -5.83, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(15.88, 5.83, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_North_1_002.txt
Normal file
9
resources/w/interior/Room_Cover_North_1_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(-8.12, 1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(-15.88, 5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(-15.88, 1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(-8.12, 5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_North_2_002.txt
Normal file
9
resources/w/interior/Room_Cover_North_2_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(-0.12, 1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(-7.88, 5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(-7.88, 1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(-0.12, 5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_North_3_002.txt
Normal file
9
resources/w/interior/Room_Cover_North_3_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(7.88, 1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(0.12, 5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(0.12, 1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(7.88, 5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_South_1_002.txt
Normal file
9
resources/w/interior/Room_Cover_South_1_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(-8.12, -5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(-15.88, -1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(-15.88, -5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(-8.12, -1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_South_2_002.txt
Normal file
9
resources/w/interior/Room_Cover_South_2_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(-0.12, -5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(-7.88, -1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(-7.88, -5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(-0.12, -1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
9
resources/w/interior/Room_Cover_South_3_002.txt
Normal file
9
resources/w/interior/Room_Cover_South_3_002.txt
Normal file
@ -0,0 +1,9 @@
|
||||
===Vertices (Split by UV/Normal): 4
|
||||
V 0: Pos(7.88, -5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 0.0)
|
||||
V 1: Pos(0.12, -1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 1.0)
|
||||
V 2: Pos(0.12, -5.93, 7.45) Norm(0.0, 0.0, 1.0) UV(0.0, 0.0)
|
||||
V 3: Pos(7.88, -1.62, 7.45) Norm(0.0, 0.0, 1.0) UV(1.0, 1.0)
|
||||
|
||||
===Triangles (Indices): 2
|
||||
Tri: 0 1 2
|
||||
Tri: 0 3 1
|
||||
182
resources/w/interior/computer001_002.txt
Normal file
182
resources/w/interior/computer001_002.txt
Normal file
@ -0,0 +1,182 @@
|
||||
===Vertices (Split by UV/Normal): 119
|
||||
V 0: Pos(-0.321174, -0.380694, 0.03328) Norm(-0.577341, -0.577355, 0.577355) UV(0.622728, 0.985786)
|
||||
V 1: Pos(-0.321174, -0.080976, -0.12644) Norm(-0.577341, 0.577355, -0.577355) UV(0.701365, 0.838077)
|
||||
V 2: Pos(-0.321174, -0.380694, -0.12644) Norm(-0.57735, -0.577325, -0.577377) UV(0.701365, 0.985786)
|
||||
V 3: Pos(-0.321174, -0.080976, 0.03328) Norm(-0.57735, 0.577325, 0.577377) UV(0.84347, 0.785241)
|
||||
V 4: Pos(0.038545, -0.080976, -0.12644) Norm(0.57735, 0.577325, -0.577377) UV(0.764763, 0.962461)
|
||||
V 5: Pos(-0.321174, -0.080976, -0.12644) Norm(-0.577341, 0.577355, -0.577355) UV(0.764763, 0.785276)
|
||||
V 6: Pos(0.038545, -0.080976, 0.03328) Norm(0.577341, 0.577355, 0.577355) UV(-0.0, 0.985999)
|
||||
V 7: Pos(0.038545, -0.380694, -0.12644) Norm(0.577341, -0.577355, -0.577355) UV(0.078326, 0.83829)
|
||||
V 8: Pos(0.038545, -0.080976, -0.12644) Norm(0.57735, 0.577325, -0.577377) UV(0.078326, 0.985999)
|
||||
V 9: Pos(0.038545, -0.380694, 0.03328) Norm(0.57735, -0.577325, 0.577377) UV(0.843469, 0.962426)
|
||||
V 10: Pos(-0.321174, -0.380694, -0.12644) Norm(-0.57735, -0.577325, -0.577377) UV(0.922175, 0.785276)
|
||||
V 11: Pos(0.038545, -0.380694, -0.12644) Norm(0.577341, -0.577355, -0.577355) UV(0.922175, 0.962461)
|
||||
V 12: Pos(0.038545, -0.080976, -0.12644) Norm(0.57735, 0.577325, -0.577377) UV(0.717688, 0.0)
|
||||
V 13: Pos(-0.321174, -0.380694, -0.12644) Norm(-0.57735, -0.577325, -0.577377) UV(0.865397, 0.17727)
|
||||
V 14: Pos(-0.321174, -0.080976, -0.12644) Norm(-0.577341, 0.577355, -0.577355) UV(0.717688, 0.17727)
|
||||
V 15: Pos(-0.321174, -0.080976, 0.03328) Norm(-0.57735, 0.577325, 0.577377) UV(0.764763, 0.60813)
|
||||
V 16: Pos(0.038545, -0.380694, 0.03328) Norm(0.57735, -0.577325, 0.577377) UV(0.912472, 0.785241)
|
||||
V 17: Pos(0.038545, -0.080976, 0.03328) Norm(0.577341, 0.577355, 0.577355) UV(0.764763, 0.785241)
|
||||
V 18: Pos(-0.614892, 0.342792, 0.284424) Norm(-0.57734, -0.577355, 0.577355) UV(0.865397, 0.0)
|
||||
V 19: Pos(-0.614892, 0.561483, -0.134268) Norm(-0.57734, 0.577355, -0.577355) UV(0.973174, 0.206141)
|
||||
V 20: Pos(-0.614892, 0.342792, -0.134268) Norm(-0.577355, -0.577371, -0.577325) UV(0.865397, 0.206141)
|
||||
V 21: Pos(-0.614892, 0.561483, 0.284424) Norm(-0.577355, 0.577371, 0.577325) UV(0.206323, 0.553153)
|
||||
V 22: Pos(-0.0362, 0.561483, -0.134268) Norm(0.577355, 0.577371, -0.577325) UV(0.0, 0.83829)
|
||||
V 23: Pos(-0.614892, 0.561483, -0.134268) Norm(-0.57734, 0.577355, -0.577355) UV(0.0, 0.553246)
|
||||
V 24: Pos(-0.0362, 0.561483, 0.284424) Norm(0.57734, 0.577355, 0.577355) UV(0.867943, 0.277359)
|
||||
V 25: Pos(-0.0362, 0.342792, -0.134268) Norm(0.57734, -0.577355, -0.577355) UV(0.97572, 0.482684)
|
||||
V 26: Pos(-0.0362, 0.561483, -0.134268) Norm(0.577355, 0.577371, -0.577325) UV(0.867943, 0.482684)
|
||||
V 27: Pos(-0.0362, 0.342792, 0.284424) Norm(0.577355, -0.577371, 0.577325) UV(0.206322, 0.838197)
|
||||
V 28: Pos(-0.614892, 0.342792, -0.134268) Norm(-0.577355, -0.577371, -0.577325) UV(0.412645, 0.553246)
|
||||
V 29: Pos(-0.0362, 0.342792, -0.134268) Norm(0.57734, -0.577355, -0.577355) UV(0.412645, 0.83829)
|
||||
V 30: Pos(-0.0362, 0.561483, -0.134268) Norm(0.577355, 0.577371, -0.577325) UV(0.514952, 0.553153)
|
||||
V 31: Pos(-0.614892, 0.342792, -0.134268) Norm(-0.577355, -0.577371, -0.577325) UV(0.622728, 0.838334)
|
||||
V 32: Pos(-0.614892, 0.561483, -0.134268) Norm(-0.57734, 0.577355, -0.577355) UV(0.514952, 0.838334)
|
||||
V 33: Pos(-0.614892, 0.561483, 0.284424) Norm(-0.577355, 0.577371, 0.577325) UV(0.622728, 0.553153)
|
||||
V 34: Pos(-0.0362, 0.342792, 0.284424) Norm(0.577355, -0.577371, 0.577325) UV(0.730505, 0.838077)
|
||||
V 35: Pos(-0.0362, 0.561483, 0.284424) Norm(0.57734, 0.577355, 0.577355) UV(0.622728, 0.838077)
|
||||
V 36: Pos(-0.04492, -0.422368, 0.425114) Norm(-0.964019, -0.126929, -0.233572) UV(0.551589, 0.17729)
|
||||
V 37: Pos(0.154366, -0.062626, -0.106573) Norm(0.092451, 0.354611, -0.930432) UV(0.717688, 0.0)
|
||||
V 38: Pos(0.154366, -0.422368, -0.106573) Norm(0.09503, -0.342725, -0.934617) UV(0.717688, 0.17729)
|
||||
V 39: Pos(-0.04492, -0.062626, 0.425114) Norm(-0.95805, 0.148128, -0.245352) UV(0.049252, 0.277359)
|
||||
V 40: Pos(0.16953, 0.037313, 0.020093) Norm(0.364582, 0.91558, -0.169683) UV(0.275794, -0.0)
|
||||
V 41: Pos(0.154366, -0.062626, -0.106573) Norm(0.092451, 0.354611, -0.930432) UV(0.226542, 0.277359)
|
||||
V 42: Pos(-0.049131, 0.037313, 0.535225) Norm(-0.186957, 0.70094, 0.68828) UV(0.27372, 0.553153)
|
||||
V 43: Pos(0.16953, -0.522306, 0.020093) Norm(0.391468, -0.900748, -0.188163) UV(0.537026, 0.277359)
|
||||
V 44: Pos(0.16953, 0.037313, 0.020093) Norm(0.364582, 0.91558, -0.169683) UV(0.537026, 0.553153)
|
||||
V 45: Pos(-0.049131, -0.522306, 0.535225) Norm(-0.192057, -0.680692, 0.706946) UV(0.551589, -0.0)
|
||||
V 46: Pos(0.154366, -0.422368, -0.106573) Norm(0.09503, -0.342725, -0.934617) UV(0.325047, 0.277359)
|
||||
V 47: Pos(0.16953, -0.522306, 0.020093) Norm(0.391468, -0.900748, -0.188163) UV(0.275794, -0.0)
|
||||
V 48: Pos(0.16953, 0.037313, 0.020093) Norm(0.364582, 0.91558, -0.169683) UV(-0.0, 0.553153)
|
||||
V 49: Pos(0.154366, -0.422368, -0.106573) Norm(0.09503, -0.342725, -0.934617) UV(0.27372, 0.326611)
|
||||
V 50: Pos(0.154366, -0.062626, -0.106573) Norm(0.092451, 0.354611, -0.930432) UV(0.27372, 0.503901)
|
||||
V 51: Pos(-0.04492, -0.062626, 0.425114) Norm(-0.95805, 0.148128, -0.245352) UV(0.537025, 0.503901)
|
||||
V 52: Pos(-0.049131, -0.522306, 0.535225) Norm(-0.192057, -0.680692, 0.706946) UV(0.764763, 0.277359)
|
||||
V 53: Pos(-0.049131, 0.037313, 0.535225) Norm(-0.186957, 0.70094, 0.68828) UV(0.764763, 0.553154)
|
||||
V 54: Pos(0.269496, -0.567769, -0.048135) Norm(-0.468336, -0.577333, 0.668841) UV(0.730505, 0.883925)
|
||||
V 55: Pos(0.26061, 0.103404, -0.098532) Norm(-0.66884, 0.577347, -0.468319) UV(0.755124, 0.553154)
|
||||
V 56: Pos(0.26061, -0.567769, -0.098532) Norm(-0.668841, -0.57736, -0.468302) UV(0.755124, 0.883925)
|
||||
V 57: Pos(0.269496, 0.103404, -0.048135) Norm(-0.468342, 0.577346, 0.668826) UV(0.893159, 0.482684)
|
||||
V 58: Pos(0.468575, 0.103404, -0.135202) Norm(0.468342, 0.577346, -0.668826) UV(0.867943, 0.586724)
|
||||
V 59: Pos(0.26061, 0.103404, -0.098532) Norm(-0.66884, 0.577347, -0.468319) UV(0.867943, 0.482698)
|
||||
V 60: Pos(0.477461, 0.103404, -0.084805) Norm(0.66884, 0.577347, 0.468319) UV(0.97572, 0.60813)
|
||||
V 61: Pos(0.468575, -0.567769, -0.135202) Norm(0.468336, -0.577333, -0.668841) UV(1.0, 0.277359)
|
||||
V 62: Pos(0.468575, 0.103404, -0.135202) Norm(0.468342, 0.577346, -0.668826) UV(1.0, 0.60813)
|
||||
V 63: Pos(0.468575, -0.567769, -0.135202) Norm(0.468336, -0.577333, -0.668841) UV(0.918374, 0.586724)
|
||||
V 64: Pos(0.269496, -0.567769, -0.048135) Norm(-0.468336, -0.577333, 0.668841) UV(0.893159, 0.482684)
|
||||
V 65: Pos(0.26061, -0.567769, -0.098532) Norm(-0.668841, -0.57736, -0.468302) UV(0.918374, 0.482698)
|
||||
V 66: Pos(0.468575, 0.103404, -0.135202) Norm(0.468342, 0.577346, -0.668826) UV(0.412645, 0.883924)
|
||||
V 67: Pos(0.26061, -0.567769, -0.098532) Norm(-0.668841, -0.57736, -0.468302) UV(0.514952, 0.553153)
|
||||
V 68: Pos(0.26061, 0.103404, -0.098532) Norm(-0.66884, 0.577347, -0.468319) UV(0.514952, 0.883924)
|
||||
V 69: Pos(0.269496, 0.103404, -0.048135) Norm(-0.468342, 0.577346, 0.668826) UV(0.764763, 0.60813)
|
||||
V 70: Pos(0.477461, -0.567769, -0.084805) Norm(0.668841, -0.57736, 0.468302) UV(0.867943, 0.277359)
|
||||
V 71: Pos(0.477461, 0.103404, -0.084805) Norm(0.66884, 0.577347, 0.468319) UV(0.867943, 0.60813)
|
||||
V 72: Pos(0.243142, 0.221328, -0.083115) Norm(-0.577358, -0.577347, 0.577347) UV(0.551589, 0.260175)
|
||||
V 73: Pos(0.243142, 0.285422, -0.127209) Norm(-0.577358, 0.577347, -0.577347) UV(0.573298, 0.228587)
|
||||
V 74: Pos(0.243142, 0.221328, -0.127209) Norm(-0.577359, -0.577332, -0.577359) UV(0.573298, 0.260175)
|
||||
V 75: Pos(0.243142, 0.285422, -0.083115) Norm(-0.577359, 0.577332, 0.577359) UV(0.658221, 0.17729)
|
||||
V 76: Pos(0.347237, 0.285422, -0.127209) Norm(0.577359, 0.577332, -0.577359) UV(0.636492, 0.228573)
|
||||
V 77: Pos(0.243142, 0.285422, -0.127209) Norm(-0.577358, 0.577347, -0.577347) UV(0.636492, 0.177299)
|
||||
V 78: Pos(0.347237, 0.285422, -0.083115) Norm(0.577358, 0.577347, 0.577347) UV(0.573298, 0.260175)
|
||||
V 79: Pos(0.347237, 0.221328, -0.127209) Norm(0.577358, -0.577347, -0.577347) UV(0.594921, 0.228588)
|
||||
V 80: Pos(0.347237, 0.285422, -0.127209) Norm(0.577359, 0.577332, -0.577359) UV(0.594921, 0.260175)
|
||||
V 81: Pos(0.347237, 0.221328, -0.083115) Norm(0.577359, -0.577332, 0.577359) UV(0.614763, 0.228563)
|
||||
V 82: Pos(0.243142, 0.221328, -0.127209) Norm(-0.577359, -0.577332, -0.577359) UV(0.636492, 0.177299)
|
||||
V 83: Pos(0.347237, 0.221328, -0.127209) Norm(0.577358, -0.577347, -0.577347) UV(0.636492, 0.228573)
|
||||
V 84: Pos(0.347237, 0.285422, -0.127209) Norm(0.577359, 0.577332, -0.577359) UV(0.551589, 0.17729)
|
||||
V 85: Pos(0.243142, 0.221328, -0.127209) Norm(-0.577359, -0.577332, -0.577359) UV(0.583176, 0.228588)
|
||||
V 86: Pos(0.243142, 0.285422, -0.127209) Norm(-0.577358, 0.577347, -0.577347) UV(0.551589, 0.228588)
|
||||
V 87: Pos(0.243142, 0.285422, -0.083115) Norm(-0.577359, 0.577332, 0.577359) UV(0.583176, 0.17729)
|
||||
V 88: Pos(0.347237, 0.221328, -0.083115) Norm(0.577359, -0.577332, 0.577359) UV(0.614763, 0.228541)
|
||||
V 89: Pos(0.347237, 0.285422, -0.083115) Norm(0.577358, 0.577347, 0.577347) UV(0.583176, 0.228541)
|
||||
V 90: Pos(-0.321174, -0.080976, 0.03328) Norm(-0.57735, 0.577325, 0.577377) UV(0.622728, 0.838077)
|
||||
V 91: Pos(0.038545, -0.080976, 0.03328) Norm(0.577341, 0.577355, 0.577355) UV(0.84347, 0.962426)
|
||||
V 92: Pos(0.038545, -0.380694, 0.03328) Norm(0.57735, -0.577325, 0.577377) UV(-0.0, 0.83829)
|
||||
V 93: Pos(-0.321174, -0.380694, 0.03328) Norm(-0.577341, -0.577355, 0.577355) UV(0.843469, 0.785241)
|
||||
V 94: Pos(0.038545, -0.380694, -0.12644) Norm(0.577341, -0.577355, -0.577355) UV(0.865397, 0.0)
|
||||
V 95: Pos(-0.321174, -0.380694, 0.03328) Norm(-0.577341, -0.577355, 0.577355) UV(0.912472, 0.60813)
|
||||
V 96: Pos(-0.614892, 0.561483, 0.284424) Norm(-0.577355, 0.577371, 0.577325) UV(0.973174, 0.0)
|
||||
V 97: Pos(-0.0362, 0.561483, 0.284424) Norm(0.57734, 0.577355, 0.577355) UV(0.206323, 0.838198)
|
||||
V 98: Pos(-0.0362, 0.342792, 0.284424) Norm(0.577355, -0.577371, 0.577325) UV(0.97572, 0.277359)
|
||||
V 99: Pos(-0.614892, 0.342792, 0.284424) Norm(-0.57734, -0.577355, 0.577355) UV(0.206322, 0.553153)
|
||||
V 100: Pos(-0.0362, 0.342792, -0.134268) Norm(0.57734, -0.577355, -0.577355) UV(0.622728, 0.553153)
|
||||
V 101: Pos(-0.614892, 0.342792, 0.284424) Norm(-0.57734, -0.577355, 0.577355) UV(0.730505, 0.553153)
|
||||
V 102: Pos(-0.04492, -0.062626, 0.425114) Norm(-0.95805, 0.148128, -0.245352) UV(0.551589, 0.0)
|
||||
V 103: Pos(-0.049131, 0.037313, 0.535225) Norm(-0.186957, 0.70094, 0.68828) UV(-0.0, -0.0)
|
||||
V 104: Pos(-0.049131, -0.522306, 0.535225) Norm(-0.192057, -0.680692, 0.706946) UV(0.27372, 0.277359)
|
||||
V 105: Pos(-0.04492, -0.422368, 0.425114) Norm(-0.964019, -0.126929, -0.233572) UV(0.502336, 0.277359)
|
||||
V 106: Pos(0.16953, -0.522306, 0.020093) Norm(0.391468, -0.900748, -0.188163) UV(-0.0, 0.277359)
|
||||
V 107: Pos(-0.04492, -0.422368, 0.425114) Norm(-0.964019, -0.126929, -0.233572) UV(0.537025, 0.326611)
|
||||
V 108: Pos(0.269496, 0.103404, -0.048135) Norm(-0.468342, 0.577346, 0.668826) UV(0.730505, 0.553154)
|
||||
V 109: Pos(0.477461, 0.103404, -0.084805) Norm(0.66884, 0.577347, 0.468319) UV(0.893159, 0.58671)
|
||||
V 110: Pos(0.477461, -0.567769, -0.084805) Norm(0.668841, -0.57736, 0.468302) UV(0.97572, 0.277359)
|
||||
V 111: Pos(0.477461, -0.567769, -0.084805) Norm(0.668841, -0.57736, 0.468302) UV(0.893159, 0.58671)
|
||||
V 112: Pos(0.468575, -0.567769, -0.135202) Norm(0.468336, -0.577333, -0.668841) UV(0.412645, 0.553153)
|
||||
V 113: Pos(0.269496, -0.567769, -0.048135) Norm(-0.468336, -0.577333, 0.668841) UV(0.764763, 0.277359)
|
||||
V 114: Pos(0.243142, 0.285422, -0.083115) Norm(-0.577359, 0.577332, 0.577359) UV(0.551589, 0.228587)
|
||||
V 115: Pos(0.347237, 0.285422, -0.083115) Norm(0.577358, 0.577347, 0.577347) UV(0.658221, 0.228563)
|
||||
V 116: Pos(0.347237, 0.221328, -0.083115) Norm(0.577359, -0.577332, 0.577359) UV(0.573298, 0.228588)
|
||||
V 117: Pos(0.243142, 0.221328, -0.083115) Norm(-0.577358, -0.577347, 0.577347) UV(0.614763, 0.17729)
|
||||
V 118: Pos(0.347237, 0.221328, -0.127209) Norm(0.577358, -0.577347, -0.577347) UV(0.583176, 0.17729)
|
||||
|
||||
===Triangles (Indices): 60
|
||||
Tri: 0 1 2
|
||||
Tri: 3 4 5
|
||||
Tri: 6 7 8
|
||||
Tri: 9 10 11
|
||||
Tri: 12 13 14
|
||||
Tri: 15 16 17
|
||||
Tri: 18 19 20
|
||||
Tri: 21 22 23
|
||||
Tri: 24 25 26
|
||||
Tri: 27 28 29
|
||||
Tri: 30 31 32
|
||||
Tri: 33 34 35
|
||||
Tri: 36 37 38
|
||||
Tri: 39 40 41
|
||||
Tri: 42 43 44
|
||||
Tri: 45 46 47
|
||||
Tri: 48 49 50
|
||||
Tri: 51 52 53
|
||||
Tri: 54 55 56
|
||||
Tri: 57 58 59
|
||||
Tri: 60 61 62
|
||||
Tri: 63 64 65
|
||||
Tri: 66 67 68
|
||||
Tri: 69 70 71
|
||||
Tri: 72 73 74
|
||||
Tri: 75 76 77
|
||||
Tri: 78 79 80
|
||||
Tri: 81 82 83
|
||||
Tri: 84 85 86
|
||||
Tri: 87 88 89
|
||||
Tri: 0 90 1
|
||||
Tri: 3 91 4
|
||||
Tri: 6 92 7
|
||||
Tri: 9 93 10
|
||||
Tri: 12 94 13
|
||||
Tri: 15 95 16
|
||||
Tri: 18 96 19
|
||||
Tri: 21 97 22
|
||||
Tri: 24 98 25
|
||||
Tri: 27 99 28
|
||||
Tri: 30 100 31
|
||||
Tri: 33 101 34
|
||||
Tri: 36 102 37
|
||||
Tri: 39 103 40
|
||||
Tri: 42 104 43
|
||||
Tri: 45 105 46
|
||||
Tri: 48 106 49
|
||||
Tri: 51 107 52
|
||||
Tri: 54 108 55
|
||||
Tri: 57 109 58
|
||||
Tri: 60 110 61
|
||||
Tri: 63 111 64
|
||||
Tri: 66 112 67
|
||||
Tri: 69 113 70
|
||||
Tri: 72 114 73
|
||||
Tri: 75 115 76
|
||||
Tri: 78 116 79
|
||||
Tri: 81 117 82
|
||||
Tri: 84 118 85
|
||||
Tri: 87 117 88
|
||||
37892
resources/w/interior/ikea_bookshelf001_002.txt
Normal file
37892
resources/w/interior/ikea_bookshelf001_002.txt
Normal file
File diff suppressed because it is too large
Load Diff
29
resources/w/interior/note001_001.txt
Normal file
29
resources/w/interior/note001_001.txt
Normal file
@ -0,0 +1,29 @@
|
||||
===Vertices (Split by UV/Normal): 14
|
||||
V 0: Pos(-0.232874, -0.073279, -0.02) Norm(-0.724404, -0.376703, -0.57735) UV(0.375, 0.0)
|
||||
V 1: Pos(-0.232874, -0.073279, 0.02) Norm(-0.724404, -0.376703, 0.57735) UV(0.625, 0.0)
|
||||
V 2: Pos(-0.148561, 0.193726, 0.02) Norm(-0.376703, 0.724404, 0.57735) UV(0.625, 0.25)
|
||||
V 3: Pos(-0.148561, 0.193726, -0.02) Norm(-0.376703, 0.724404, -0.57735) UV(0.375, 0.25)
|
||||
V 4: Pos(0.232874, 0.073279, 0.02) Norm(0.724404, 0.376703, 0.57735) UV(0.625, 0.5)
|
||||
V 5: Pos(0.232874, 0.073279, -0.02) Norm(0.724404, 0.376703, -0.57735) UV(0.375, 0.5)
|
||||
V 6: Pos(0.148561, -0.193726, 0.02) Norm(0.376703, -0.724404, 0.57735) UV(0.625, 0.75)
|
||||
V 7: Pos(0.148561, -0.193726, -0.02) Norm(0.376703, -0.724404, -0.57735) UV(0.375, 0.75)
|
||||
V 8: Pos(-0.232874, -0.073279, 0.02) Norm(-0.724404, -0.376703, 0.57735) UV(0.625, 1.0)
|
||||
V 9: Pos(-0.232874, -0.073279, -0.02) Norm(-0.724404, -0.376703, -0.57735) UV(0.375, 1.0)
|
||||
V 10: Pos(-0.148561, 0.193726, -0.02) Norm(-0.376703, 0.724404, -0.57735) UV(0.125, 0.5)
|
||||
V 11: Pos(-0.232874, -0.073279, -0.02) Norm(-0.724404, -0.376703, -0.57735) UV(0.125, 0.75)
|
||||
V 12: Pos(-0.148561, 0.193726, 0.02) Norm(-0.376703, 0.724404, 0.57735) UV(0.875, 0.5)
|
||||
V 13: Pos(-0.232874, -0.073279, 0.02) Norm(-0.724404, -0.376703, 0.57735) UV(0.875, 0.75)
|
||||
|
||||
===Triangles (Indices): 12
|
||||
Tri: 0 1 2
|
||||
Tri: 0 2 3
|
||||
Tri: 3 2 4
|
||||
Tri: 3 4 5
|
||||
Tri: 5 4 6
|
||||
Tri: 5 6 7
|
||||
Tri: 7 6 8
|
||||
Tri: 7 8 9
|
||||
Tri: 10 5 7
|
||||
Tri: 10 7 11
|
||||
Tri: 4 12 13
|
||||
Tri: 4 13 6
|
||||
BIN
resources/w/interior/note001_text001.png
(Stored with Git LFS)
Normal file
BIN
resources/w/interior/note001_text001.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -13,6 +13,7 @@ namespace ZL {
|
||||
extern float x;
|
||||
extern float y;
|
||||
const float ATTACK_RANGE = 1.25f;
|
||||
const float VISIBLE_RANGE = 6.f;
|
||||
|
||||
void Character::loadAnimation(AnimationState state, const std::string& filename, const std::string& zipFile) {
|
||||
auto& data = animations[state];
|
||||
@ -180,7 +181,7 @@ void Character::update(int64_t deltaMs) {
|
||||
if (attackTarget != nullptr)
|
||||
{
|
||||
float distToGhost = (attackTarget->position - position).norm();
|
||||
if (distToGhost >= 10.f)
|
||||
if (distToGhost >= VISIBLE_RANGE)
|
||||
{
|
||||
if (isPlayer)
|
||||
{
|
||||
@ -189,7 +190,7 @@ void Character::update(int64_t deltaMs) {
|
||||
battle_state = 0;
|
||||
|
||||
}
|
||||
else if (distToGhost < 10.0f && distToGhost >= ATTACK_RANGE) {
|
||||
else if (distToGhost < VISIBLE_RANGE && distToGhost >= ATTACK_RANGE) {
|
||||
setTarget(attackTarget->position);
|
||||
battle_state = 0;
|
||||
}
|
||||
@ -721,6 +722,9 @@ void Character::drawWithShadow(Renderer& renderer, const Eigen::Matrix4f& lightF
|
||||
hitSparkEmitter.draw(renderer, 1.0f, Environment::width, Environment::height, false);
|
||||
}
|
||||
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
if (!isPlayer && hp <= 0)
|
||||
{
|
||||
return;
|
||||
|
||||
@ -173,7 +173,6 @@ namespace ZL
|
||||
uniInteriorParams.interactiveObjectsJsonPath = "resources/config2/interactive_objects_uni_interior.json";
|
||||
uniInteriorParams.playerPosition = Eigen::Vector3f(0.942694, 0, -9.63104);
|
||||
|
||||
|
||||
locations["uni_interior"] = std::make_shared<Location>(renderer, inventory);
|
||||
locations["uni_interior"]->setup(uniInteriorParams);
|
||||
|
||||
@ -511,7 +510,6 @@ namespace ZL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (event.type == SDL_KEYDOWN && event.key.repeat == 0) {
|
||||
switch (event.key.keysym.sym) {
|
||||
case SDLK_1:
|
||||
|
||||
@ -24,7 +24,7 @@ namespace ZL
|
||||
static constexpr float CAMERA_FOV_Y = 1.0f / 1.5f;
|
||||
// How close the player needs to be to a peaceful NPC before the
|
||||
// on_npc_interact callback fires and the conversation begins.
|
||||
static constexpr float NPC_TALK_DISTANCE = 1.25f;
|
||||
static constexpr float NPC_TALK_DISTANCE = 1.35f;
|
||||
|
||||
static float distancePointToSegmentXZ(const Eigen::Vector3f& p,
|
||||
const Eigen::Vector3f& a,
|
||||
@ -654,6 +654,7 @@ namespace ZL
|
||||
//glBindTexture(GL_TEXTURE_2D, roomTexture->getTexID());
|
||||
//renderer.DrawVertexRenderStruct(roomMesh);
|
||||
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
for (auto& [name, gameObj] : gameObjects) {
|
||||
glBindTexture(GL_TEXTURE_2D, gameObj.texture->getTexID());
|
||||
renderer.DrawVertexRenderStruct(gameObj.mesh);
|
||||
@ -664,7 +665,7 @@ namespace ZL
|
||||
intObj.draw(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
const Eigen::Matrix4f currentView = renderer.GetCurrentModelViewMatrix();
|
||||
if (player) player->prepareHitSparksForDraw(currentView);
|
||||
for (auto& npc : npcs) npc->prepareHitSparksForDraw(currentView);
|
||||
@ -832,6 +833,7 @@ namespace ZL
|
||||
//renderer.DrawVertexRenderStruct(roomMesh);
|
||||
|
||||
CheckGlError(__FILE__, __LINE__);
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
for (auto& [name, gameObj] : gameObjects) {
|
||||
glBindTexture(GL_TEXTURE_2D, gameObj.texture->getTexID());
|
||||
renderer.DrawVertexRenderStruct(gameObj.mesh);
|
||||
@ -845,6 +847,7 @@ namespace ZL
|
||||
}
|
||||
CheckGlError(__FILE__, __LINE__);
|
||||
|
||||
|
||||
#ifdef DEBUG_LIGHT
|
||||
// In debug-light mode characters use the plain shaders (draw normally
|
||||
// but from the light's viewpoint — projection/view already on stack).
|
||||
|
||||
@ -240,6 +240,33 @@ namespace ZL {
|
||||
std::cerr << "[script] rotate_object: object '" << name << "' not found\n";
|
||||
});
|
||||
|
||||
// fade_object(name, target_alpha, duration_sec [, on_complete])
|
||||
api.set_function("fade_object",
|
||||
[game](const std::string& name, float targetAlpha,
|
||||
float durationSec, sol::object onComplete) {
|
||||
for (auto& intObj : game->interactiveObjects) {
|
||||
if (intObj.loadedObject.name != name) continue;
|
||||
if (intObj.isAnimating) {
|
||||
std::cerr << "[script] fade_object: '" << name << "' is already animating\n";
|
||||
return;
|
||||
}
|
||||
std::function<void()> cb;
|
||||
if (onComplete.is<sol::protected_function>()) {
|
||||
sol::protected_function fn = onComplete.as<sol::protected_function>();
|
||||
cb = [fn]() mutable {
|
||||
auto res = fn();
|
||||
if (!res.valid()) {
|
||||
sol::error err = res;
|
||||
std::cerr << "[script] fade_object on_complete error: " << err.what() << "\n";
|
||||
}
|
||||
};
|
||||
}
|
||||
intObj.fadeTo(targetAlpha, durationSec, std::move(cb));
|
||||
return;
|
||||
}
|
||||
std::cerr << "[script] fade_object: object '" << name << "' not found\n";
|
||||
});
|
||||
|
||||
// scale_object(name, target_scale, duration_sec [, on_complete])
|
||||
api.set_function("scale_object",
|
||||
[game](const std::string& name, float targetScale,
|
||||
|
||||
@ -63,6 +63,23 @@ namespace ZL {
|
||||
isAnimating = true;
|
||||
}
|
||||
|
||||
void InteractiveObject::fadeTo(float targetAlpha, float durationSec, std::function<void()> onComplete) {
|
||||
if (isAnimating) return;
|
||||
AnimTask task;
|
||||
task.type = AnimTask::Type::Fade;
|
||||
task.startPos = position;
|
||||
task.startRotY = rotationY;
|
||||
task.startScale = alpha; // reuse startScale to hold start alpha
|
||||
task.targetPos = position;
|
||||
task.targetRotY = rotationY;
|
||||
task.targetScale = targetAlpha; // reuse targetScale to hold target alpha
|
||||
task.durationMs = durationSec * 1000.f;
|
||||
task.elapsedMs = 0.f;
|
||||
task.onComplete = std::move(onComplete);
|
||||
animTask = std::move(task);
|
||||
isAnimating = true;
|
||||
}
|
||||
|
||||
void InteractiveObject::update(int64_t deltaMs) {
|
||||
if (!isAnimating || !animTask) return;
|
||||
|
||||
@ -81,6 +98,9 @@ namespace ZL {
|
||||
case AnimTask::Type::Scale:
|
||||
scale = task.startScale + (task.targetScale - task.startScale) * t;
|
||||
break;
|
||||
case AnimTask::Type::Fade:
|
||||
alpha = task.startScale + (task.targetScale - task.startScale) * t;
|
||||
break;
|
||||
}
|
||||
|
||||
if (t >= 1.0f) {
|
||||
@ -99,6 +119,12 @@ namespace ZL {
|
||||
|
||||
void InteractiveObject::draw(Renderer& renderer) const {
|
||||
if (!isActive || !loadedObject.texture) return;
|
||||
|
||||
if (alpha < 0.999f) {
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
renderer.PushMatrix();
|
||||
renderer.TranslateMatrix(position);
|
||||
if (rotationY != 0.f) {
|
||||
@ -109,9 +135,13 @@ namespace ZL {
|
||||
if (scale != 1.f)
|
||||
renderer.ScaleMatrix(scale);
|
||||
renderer.RenderUniform1i(textureUniformName, 0);
|
||||
renderer.RenderUniform1f("uAlpha", alpha);
|
||||
glBindTexture(GL_TEXTURE_2D, loadedObject.texture->getTexID());
|
||||
renderer.DrawVertexRenderStruct(loadedObject.mesh);
|
||||
renderer.PopMatrix();
|
||||
|
||||
// Restore uAlpha so subsequent fog-shader users (character weapons, etc.) are not affected.
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
}
|
||||
|
||||
} // namespace ZL
|
||||
@ -23,13 +23,14 @@ namespace ZL {
|
||||
Eigen::Vector3f pivot = Eigen::Vector3f::Zero(); // local-space offset to rotation pivot
|
||||
float rotationY = 0.0f; // Y-axis rotation in radians
|
||||
float scale = 1.0f; // uniform scale
|
||||
float alpha = 1.0f; // opacity: 1=opaque, 0=fully transparent
|
||||
float interactionRadius;
|
||||
bool isActive = true;
|
||||
bool isAnimating = false; // true while a timed animation is running
|
||||
std::string activateFunctionName;
|
||||
|
||||
struct AnimTask {
|
||||
enum class Type { Move, Rotate, Scale } type;
|
||||
enum class Type { Move, Rotate, Scale, Fade } type;
|
||||
Eigen::Vector3f startPos;
|
||||
float startRotY;
|
||||
float startScale;
|
||||
@ -48,6 +49,7 @@ namespace ZL {
|
||||
void moveTo(const Eigen::Vector3f& target, float durationSec, std::function<void()> onComplete = {});
|
||||
void rotateTo(float targetRotY, float durationSec, std::function<void()> onComplete = {});
|
||||
void scaleTo(float targetScale, float durationSec, std::function<void()> onComplete = {});
|
||||
void fadeTo(float targetAlpha, float durationSec, std::function<void()> onComplete = {});
|
||||
void update(int64_t deltaMs);
|
||||
void draw(Renderer& renderer) const;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user