Implemented shadows. Light components can enable shadows through editor. #406

Merged
Xenosas1337 merged 7 commits from SP3-1-Rendering into main 2023-03-08 14:17:15 +08:00
152 changed files with 10834 additions and 2873 deletions
Showing only changes of commit 441d2fe7a4 - Show all commits

View File

@ -1,4 +1,4 @@
Start in Fullscreen: false
Starting Scene ID: 86098106
Starting Scene ID: 91478134
Window Size: {x: 1920, y: 1080}
Window Title: SHADE Engine

View File

@ -0,0 +1,3 @@
Name: Master
ID: 187131295
Type: 11

View File

@ -0,0 +1,3 @@
Name: Master.strings
ID: 184993030
Type: 11

View File

@ -0,0 +1,3 @@
Name: Music
ID: 187337426
Type: 11

View File

@ -0,0 +1,3 @@
Name: SFX
ID: 200039123
Type: 11

View File

@ -0,0 +1,3 @@
Name: UI
ID: 185075145
Type: 11

View File

@ -0,0 +1,8 @@
- VertexShader: 47911992
FragmentShader: 46377769
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 57342922
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: AnimatedHomeowner
ID: 121518381
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 51238312
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_04a
ID: 130935405
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 61471971
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_04b
ID: 122461516
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 58217538
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_04c
ID: 124507864
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 61980534
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_05a
ID: 118069989
Type: 7

View File

@ -0,0 +1,8 @@
- VertexShader: 46580970
FragmentShader: 35983630
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 51561286
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: CutScene_05b
ID: 132945336
Type: 7

View File

@ -3,6 +3,6 @@
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 54429632
data.textureIndex: 58181851
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,8 @@
- VertexShader: 39210065
FragmentShader: 46377769
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 64651793
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,3 @@
Name: default_racoon
ID: 125722190
Type: 7

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,7 @@
Name: MD_HomeownerV2
ID: 76586906
Type: 4
Sub Assets:
Name: Cube
ID: 148542784
Type: 8

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,334 @@
- EID: 1
Name: Canvas4
IsActive: true
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 10
Name: CutScene4
IsActive: true
NumberOfChildren: 3
Components:
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 2
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1275, y: 255, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1313, y: 544, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 130935405
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 65542
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1600, y: 150, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 640, y: 661, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 122461516
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 5
Name: pic3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2000, y: -275, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1848, y: 575, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 124507864
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 11
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 12
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 3
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0, z: 0}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Near: 0.00999999978
Far: 10000
Perspective: true
FOV: 90
IsActive: true
Scripts: ~
- EID: 7
Name: CutsceneManager
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: CutsceneEnd
Enabled: true
nextScene: 92009475
duration: 1
skipDuration: 0.100000001
cutscene4Points: 4
cutscene4Pics: 10
cutscene5Points: 21
cutscene5Pics: 15
canvas4: 1
canvas5: 14
- EID: 4
Name: CutScene4Points
IsActive: true
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 9
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -275, y: 255, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 8
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 600, y: 150, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 65549
Name: Pic3Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -275, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 14
Name: Canvas5
IsActive: false
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: false
Scripts: ~
- EID: 15
Name: CutScene5
IsActive: true
NumberOfChildren: 2
Components:
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 16
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -600, y: 1000, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 634, y: 1027, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 118069989
IsActive: true
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 17
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -1000, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1337, y: 1028, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 132945336
IsActive: true
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 19
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 20
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 14
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 21
Name: CutScene5Points
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 22
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -600, y: 0, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 23
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: CutSceneEnd
ID: 84606951
Type: 5

View File

@ -113,6 +113,8 @@
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 1
@ -148,9 +150,11 @@
NumberOfChildren: 0
Components: ~
Scripts:
- Type: Cutscene
- Type: CutsceneIntro
Enabled: true
duration: 2
nextScene: 96668835
duration: 1
skipDuration: 0.100000001
cutscene1Points: 4
cutscene1Pics: 10
cutscene2Points: 20
@ -314,6 +318,8 @@
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 13
@ -448,7 +454,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1425, y: -200, z: 0.5}
Translate: {x: -1600, y: -200, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1299, y: 575, z: 1}
IsActive: true
@ -515,6 +521,8 @@
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 24

View File

@ -2418,7 +2418,7 @@
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0.5, y: -299.5, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
@ -2544,7 +2544,7 @@
Collider Component:
Colliders:
- Is Trigger: false
Collision Tag: 0
Collision Tag: 1
Type: Box
Half Extents: {x: 1.79999995, y: 1, z: 4}
Friction: 0.400000006
@ -2553,7 +2553,7 @@
Position Offset: {x: 0, y: 0.550000012, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: false
Collision Tag: 0
Collision Tag: 1
Type: Box
Half Extents: {x: 1.79999995, y: 1, z: 2.70000005}
Friction: 0.400000006
@ -4865,9 +4865,9 @@
NumberOfChildren: 5
Components:
Transform Component:
Translate: {x: -8, y: 1.142977, z: -4}
Translate: {x: -8, y: 0.899999976, z: -4}
Rotate: {x: -0, y: 1.57079649, z: 0}
Scale: {x: 0.999999881, y: 1, z: 0.999999881}
Scale: {x: 0.999965608, y: 1, z: 0.999965608}
IsActive: true
Renderable Component:
Mesh: 149697411
@ -4978,7 +4978,7 @@
armLength: 3
turnSpeedPitch: 0.200000003
turnSpeedYaw: 0.400000006
inverseXControls: false
inverseXControls: true
inverseYControls: false
pitchUpperClamp: 45
pitchLowerClamp: 5
@ -5097,6 +5097,7 @@
endPoint2: [1, 1.5, -7.5]
endPoint3: [2.5, 1.5, -3]
playerCamera: 65730
gameplayCanvas: 459
duration: 3
- EID: 453
Name: PreviewLevel1
@ -5202,10 +5203,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 456
@ -5235,10 +5236,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 455
@ -5268,10 +5269,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 454

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.100000001}
Translate: {x: 0, y: 0, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
@ -49,7 +49,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 75, z: 0}
Translate: {x: 0, y: 75, z: 0.200000003}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
@ -73,10 +73,10 @@
sceneID: 97158628
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 6
@ -85,7 +85,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -200, z: 0}
Translate: {x: 0, y: -200, z: 0.200000003}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
@ -108,10 +108,10 @@
Enabled: true
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 3
@ -153,4 +153,40 @@
Components: ~
Scripts:
- Type: SHADE_Scripting.UI.TweenManager
Enabled: true
Enabled: true
- EID: 450
Name: TransitionCanvas
IsActive: true
NumberOfChildren: 1
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 65982
Name: Transition
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 2500, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 120016136
IsActive: true
UI Component:
Canvas ID: 450
Hovered: false
Clicked: false
IsActive: true
Scripts:
- Type: SHADE_Scripting.UI.SceneFadeInOut
Enabled: true
alphaValue: 1
fadeInTime: 0.5
fadeOutTime: 0.5

View File

@ -21,7 +21,7 @@
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129138332
Material: 121834459
IsActive: true
UI Component:
Canvas ID: 0
@ -97,13 +97,13 @@
Scripts:
- Type: ChangeSceneButton
Enabled: true
sceneID: 96668835
sceneID: 91947920
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: "event:/Music/player_undetected\x00<30><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 6
@ -135,10 +135,10 @@
Enabled: true
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 7
@ -168,10 +168,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- Type: SHADE_Scripting.UI.ChangeCanvasButton
@ -204,10 +204,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- Type: SHADE_Scripting.UI.ChangeCanvasButton
@ -240,10 +240,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- Type: SHADE_Scripting.UI.ChangeCanvasButton
@ -276,10 +276,10 @@
Scripts:
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- Type: SHADE_Scripting.UI.ChangeCanvasButton
@ -352,23 +352,23 @@
Scripts: ~
- EID: 14
Name: BackGround
IsActive: false
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.5}
Translate: {x: 0, y: 0, z: 2.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: false
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 121834459
IsActive: false
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: false
IsActive: true
Scripts: ~
- EID: 15
Name: Instruction Image
@ -378,7 +378,7 @@
Transform Component:
Translate: {x: 0, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1344, y: 756, z: 1}
Scale: {x: 1167.40002, y: 900, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
@ -428,10 +428,10 @@
multiImageList: 15
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 17
@ -465,10 +465,10 @@
multiImageList: 15
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 18
@ -501,18 +501,10 @@
canvasToActivate: 0
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
hoverScale: 1.10000002
clickScale: 0.899999976
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 19
@ -525,26 +517,33 @@
Canvas Height: 1080
Scale by canvas width: false
IsActive: false
Scripts: ~
Scripts:
- Type: SHADE_Scripting.UI.Options
Enabled: true
masterVolSlider: 29
sfxVolSlider: 30
bgmVolSlider: 31
fovSlider: 37
sensitivitySlider: 38
- EID: 20
Name: BackGround
IsActive: false
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 1}
Translate: {x: 0, y: 0, z: 1.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: false
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 121834459
IsActive: false
IsActive: true
UI Component:
Canvas ID: 19
Hovered: false
Clicked: false
IsActive: false
IsActive: true
Scripts: ~
- EID: 21
Name: BackButton
@ -574,6 +573,14 @@
- Type: SHADE_Scripting.UI.ChangeCanvasButton
Enabled: true
canvasToActivate: 0
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 22
Name: Options Title Text
IsActive: true
@ -587,6 +594,8 @@
Text Renderer Component:
Text: Options
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -607,6 +616,8 @@
Text Renderer Component:
Text: Audio
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -643,6 +654,8 @@
Text Renderer Component:
Text: Master
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -663,6 +676,8 @@
Text Renderer Component:
Text: SFX
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -683,6 +698,8 @@
Text Renderer Component:
Text: BGM
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -722,6 +739,8 @@
IsActive: true
Slider Component:
Slider Value: 1
Min Value: 0
Max Value: 100
IsActive: true
UI Component:
Canvas ID: 19
@ -745,6 +764,8 @@
IsActive: true
Slider Component:
Slider Value: 1
Min Value: 0
Max Value: 100
IsActive: true
UI Component:
Canvas ID: 19
@ -768,6 +789,8 @@
IsActive: true
Slider Component:
Slider Value: 1
Min Value: 0
Max Value: 100
IsActive: true
UI Component:
Canvas ID: 19
@ -788,6 +811,8 @@
Text Renderer Component:
Text: Camera
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -798,7 +823,7 @@
- EID: 33
Name: Camera Text Group
IsActive: true
NumberOfChildren: 2
NumberOfChildren: 4
Components:
Transform Component:
Translate: {x: -900, y: -220, z: 0}
@ -824,6 +849,8 @@
Text Renderer Component:
Text: FOV
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -844,6 +871,8 @@
Text Renderer Component:
Text: Sensitivity
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -851,10 +880,54 @@
Clicked: false
IsActive: true
Scripts: ~
- EID: 449
Name: Camera Invert X Text
IsActive: false
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -200, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 75, y: 75, z: 1}
IsActive: false
Text Renderer Component:
Text: "Camera Invert X:"
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 19
Hovered: false
Clicked: false
IsActive: false
Scripts: ~
- EID: 447
Name: Camera Invert Y Text
IsActive: false
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 800, y: -200, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 75, y: 75, z: 1}
IsActive: false
Text Renderer Component:
Text: "Y:"
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 19
Hovered: false
Clicked: false
IsActive: false
Scripts: ~
- EID: 36
Name: Camera Slider Group
IsActive: true
NumberOfChildren: 2
NumberOfChildren: 4
Components:
Transform Component:
Translate: {x: 100, y: -200, z: 0}
@ -883,6 +956,8 @@
IsActive: true
Slider Component:
Slider Value: 1
Min Value: 45
Max Value: 120
IsActive: true
UI Component:
Canvas ID: 19
@ -906,6 +981,8 @@
IsActive: true
Slider Component:
Slider Value: 1
Min Value: 0
Max Value: 100
IsActive: true
UI Component:
Canvas ID: 19
@ -913,6 +990,56 @@
Clicked: false
IsActive: true
Scripts: ~
- EID: 448
Name: Invert X Toggle Button
IsActive: false
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -300, y: -200, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 75, y: 75, z: 1}
IsActive: false
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: false
Toggle Button Component:
Non Toggled Texture: 55358401
Toggled Texture: 52333376
Value: false
IsActive: false
UI Component:
Canvas ID: 19
Hovered: false
Clicked: false
IsActive: false
Scripts: ~
- EID: 445
Name: Invert Y Toggle Button
IsActive: false
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -50, y: -200, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 75, y: 75, z: 1}
IsActive: false
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: false
Toggle Button Component:
Non Toggled Texture: 55358401
Toggled Texture: 52333376
Value: false
IsActive: false
UI Component:
Canvas ID: 19
Hovered: false
Clicked: false
IsActive: false
Scripts: ~
- EID: 39
Name: Audio Slider Text Group
IsActive: true
@ -942,6 +1069,8 @@
Text Renderer Component:
Text: 100
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -952,8 +1081,6 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 29
minValue: 0
maxValue: 100
- EID: 41
Name: SFX Volume Slider Text
IsActive: true
@ -967,6 +1094,8 @@
Text Renderer Component:
Text: 100
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -977,8 +1106,6 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 30
minValue: 0
maxValue: 100
- EID: 42
Name: BGM Volume Slider Text
IsActive: true
@ -992,6 +1119,8 @@
Text Renderer Component:
Text: 100
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -1002,8 +1131,6 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 31
minValue: 0
maxValue: 100
- EID: 43
Name: Camera Slider Text Group
IsActive: true
@ -1033,6 +1160,8 @@
Text Renderer Component:
Text: 100
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -1043,8 +1172,6 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 37
minValue: 0
maxValue: 100
- EID: 45
Name: Sensitivity Slider Text
IsActive: true
@ -1058,6 +1185,8 @@
Text Renderer Component:
Text: 100
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 19
@ -1068,12 +1197,10 @@
- Type: SHADE_Scripting.UI.SliderText
Enabled: true
sliderObj: 38
minValue: 0
maxValue: 100
- EID: 46
Name: Credits Canvas
IsActive: false
NumberOfChildren: 3
NumberOfChildren: 4
Components:
Canvas Component:
Canvas Width: 1920
@ -1082,12 +1209,12 @@
IsActive: false
Scripts: ~
- EID: 47
Name: BackGround
Name: Scrolling Credits
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -3800, z: 0.100000001}
Translate: {x: 0, y: -3800, z: 1.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 8026, z: 1}
IsActive: true
@ -1133,6 +1260,14 @@
- Type: SHADE_Scripting.UI.ChangeCanvasButton
Enabled: true
canvasToActivate: 0
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 49
Name: Credits Title Text
IsActive: false
@ -1146,6 +1281,28 @@
Text Renderer Component:
Text: Credits
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 46
Hovered: false
Clicked: false
IsActive: false
Scripts: ~
- EID: 55
Name: BackGround
IsActive: false
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 1.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: false
Renderable Component:
Mesh: 141771688
Material: 121834459
IsActive: false
UI Component:
Canvas ID: 46
@ -1166,23 +1323,23 @@
Scripts: ~
- EID: 51
Name: BackGround
IsActive: false
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 1}
Translate: {x: 0, y: 0, z: 1.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: false
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 121834459
IsActive: false
IsActive: true
UI Component:
Canvas ID: 50
Hovered: false
Clicked: false
IsActive: false
IsActive: true
Scripts: ~
- EID: 52
Name: BackButton
@ -1212,6 +1369,14 @@
- Type: SHADE_Scripting.UI.ChangeCanvasButton
Enabled: true
canvasToActivate: 0
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 53
Name: Level Select Title Text
IsActive: true
@ -1225,10 +1390,48 @@
Text Renderer Component:
Text: Level Select
Font: 174412429
Color: {x: 0, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: true
UI Component:
Canvas ID: 50
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
Scripts: ~
- EID: 450
Name: TransitionCanvas
IsActive: true
NumberOfChildren: 1
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 65982
Name: Transition
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 2500, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 120016136
IsActive: true
UI Component:
Canvas ID: 450
Hovered: false
Clicked: false
IsActive: true
Scripts:
- Type: SHADE_Scripting.UI.SceneFadeInOut
Enabled: true
alphaValue: 1
fadeInTime: 0.5
fadeOutTime: 0.5

View File

@ -5,13 +5,14 @@
Components:
Transform Component:
Translate: {x: 0, y: 7, z: 0}
Rotate: {x: 1.48352981, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 0.999999344, y: 0.999999821, z: 0.999999523}
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.100000001
Gravity Scale: 1
Use Gravity: true
Interpolate: false
Sleeping Enabled: true
@ -26,8 +27,9 @@
Colliders:
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Type: Capsule
Radius: 1
Height: 2
Friction: 0.400000006
Bounciness: 0
Density: 1
@ -75,10 +77,10 @@
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
FOV: 90
IsActive: true
Scripts: ~
- EID: 65539
@ -187,6 +189,7 @@
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.100000001
Gravity Scale: 1
Use Gravity: true
Interpolate: true
Sleeping Enabled: true

View File

@ -29,7 +29,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.100000001}
Translate: {x: 0, y: 0, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
@ -49,7 +49,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 75, z: 0}
Translate: {x: 0, y: 75, z: 0.200000003}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
@ -73,10 +73,10 @@
sceneID: 97158628
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 6
@ -85,7 +85,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -200, z: 0}
Translate: {x: 0, y: -200, z: 0.200000003}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 100, z: 1}
IsActive: true
@ -108,10 +108,10 @@
Enabled: true
- Type: SHADE_Scripting.UI.ButtonFX
Enabled: true
onHoverEnterSound: event:/Music/player_undetected
onHoverExitSound: event:/Music/player_undetected
onClickSound: event:/Music/player_undetected
onReleaseSound: event:/Music/player_undetected
onHoverEnterSound: Empty
onHoverExitSound: Empty
onClickSound: event:/UI/mouse_down_element
onReleaseSound: Empty
hoverScale: 1.10000002
clickScale: 0.899999976
- EID: 3
@ -153,4 +153,40 @@
Components: ~
Scripts:
- Type: SHADE_Scripting.UI.TweenManager
Enabled: true
Enabled: true
- EID: 450
Name: TransitionCanvas
IsActive: true
NumberOfChildren: 1
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 65982
Name: Transition
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 2500, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 120016136
IsActive: true
UI Component:
Canvas ID: 450
Hovered: false
Clicked: false
IsActive: true
Scripts:
- Type: SHADE_Scripting.UI.SceneFadeInOut
Enabled: true
alphaValue: 1
fadeInTime: 0.5
fadeOutTime: 0.5

33
Assets/Scenes/anim.shade Normal file
View File

@ -0,0 +1,33 @@
- EID: 0
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Ambient
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 1
IsActive: true
Scripts: ~
- EID: 2
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 148542784
Material: 121518381
IsActive: true
Animator Component:
Rig: 76586906
Clip: 76586906
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: anim
ID: 91478134
Type: 5

View File

@ -107,6 +107,7 @@ public partial class LeafSearch : BehaviourTreeNode
SetNodeData("isAlert", false);
status = BehaviourTreeNodeStatus.FAILURE;
onExit(BehaviourTreeNodeStatus.FAILURE);
screamOnce = false;
return status;
}
else
@ -128,6 +129,7 @@ public partial class LeafSearch : BehaviourTreeNode
//handleChaseStop();
status = BehaviourTreeNodeStatus.FAILURE;
onExit(BehaviourTreeNodeStatus.FAILURE);
screamOnce = false;
return status;
}
@ -143,6 +145,7 @@ public partial class LeafSearch : BehaviourTreeNode
//handleChaseStop();
status = BehaviourTreeNodeStatus.FAILURE;
onExit(BehaviourTreeNodeStatus.FAILURE);
screamOnce = false;
return status;
}
@ -159,6 +162,7 @@ public partial class LeafSearch : BehaviourTreeNode
//Debug.Log("Failure: Player has no collider");
status = BehaviourTreeNodeStatus.FAILURE;
onExit(BehaviourTreeNodeStatus.FAILURE);
screamOnce = false;
return status;
}
//Ray destination to target the centre of the player's collider instead of transform position
@ -176,6 +180,7 @@ public partial class LeafSearch : BehaviourTreeNode
//handleChaseStop();
status = BehaviourTreeNodeStatus.FAILURE;
onExit(BehaviourTreeNodeStatus.FAILURE);
screamOnce = false;
return status;
}
else if (sightRayHit.Hit && sightRayHit.Other == player)
@ -222,7 +227,6 @@ public partial class LeafSearch : BehaviourTreeNode
if (screamOnce)
{
screamOnce = false;
AudioHandler.audioClipHandlers["SFXDetectAh"].Play();
}

View File

@ -21,12 +21,12 @@ public class PickAndThrow : Script
private Collider itemCollider;
private Item itemScript;
private Transform raccoonHoldLocation;
private ThirdPersonCamera tpc;
public ThirdPersonCamera tpc { get; set; }
private float lastXDir;
private float lastZDir;
private bool inRange = false;
public bool throwItem = false;
private Vector3 prevTargetOffSet;
public Vector3 prevTargetOffSet { get; set; }
[Tooltip("Lenght of ray")]
public float rayDistance = 1;
@ -165,7 +165,7 @@ public class PickAndThrow : Script
}
}
private void ResetItemObject()
public void ResetItemObject()
{
itemRidigBody = null;
itemTransform = null;

View File

@ -22,7 +22,7 @@ public class PlayerController : Script
public Camera cam { get; set; }
public CameraArm camArm { get; set; }
private PickAndThrow pat;
public StateMachine stateMachine;
public StateMachine stateMachine { get; set; }
public bool holdItem { get; set; }
public bool isAiming { get; set; }
@ -78,9 +78,9 @@ public class PlayerController : Script
//silhouette=====================================================================
public GameObject silhouettePlayer;
public Renderable silhouettePlayerRend;
private Renderable silhouettePlayerRend;
public GameObject silhouetteBag;
public Renderable silhouetteBagRend;
private Renderable silhouetteBagRend;
protected override void awake()
{
@ -348,7 +348,7 @@ public class PlayerController : Script
if (isMoveKeyPress && tranform && !isAiming)
{
Quaternion currentRotation = tranform.LocalRotation;
Quaternion targetRotation = Quaternion.LookRotation(new Vector3(axisMove.x, 0.0f, axisMove.y), Vector3.Up);
Quaternion targetRotation = Quaternion.Euler(0.0f, MathF.Atan2(axisMove.x,axisMove.y), 0.0f);
tranform.LocalRotation = Quaternion.Slerp(currentRotation, targetRotation, rotationFactorPerFrame * (float)Time.FixedDeltaTime);
}
else if (camArm && tranform && isAiming)
@ -409,9 +409,18 @@ public class PlayerController : Script
if (pat && pat.item)
{
holdItem = false;
isAiming = false;
pat.item.GetScript<Item>().returnBack = true;
if (holdItem)
{
holdItem = false;
pat.item.GetScript<Item>().returnBack = true;
}
if (isAiming)
{
isAiming = false;
cam.FOV = pat.defaultFOV;
camArm.TargetOffset = pat.prevTargetOffSet;
camArm.ArmLength = pat.tpc.armLength;
}
}
}
}

View File

@ -27,7 +27,7 @@ namespace SHADE_Scripting
{
AddComponent<Camera>();
}
GetComponent<Camera>().SetMainCamera();
if (!GetComponent<CameraArm>())
{
AddComponent<CameraArm>();

View File

@ -36,7 +36,6 @@ public class GameManager : Script
public bool itemScored {get;set;}
public int currMultiplierCombo { get; set;}
public float multiplierFont = 60.0f;
private Vector3 fontScalar;
public static GameManager Instance { get; private set; }
@ -63,7 +62,6 @@ public class GameManager : Script
itemScored = false;
currMultiplierCombo = 1;
currMultiplierDuration = 0;
fontScalar = new Vector3(multiplierFont / maxMultiplierDuration, multiplierFont / maxMultiplierDuration , multiplierFont / maxMultiplierDuration);
itemShatter = false;
GamePause = false;
stealFoodPopUpDone = false;
@ -79,6 +77,10 @@ public class GameManager : Script
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
if (timeText)
timeText.GetComponent<TextRenderable>().Text = $"{timer.ToString("0")}";
Input.SetMouseCentering(true);
Application.IsCursorVisible = false;
Application.FixDeltaTime = Time.DefaultFixDeltaTime;
}
protected override void start()
@ -93,22 +95,21 @@ public class GameManager : Script
if (SceneFadeInOut.Instance != null)
SceneFadeInOut.Instance.CallFadeOut();
Application.IsCursorVisible = false;
GamePause = false;
}
protected override void update()
{
if (GamePause || !stealFoodPopUpDone)
{
Input.SetMouseCentering(false);
Application.IsCursorVisible = true;
return;
}
Cheat();
if (currGameState == GameState.START)
{
Input.SetMouseCentering(true);
{
timer -= Time.DeltaTimeF;
if(scoreText)
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
@ -127,12 +128,8 @@ public class GameManager : Script
}
}
else
{
//multiplierText.GetComponent<Transform>().LocalScale = Vector3.Zero;
}
if (!goingToLose && ((timer > 0 && totalItemCount <= 0 && !itemShatter) || Input.GetKeyDown(Input.KeyCode.F1)))
if (!goingToLose && ((timer > 0 && totalItemCount <= 0 && !itemShatter)))
{
currGameState = GameState.WIN;
AudioHandler.StopAllSounds(false);
@ -141,7 +138,7 @@ public class GameManager : Script
if (SceneFadeInOut.Instance != null)
SceneFadeInOut.Instance.CallFadeIn();
}
else if(!goingToWin && (timer < 0 || Input.GetKeyDown(Input.KeyCode.F2)))
else if(!goingToWin && (timer < 0))
{
currGameState = GameState.LOSE;
AudioHandler.StopAllSounds(false);
@ -180,6 +177,27 @@ public class GameManager : Script
}
}
private void Cheat()
{
if (Input.GetKeyUp(Input.KeyCode.F1))
{
currGameState = GameState.WIN;
AudioHandler.StopAllSounds(false);
goingToWin = true;
if (SceneFadeInOut.Instance != null)
SceneFadeInOut.Instance.CallFadeIn();
}
else if (Input.GetKeyUp(Input.KeyCode.F2))
{
currGameState = GameState.LOSE;
AudioHandler.StopAllSounds(false);
goingToLose = true;
if (SceneFadeInOut.Instance != null)
SceneFadeInOut.Instance.CallFadeIn();
}
}
protected override void onDestroy()
{
if (Instance == this)

View File

@ -15,6 +15,7 @@ namespace SHADE_Scripting.UI
public Vector3 endPoint3;
public GameObject playerCamera;
public GameObject gameplayCanvas;
public float duration = 3.0f;
private bool point1Done = false;
@ -39,8 +40,6 @@ namespace SHADE_Scripting.UI
if (listOfCamera.Count == 0)
Debug.LogError("EMPTY PREVIEW POINTS");
listOfCamera[0].SetMainCamera();
moveToEndPoint1 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[0].GetComponent<Transform>().LocalPosition, endPoint1, EASING_METHOD.EASE_IN_SINE);
moveToEndPoint2 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[1].GetComponent<Transform>().LocalPosition, endPoint2, EASING_METHOD.EASE_IN_SINE);
moveToEndPoint3 = TweenManager.CreateTweenThreadVec3(duration, listOfCamera[2].GetComponent<Transform>().LocalPosition, endPoint3, EASING_METHOD.EASE_IN_SINE);
@ -48,31 +47,41 @@ namespace SHADE_Scripting.UI
}
protected override void start()
{
if (gameplayCanvas)
gameplayCanvas.SetActive(false);
listOfCamera[0].SetMainCamera();
}
protected override void update()
{
if (!SceneFadeInOut.Instance.FadeOutFinished() && !point1Done)
if (SceneFadeInOut.Instance && !SceneFadeInOut.Instance.FadeOutFinished() && !point1Done)
{
moveToEndPoint1.Reset();
return;
}
if (Input.GetKeyUp(Input.KeyCode.Space))
if (Input.GetKeyUp(Input.KeyCode.Space) && !point3Done)
{
skip = true;
point1Done = true;
point3Done = true;
SceneFadeInOut.Instance.CallFadeIn();
SceneFadeInOut.Instance.alphaValue = 0.01f;
}
if (skip && SceneFadeInOut.Instance.FadeInFinished())
if (skip && SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeInFinished())
{
playerCamera.GetComponent<Camera>().SetMainCamera();
SceneFadeInOut.Instance.CallFadeOut();
}
if (skip && SceneFadeInOut.Instance.FadeOutFinished())
if (skip && SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeOutFinished())
{
GameManager.Instance.PreviewLevelDone = true;
if (gameplayCanvas)
gameplayCanvas.SetActive(true);
}
@ -81,7 +90,7 @@ namespace SHADE_Scripting.UI
if (!point1Done)
{
listOfCamera[0].GetComponent<Transform>().LocalPosition = moveToEndPoint1.GetValue();
if (moveToEndPoint1.IsCompleted())
if (SceneFadeInOut.Instance && moveToEndPoint1.IsCompleted())
{
point1Done = true;
SceneFadeInOut.Instance.CallFadeIn();
@ -89,13 +98,13 @@ namespace SHADE_Scripting.UI
}
}
if (SceneFadeInOut.Instance.FadeInFinished() && point1Done)
if (SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeInFinished() && point1Done)
{
listOfCamera[1].SetMainCamera();
SceneFadeInOut.Instance.CallFadeOut();
}
if (SceneFadeInOut.Instance.FadeOutFinished() && point1Done)
if (SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeOutFinished() && point1Done)
{
if (!point2Done)
{
@ -114,13 +123,13 @@ namespace SHADE_Scripting.UI
}
}
if (SceneFadeInOut.Instance.FadeInFinished() && point2Done)
if (SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeInFinished() && point2Done)
{
listOfCamera[2].SetMainCamera();
SceneFadeInOut.Instance.CallFadeOut();
}
if (SceneFadeInOut.Instance.FadeOutFinished() && point2Done)
if (SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeOutFinished() && point2Done)
{
if (!point3Done)
{
@ -139,15 +148,17 @@ namespace SHADE_Scripting.UI
}
}
if (SceneFadeInOut.Instance.FadeInFinished() && point3Done)
if (SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeInFinished() && point3Done)
{
playerCamera.GetComponent<Camera>().SetMainCamera();
SceneFadeInOut.Instance.CallFadeOut();
}
if (SceneFadeInOut.Instance.FadeOutFinished() && point3Done)
if (SceneFadeInOut.Instance && SceneFadeInOut.Instance.FadeOutFinished() && point3Done)
{
GameManager.Instance.PreviewLevelDone = true;
if (gameplayCanvas)
gameplayCanvas.SetActive(true);
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting
{
static public class Settings
{
static public float cameraSensitivity = 100.0f;
static public float cameraFOV = 90.0f;
static public float masterVolume = 100.0f;
static public float sfxVolume = 100.0f;
static public float bgmVolume = 100.0f;
}
}

View File

@ -0,0 +1,3 @@
Name: Settings
ID: 163325256
Type: 9

View File

@ -1,4 +1,4 @@
using SHADE;
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
@ -9,10 +9,10 @@ namespace SHADE_Scripting.UI
{
public class ButtonFX:Script
{
public string onHoverEnterSound = "event:/Music/player_undetected";
public string onHoverExitSound = "event:/Music/player_undetected";
public string onClickSound = "event:/Music/player_undetected";
public string onReleaseSound = "event:/Music/player_undetected";
public string onHoverEnterSound = "Empty";
public string onHoverExitSound = "Empty";
public string onClickSound = "event:/UI/mouse_down_element";
public string onReleaseSound = "Empty";
[NonSerialized]
private AudioClipHandler onHoverEnterACHandler;
@ -40,13 +40,16 @@ namespace SHADE_Scripting.UI
protected override void awake()
{
onHoverEnterACHandler = SHADE.Audio.CreateAudioClip(onHoverEnterSound);
onHoverExitACHandler = SHADE.Audio.CreateAudioClip(onHoverExitSound);
onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound);
onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound);
if(onHoverEnterSound != "Empty")
onHoverEnterACHandler = SHADE.Audio.CreateAudioClip(onHoverEnterSound);
if(onHoverExitSound != "Empty")
onHoverExitACHandler = SHADE.Audio.CreateAudioClip(onHoverExitSound);
if (onClickSound != "Empty")
onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound);
if (onReleaseSound != "Empty")
onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound);
}
protected override void start()
@ -67,7 +70,7 @@ namespace SHADE_Scripting.UI
ui.OnClick.RegisterAction(() =>
{
if (onClickSound != "")
if (onClickSound != "Empty")
onClickACHandler.Play();
tweening = true;
if(thread != null)
@ -76,8 +79,10 @@ namespace SHADE_Scripting.UI
ui.OnRelease.RegisterAction(() =>
{
if (onReleaseSound != "")
if (onReleaseSound != "Empty")
onReleaseACHandler.Play();
tweening = true;
if (thread != null)
thread.Reset(currentScale, 1.0f);
@ -85,8 +90,12 @@ namespace SHADE_Scripting.UI
ui.OnHoverEnter.RegisterAction(() =>
{
if (onHoverEnterSound != "")
if (onHoverEnterSound!="Empty")
{
onHoverEnterACHandler.Play();
}
tweening = true;
if (thread != null)
thread.Reset(currentScale, hoverScale);
@ -94,7 +103,7 @@ namespace SHADE_Scripting.UI
ui.OnHoverExit.RegisterAction(() =>
{
if (onHoverExitSound != "")
if (onHoverExitSound != "Empty")
onHoverExitACHandler.Play();
tweening = true;
if (thread != null)
@ -110,7 +119,7 @@ namespace SHADE_Scripting.UI
return;
if (tweening == true && thread != null)
{
Debug.Log("Tweening value " + thread.GetValue());
transform.LocalScale = defaultScale * thread.GetValue();
currentScale = thread.GetValue();
if (thread.IsCompleted())

View File

@ -0,0 +1,317 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SHADE;
public class CutsceneEnd : Script
{
public uint nextScene;
public float duration = 3.0f;
public float skipDuration = 0.1f;
private float oldDuration = 0.0f;
private Renderable pic4aRenderable;
private Renderable pic4bRenderable;
private Renderable pic4cRenderable;
private Renderable pic5aRenderable;
private Renderable pic5bRenderable;
private Transform pic4aTran;
private Transform pic4bTran;
private Transform pic4cTran;
private Transform pic5aTran;
private Transform pic5bTran;
private float alphaIn = 0.0f;
private float time = 0.0f;
private bool showPic4a = true;
private bool showPic4b = false;
private bool showPic4c = false;
private bool showPic5a = true;
private bool showPic5b = false;
private bool skip = false;
public GameObject cutscene4Points;
private List<Transform> listOfCutscene4Points;
public GameObject cutscene4Pics;
private List<Renderable> listOfCutscene4Pics;
public GameObject cutscene5Points;
private List<Transform> listOfCutscene5Points;
public GameObject cutscene5Pics;
private List<Renderable> listOfCutscene5Pics;
private TextRenderable text4;
private TextRenderable text5;
public GameObject canvas4;
public GameObject canvas5;
private bool cutscene4Done = false;
private bool cutscene5Done = false;
protected override void awake()
{
initCutscene4();
initCutscene5();
}
protected override void update()
{
Canvas4();
Canvas5();
if (Input.GetKeyUp(Input.KeyCode.Space) && !skip && (!cutscene4Done || !cutscene5Done))
{
skip = true;
oldDuration = duration;
duration = skipDuration;
}
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene4Done && canvas4.IsActiveSelf)
{
canvas4.SetActive(false);
canvas5.SetActive(true);
duration = oldDuration;
skip = false;
}
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene5Done && canvas5.IsActiveSelf)
{
SceneManager.ChangeScene(nextScene);
}
}
private void Canvas4()
{
if (canvas4.IsActiveSelf)
{
if (showPic4a)
{
if (time < duration)
{
pic4aTran.LocalPosition = Vector3.Lerp(pic4aTran.LocalPosition, listOfCutscene4Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic4aTran.LocalPosition = listOfCutscene4Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic4aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic4a = false;
showPic4b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic4b)
{
if (time < duration)
{
pic4bTran.LocalPosition = Vector3.Lerp(pic4bTran.LocalPosition, listOfCutscene4Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic4bTran.LocalPosition = listOfCutscene4Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic4bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic4b = false;
showPic4c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic4c)
{
if (time < duration)
{
pic4cTran.LocalPosition = Vector3.Lerp(pic4cTran.LocalPosition, listOfCutscene4Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic4cTran.LocalPosition = listOfCutscene4Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic4cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic4c = false;
cutscene4Done = true;
text4.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void Canvas5()
{
if (canvas5.IsActiveSelf)
{
if (showPic5a)
{
if (time < duration)
{
pic5aTran.LocalPosition = Vector3.Lerp(pic5aTran.LocalPosition, listOfCutscene5Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic5aTran.LocalPosition = listOfCutscene5Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic5aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic5a = false;
showPic5b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic5b)
{
if (time < duration)
{
pic5bTran.LocalPosition = Vector3.Lerp(pic5bTran.LocalPosition, listOfCutscene5Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic5bTran.LocalPosition = listOfCutscene5Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic5bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic5b = false;
text5.Enabled = true;
cutscene5Done = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void initCutscene4()
{
if (cutscene4Points)
listOfCutscene4Points = cutscene4Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("Cutscene4Points Missing");
if (listOfCutscene4Points.Count == 0)
Debug.LogError("Cutscene4Points Empty");
listOfCutscene4Pics = cutscene4Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene4Pics.Count == 0)
Debug.LogError("Cutscene4Pics Empty");
if (listOfCutscene4Pics[0])
{
pic4aRenderable = listOfCutscene4Pics[0].GetComponent<Renderable>();
pic4aTran = listOfCutscene4Pics[0].GetComponent<Transform>();
pic4aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 4 PIC1 MISSING");
if (listOfCutscene4Pics[1])
{
pic4bRenderable = listOfCutscene4Pics[1].GetComponent<Renderable>();
pic4bTran = listOfCutscene4Pics[1].GetComponent<Transform>();
pic4bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 4 PIC2 MISSING");
if (listOfCutscene4Pics[2])
{
pic4cRenderable = listOfCutscene4Pics[2].GetComponent<Renderable>();
pic4cTran = listOfCutscene4Pics[2].GetComponent<Transform>();
pic4cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 1 PIC3 MISSING");
if (canvas4)
{
text4 = canvas4.GetComponentInChildren<TextRenderable>();
text4.Enabled = false;
}
else
Debug.LogError("Canvas 4 missing");
}
private void initCutscene5()
{
if (cutscene5Points)
listOfCutscene5Points = cutscene5Points.GetComponentsInChildren<Transform>().ToList();
else
Debug.LogError("cutscene5Points Missing");
if (listOfCutscene5Points.Count == 0)
Debug.LogError("Cutscene5Points Empty");
listOfCutscene5Pics = cutscene5Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene5Pics.Count == 0)
Debug.LogError("Cutscene5Pics Empty");
if (listOfCutscene5Pics[0])
{
pic5aRenderable = listOfCutscene5Pics[0].GetComponent<Renderable>();
pic5aTran = listOfCutscene5Pics[0].GetComponent<Transform>();
pic5aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 5 PIC1 MISSING");
if (listOfCutscene5Pics[1])
{
pic5bRenderable = listOfCutscene5Pics[1].GetComponent<Renderable>();
pic5bTran = listOfCutscene5Pics[1].GetComponent<Transform>();
pic5bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 5 PIC2 MISSING");
if (canvas5)
{
text5 = canvas5.GetComponentInChildren<TextRenderable>();
text5.Enabled = false;
canvas5.SetActive(false);
}
else
Debug.LogError("Canvas 5 missing");
}
}

View File

@ -0,0 +1,3 @@
Name: SC_CutSceneEnd
ID: 153706859
Type: 9

View File

@ -1,3 +0,0 @@
Name: SC_Cutscene
ID: 157565851
Type: 9

View File

@ -4,10 +4,12 @@ using System.Linq;
using SHADE;
public class Cutscene : Script
public class CutsceneIntro : Script
{
public uint nextScene;
public float duration = 3.0f;
public float skipDuration = 0.1f;
private float oldDuration = 0.0f;
private Renderable pic1aRenderable;
@ -93,14 +95,14 @@ public class Cutscene : Script
Canvas2();
Canvas3();
if (Input.GetKeyDown(Input.KeyCode.Space) && !skip && (!cutscene1Done || !cutscene2Done || !cutscene3Done))
if (Input.GetKeyUp(Input.KeyCode.Space) && !skip && (!cutscene1Done || !cutscene2Done || !cutscene3Done))
{
skip = true;
oldDuration = duration;
duration = 0.1f;
duration = skipDuration;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
{
canvas1.SetActive(false);
canvas2.SetActive(true);
@ -108,7 +110,7 @@ public class Cutscene : Script
skip = false;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene2Done && canvas2.IsActiveSelf)
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene2Done && canvas2.IsActiveSelf)
{
canvas2.SetActive(false);
canvas3.SetActive(true);
@ -116,9 +118,9 @@ public class Cutscene : Script
skip = false;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene3Done && canvas3.IsActiveSelf)
if (Input.GetKeyUp(Input.KeyCode.Space) && cutscene3Done && canvas3.IsActiveSelf)
{
//change scene
SceneManager.ChangeScene(nextScene);
}
}

View File

@ -0,0 +1,3 @@
Name: SC_CutsceneIntro
ID: 154967292
Type: 9

View File

@ -24,43 +24,12 @@ public class MainMenu : Script
protected override void start()
{
//Input.SetMouseCentering(false);
//Application.IsCursorVisible = true;
Input.SetMouseCentering(false);
Application.IsCursorVisible = true;
SceneFadeInOut.Instance.CallFadeOut();
}
protected override void update()
{
/* if (Input.GetKeyDown(Input.KeyCode.K) && obj)
{
if (testRenderable.Material.GetProperty<float>("data.alpha") == 1)
{
testRenderable.Material.SetProperty<float>("data.alpha", 0);
}
else if (testRenderable.Material.GetProperty<float>("data.alpha") == 0)
{
testRenderable.Material.SetProperty<float>("data.alpha", 1);
}
}*/
if (Input.GetKeyDown(Input.KeyCode.Space))
{
//Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
AudioHandler.audioClipHandlers["SFXMouseDownElement"].Play();
}
if (Input.GetKeyUp(Input.KeyCode.Space))
{
//Audio.PlaySFXOnce2D("event:/UI/success");
AudioHandler.audioClipHandlers["SFXUISuccess"].Play();
SceneManager.ChangeScene(sceneID);
Audio.StopAllSounds();
}
if (Input.GetKeyDown(Input.KeyCode.Escape))
{
Audio.StopAllSounds();
Application.Quit();
}
}
}

View File

@ -0,0 +1,95 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class Options:Script
{
public GameObject masterVolSlider;
public GameObject sfxVolSlider;
public GameObject bgmVolSlider;
public GameObject fovSlider;
public GameObject sensitivitySlider;
protected override void awake()
{
Slider mv = masterVolSlider.GetComponent<Slider>();
Slider sfx = sfxVolSlider.GetComponent<Slider>();
Slider bgm = bgmVolSlider.GetComponent<Slider>();
Slider fov = fovSlider.GetComponent<Slider>();
Slider sens = sensitivitySlider.GetComponent<Slider>();
if (mv != null)
{
mv.ScaledValue = Settings.masterVolume;
}
if (sfx != null)
{
sfx.ScaledValue = Settings.sfxVolume;
}
if (bgm != null)
{
bgm.ScaledValue = Settings.bgmVolume;
}
if (fov != null)
{
fov.ScaledValue = Settings.cameraFOV;
}
if (sens != null)
{
sens.ScaledValue = Settings.cameraSensitivity;
}
}
protected override void update()
{
Slider mv = masterVolSlider.GetComponent<Slider>();
Slider sfx = sfxVolSlider.GetComponent<Slider>();
Slider bgm = bgmVolSlider.GetComponent<Slider>();
Slider fov = fovSlider.GetComponent<Slider>();
Slider sens = sensitivitySlider.GetComponent<Slider>();
if(mv != null)
{
Settings.masterVolume = mv.ScaledValue;
}
if (sfx != null)
{
Settings.sfxVolume = sfx.ScaledValue;
}
if (bgm != null)
{
Settings.bgmVolume = bgm.ScaledValue;
}
if (fov != null)
{
Settings.cameraFOV = fov.ScaledValue;
}
if (sens != null)
{
Settings.cameraSensitivity = sens.ScaledValue;
}
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_Options
ID: 162565004
Type: 9

View File

@ -37,7 +37,7 @@ public class PauseMenu : Script
UIElement resume = resumeBtn.GetComponent<UIElement>();
if (resume != null)
{
resume.OnClick.RegisterAction(() =>
resume.OnRelease.RegisterAction(() =>
{
if (GameManager.Instance.GamePause)
{
@ -49,6 +49,7 @@ public class PauseMenu : Script
gamePauseText.Enabled = false;
if (canvas)
canvas.SetActive(false);
Application.FixDeltaTime = Time.DefaultFixDeltaTime;
}
});
}
@ -61,10 +62,13 @@ public class PauseMenu : Script
UIElement retry = retryBtn.GetComponent<UIElement>();
if (retry != null)
{
retry.OnClick.RegisterAction(() =>
retry.OnRelease.RegisterAction(() =>
{
Audio.StopAllSounds();
SceneManager.RestartScene();
GameManager.Instance.GamePause = false;
GameManager.Instance.stealFoodPopUpDone = false;
GameManager.Instance.PreviewLevelDone = false;
});
}
else
@ -75,7 +79,7 @@ public class PauseMenu : Script
UIElement quit = quitBtn.GetComponent<UIElement>();
if (quit != null)
{
quit.OnClick.RegisterAction(() =>
quit.OnRelease.RegisterAction(() =>
{
Audio.StopAllSounds();
//go to main menu
@ -91,7 +95,7 @@ public class PauseMenu : Script
protected override void update()
{
if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause && GameManager.Instance.stealFoodPopUpDone)
if (Input.GetKeyUp(Input.KeyCode.Escape) && !GameManager.Instance.GamePause && GameManager.Instance.stealFoodPopUpDone)
{
GameManager.Instance.GamePause = true;
Input.SetMouseCentering(false);
@ -101,6 +105,7 @@ public class PauseMenu : Script
gamePauseText.Enabled = true;
if (canvas)
canvas.SetActive(true);
Application.FixDeltaTime = 0;
}
}

View File

@ -11,8 +11,6 @@ namespace SHADE_Scripting.UI
{
public GameObject sliderObj;
public int minValue = 0;
public int maxValue = 0;
protected override void start()
{
@ -22,7 +20,7 @@ namespace SHADE_Scripting.UI
if (slider != null && text != null)
{
text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString();
text.Text = ((int)(slider.ScaledValue)).ToString();
}
}
protected override void update()
@ -32,7 +30,7 @@ namespace SHADE_Scripting.UI
if(slider != null && text != null)
{
text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString();
text.Text = ((int)(slider.ScaledValue)).ToString();
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_04a
ID: 51238312
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_04b
ID: 61471971
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_04c
ID: 58217538
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_05a
ID: 61980534
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: TX_cutscene_05b
ID: 51561286
Type: 3

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: MainMenuBG
ID: 58181851
Type: 3

View File

@ -62,7 +62,6 @@ if %_e%==3 (goto :done) else (goto :ModelCompiler)
echo -----------------------ModelCompiler----------------------------
rmdir "Dependencies/ModelCompiler" /S /Q
git clone https://github.com/SHADE-DP/ModelCompiler.git "Dependencies/ModelCompiler"
git clone https://github.com/SHADE-DP/assimp.git "Dependencies/ModelCompiler/Dependencies/assimp"
if %_e%==4 (goto :done) else (goto :spdlog)
@REM :ktx

View File

@ -179,9 +179,6 @@ namespace Sandbox
// Link up SHDebugDraw
SHDebugDraw::Init(SHSystemManager::GetSystem<SHDebugDrawSystem>());
auto clip = SHResourceManager::LoadOrGet<SHAnimationClip>(77816045);
auto rig = SHResourceManager::LoadOrGet<SHRig>(77816045);
}
void SBApplication::Update(void)
@ -201,8 +198,6 @@ namespace Sandbox
#ifdef SHEDITOR
if(editor->editorState == SHEditor::State::PLAY)
#else
window.ClipMouseCursor();
#endif
SHSceneManager::SceneUpdate(0.016f);
#ifdef SHEDITOR

View File

@ -20,15 +20,14 @@ namespace SHADE
/* Constructors */
/*-----------------------------------------------------------------------------------*/
SHAnimationClip::SHAnimationClip(const SHAnimAsset& asset)
: ticksPerSecond { static_cast<int>(asset.ticksPerSecond) }
, totalTime { static_cast<float>(asset.duration) / static_cast<int>(asset.ticksPerSecond) }
{
// Populate keyframes
int maxFrames = 0;
totalTime = 0.0f;
for (const auto& channel : asset.nodeChannels)
{
// Create a channel
Channel newChannel;
newChannel.Name = std::string(channel.name);
newChannel.PositionKeyFrames.reserve(channel.positionKeys.size());
newChannel.RotationKeyFrames.reserve(channel.rotationKeys.size());
newChannel.ScaleKeyFrames.reserve(channel.scaleKeys.size());
@ -36,22 +35,31 @@ namespace SHADE
// Populate Keyframes
for (const auto& posKey : channel.positionKeys)
{
newChannel.PositionKeyFrames.emplace_back(SHAnimationKeyFrame<SHVec3>{ static_cast<int>(posKey.time), posKey.value});
newChannel.PositionKeyFrames.emplace_back(SHAnimationKeyFrame<SHVec3>{ posKey.time, posKey.value});
}
for (const auto& rotKey : channel.rotationKeys)
{
newChannel.RotationKeyFrames.emplace_back(SHAnimationKeyFrame<SHQuaternion>{ static_cast<int>(rotKey.time), rotKey.value});
newChannel.RotationKeyFrames.emplace_back(SHAnimationKeyFrame<SHQuaternion>{ rotKey.time, rotKey.value});
}
for (const auto& scaleKey : channel.scaleKeys)
{
newChannel.ScaleKeyFrames.emplace_back(SHAnimationKeyFrame<SHVec3>{ static_cast<int>(scaleKey.time), scaleKey.value});
newChannel.ScaleKeyFrames.emplace_back(SHAnimationKeyFrame<SHVec3>{ scaleKey.time, scaleKey.value });
}
newChannel.MaxFrames = std::max({ newChannel.PositionKeyFrames.size(), newChannel.RotationKeyFrames.size(), newChannel.ScaleKeyFrames.size() });
// Compute max frames
maxFrames = std::max(maxFrames, newChannel.MaxFrames);
// Compute total time
totalTime = std::max({ totalTime, newChannel.PositionKeyFrames.back().TimeStamp, newChannel.RotationKeyFrames.back().TimeStamp, newChannel.ScaleKeyFrames.back().TimeStamp });
// Insert the channel
channels.emplace_back(std::move(newChannel));
}
// Compute fps
ticksPerSecond = static_cast<int>(maxFrames / totalTime);
}
/*-----------------------------------------------------------------------------------*/

View File

@ -27,8 +27,8 @@ namespace SHADE
template<typename T>
struct SHAnimationKeyFrame
{
int FrameIndex;
T Data;
float TimeStamp;
T Data;
};
/// <summary>
@ -46,7 +46,6 @@ namespace SHADE
/// </summary>
struct Channel
{
std::string Name;
std::vector<SHAnimationKeyFrame<SHVec3>> PositionKeyFrames;
std::vector<SHAnimationKeyFrame<SHQuaternion>> RotationKeyFrames;
std::vector<SHAnimationKeyFrame<SHVec3>> ScaleKeyFrames;

View File

@ -89,16 +89,7 @@ namespace SHADE
currClip = newClip;
secsPerTick = 1.0f / currClip->GetTicksPerSecond();
// Build channel map
channelMap.clear();
if (currClip)
{
for (const auto& channel : currClip->GetChannels())
{
channelMap.emplace(channel.Name, &channel);
}
}
// Set to initial pose
if (rig && rig->GetRootNode() && currClip)
{
updatePoseWithClip(0.0f);
@ -133,24 +124,23 @@ namespace SHADE
/*-----------------------------------------------------------------------------------*/
void SHAnimatorComponent::updatePoseWithClip(float poseTime)
{
// Get closest frame index
const int CLOSEST_FRAME_IDX = static_cast<int>(std::floorf(poseTime * currClip->GetTicksPerSecond()));
updatePoseWithClip(CLOSEST_FRAME_IDX, poseTime, rig->GetRootNode(), SHMatrix::Identity);
updatePoseWithClip(poseTime, rig->GetRootNode(), SHMatrix::Identity);
}
void SHAnimatorComponent::updatePoseWithClip(int closestFrameIndex, float poseTime, Handle<SHRigNode> node, const SHMatrix& parentMatrix)
void SHAnimatorComponent::updatePoseWithClip(float poseTime, Handle<SHRigNode> node, const SHMatrix& parentMatrix)
{
// Check if there is a channel for this node
const std::string& BONE_NAME = rig->GetName(node);
SHMatrix transformMatrix = node->TransformMatrix;
if (channelMap.contains(BONE_NAME))
const int BONE_IDX = rig->GetNodeIndex(node);
const auto& CHANNELS = currClip->GetChannels();
if (BONE_IDX < CHANNELS.size())
{
const auto CHANNEL = channelMap[BONE_NAME];
const auto& CHANNEL = CHANNELS[BONE_IDX];
transformMatrix = SHMatrix::Transform
(
getInterpolatedValue(CHANNEL->PositionKeyFrames, closestFrameIndex, poseTime),
getInterpolatedValue(CHANNEL->RotationKeyFrames, closestFrameIndex, poseTime),
getInterpolatedValue(CHANNEL->ScaleKeyFrames, closestFrameIndex, poseTime)
getInterpolatedValue(CHANNEL.PositionKeyFrames, poseTime),
getInterpolatedValue(CHANNEL.RotationKeyFrames, poseTime),
getInterpolatedValue(CHANNEL.ScaleKeyFrames, poseTime)
);
}
@ -168,7 +158,7 @@ namespace SHADE
// Apply pose to children
for (auto& child : node->Children)
{
updatePoseWithClip(closestFrameIndex, poseTime, child, transformMatrix);
updatePoseWithClip(poseTime, child, transformMatrix);
}
}
}

View File

@ -134,16 +134,14 @@ namespace SHADE
float secsPerTick = 0.0f;
// Buffer
std::vector<SHMatrix> boneMatrices;
// Caches
std::unordered_map<std::string, const SHAnimationClip::Channel*> channelMap;
/*---------------------------------------------------------------------------------*/
/* Helper Functions */
/*---------------------------------------------------------------------------------*/
void updatePoseWithClip(float poseTime);
void updatePoseWithClip(int closestFrameIndex, float poseTime, Handle<SHRigNode> node, const SHMatrix& parentMatrix);
void updatePoseWithClip(float poseTime, Handle<SHRigNode> node, const SHMatrix& parentMatrix);
template<typename T>
T getInterpolatedValue(const std::vector<SHAnimationKeyFrame<T>>& keyframes, int closestFrameIndex, float poseTime);
T getInterpolatedValue(const std::vector<SHAnimationKeyFrame<T>>& keyframes, float poseTime);
/*---------------------------------------------------------------------------------*/
/* RTTR */

View File

@ -26,7 +26,7 @@ namespace SHADE
/* Helper Functions */
/*-----------------------------------------------------------------------------------*/
template<typename T>
T SHAnimatorComponent::getInterpolatedValue(const std::vector<SHAnimationKeyFrame<T>>& keyframes, int closestFrameIndex, float poseTime)
T SHAnimatorComponent::getInterpolatedValue(const std::vector<SHAnimationKeyFrame<T>>& keyframes, float poseTime)
{
// Only allow SHVec3 and SHQuaternion
static_assert(std::is_same_v<T, SHVec3> || std::is_same_v<T, SHQuaternion>, "Only interpolation for SHVec3 and SHQuaternion is allowed.");
@ -38,11 +38,11 @@ namespace SHADE
{
const auto& KEYFRAME = *iter;
if (KEYFRAME.FrameIndex <= closestFrameIndex)
if (KEYFRAME.TimeStamp <= poseTime)
{
firstKeyFrame = iter;
}
else // KEYFRAME.FrameIndex > closestFrameIndex
else // KEYFRAME.FrameIndex > poseTime
{
nextKeyFrame = iter;
break;
@ -66,8 +66,8 @@ namespace SHADE
}
// Get interpolated vector
const float PREV_FRAME_TIME = firstKeyFrame->FrameIndex * secsPerTick;
const float NEXT_FRAME_TIME = nextKeyFrame->FrameIndex * secsPerTick;
const float PREV_FRAME_TIME = firstKeyFrame->TimeStamp;
const float NEXT_FRAME_TIME = nextKeyFrame->TimeStamp;
const float NORMALISED_TIME = (poseTime - PREV_FRAME_TIME) / (NEXT_FRAME_TIME - PREV_FRAME_TIME);
if constexpr (std::is_same_v<T, SHQuaternion>)

View File

@ -120,8 +120,10 @@ namespace SHADE
// Fill the node with data
const auto& NODE_DATA = asset.nodeDataCollection.at(sourceNode->idRef);
newNode->OffsetMatrix = SHMatrix::Transpose(NODE_DATA.offset);
newNode->TransformMatrix = SHMatrix::Transpose(NODE_DATA.transform);
//newNode->OffsetMatrix = SHMatrix::Transpose(NODE_DATA.inverseBindMatrix);
//newNode->TransformMatrix = SHMatrix::Transpose(NODE_DATA.transform);
newNode->OffsetMatrix = NODE_DATA.inverseBindMatrix;
newNode->TransformMatrix = NODE_DATA.transform;
// Populate maps
if (!NODE_DATA.name.empty())

View File

@ -18,71 +18,61 @@
namespace SHADE
{
enum class SHAnimationBehaviour : uint8_t
{
DEFAULT = 0x0,
CONSTANT = 0x1,
LINEAR = 0x2,
REPEAT = 0x3
};
enum class AnimationInterpolation : uint8_t
{
DEFAULT = 0x1,
LINEAR = 0x1,
STEP = 0x2,
CUBICSPLINE = 0x3
};
// Smallest data containers
struct PositionKey
{
float time;
SHVec3 value;
};
struct RotationKey
{
float time;
SHVec4 value;
};
struct ScaleKey
{
float time;
SHVec3 value;
};
// Base
struct KeyBase
{
float time;
};
// Smallest data containers
struct PositionKey :KeyBase
{
SHVec3 value;
};
struct RotationKey : KeyBase
{
SHVec4 value;
};
struct ScaleKey :KeyBase
{
SHVec3 value;
};
// Headers for read/write
struct SHAnimNodeInfo
{
uint32_t charCount;
uint32_t posKeyCount;
uint32_t rotKeyCount;
uint32_t scaKeyCount;
};
struct SHAnimDataHeader
{
uint32_t charCount;
uint32_t animNodeCount;
std::vector<SHAnimNodeInfo> nodeHeaders;
uint32_t animNodeCount;
uint32_t frameCount;
};
// Main data containers
struct SHAnimData
struct SHAnimNode
{
std::string name;
SHAnimationBehaviour pre;
SHAnimationBehaviour post;
std::vector<PositionKey> positionKeys;
std::vector<RotationKey> rotationKeys;
std::vector<ScaleKey> scaleKeys;
AnimationInterpolation interpolation;
std::vector<PositionKey> positionKeys{};
std::vector<RotationKey> rotationKeys{};
std::vector<ScaleKey> scaleKeys{};
};
struct SH_API SHAnimAsset : SHAssetData
struct SH_API SHAnimAsset final : SHAssetData
{
std::string name;
double duration;
double ticksPerSecond;
double duration{};
double ticksPerSecond{};
std::vector<SHAnimData> nodeChannels;
//std::vector<aiMeshAnim*> meshChannels;
//std::vector<aiMeshMorphAnim*> morphMeshChannels;
std::vector<SHAnimNode> nodeChannels{};
};
}

View File

@ -19,45 +19,28 @@
namespace SHADE
{
constexpr int BONE_INDEX_ALIGHTMENT = 4;
struct SHMeshDataHeader
{
uint32_t vertexCount;
uint32_t indexCount;
uint32_t charCount;
uint32_t boneCount;
};
struct MeshBoneInfo
{
uint32_t charCount;
uint32_t weightCount; // Size should be same as boneCount
};
struct BoneWeight
{
uint32_t index;
float weight;
};
struct MeshBone
{
std::string name;
SHMatrix offset;
std::vector<BoneWeight> weights;
bool hasWeights;
};
struct SH_API SHMeshAsset : SHAssetData
{
std::string name;
std::vector<SHVec3> VertexPositions;
std::vector<SHVec3> VertexTangents;
std::vector<SHVec3> VertexNormals;
std::vector<SHVec2> VertexTexCoords;
std::vector<uint32_t> Indices;
std::vector<SHVec4U> VertexBoneIndices;
std::vector<SHVec4> VertexBoneWeights;
std::vector<SHVec3> VertexPositions{};
std::vector<SHVec3> VertexTangents{};
std::vector<SHVec3> VertexNormals{};
std::vector<SHVec2> VertexTexCoords{};
std::vector<uint32_t> Indices{};
//Variables
std::vector<SHVec4> VertexBoneWeights{};
std::vector<SHVec4U> VertexBoneIndices{};
uint32_t BoneCount;
};
}

View File

@ -1,13 +1,11 @@
#include "SHpch.h"
#include "SHRigAsset.h"
#include <queue>
namespace SHADE
{
SHRigAsset::~SHRigAsset()
{
if (root != nullptr)
delete[] root;
delete[] root;
}
}

View File

@ -17,31 +17,43 @@
namespace SHADE
{
using NodeDataFlag = unsigned char;
constexpr NodeDataFlag NODE_DATA_ROTATION = 0b0001;
constexpr NodeDataFlag NODE_DATA_SCALE = 0b0010;
constexpr NodeDataFlag NODE_DATA_TRANSLATION = 0b0100;
constexpr NodeDataFlag NODE_DATA_MATRIX = 0b1000;
constexpr size_t NODE_COMPONENT_COUNT_ROTATION{ 4 };
constexpr size_t NODE_COMPONENT_COUNT_SCALE{ 3 };
constexpr size_t NODE_COMPONENT_COUNT_TRANSLATION{ 3 };
constexpr size_t NODE_COMPONENT_COUNT_MATRIX{ 16 };
struct SHRigDataHeader
{
uint32_t nodeCount;
std::vector<uint32_t> charCounts;
uint32_t nodeCount{};
uint32_t startNode{};
std::vector<uint32_t> charCounts{};
};
struct SHRigNodeData
{
std::string name;
SHMatrix transform;
SHMatrix offset;
SHMatrix transform;
SHMatrix inverseBindMatrix;
};
struct SHRigNodeAsset
{
uint32_t idRef;
std::vector<SHRigNodeAsset*> children;
};
struct SHRigNodeAsset
{
uint32_t idRef;
std::vector<SHRigNodeAsset*> children;
};
struct SH_API SHRigAsset : SHAssetData
{
~SHRigAsset();
SHRigDataHeader header;
std::vector<SHRigNodeData> nodeDataCollection;
SHRigNodeAsset* root;
std::vector<SHRigNodeData> nodeDataCollection{};
SHRigNodeAsset* root;
};
}

View File

@ -0,0 +1,23 @@
/******************************************************************************
* \file SHAudioBankAsset.h
* \author Loh Xiao Qi
* \date 31 January 2023
* \brief
*
* \copyright Copyright (c) 2023 Digipen Institute of Technology. Reproduction
* or disclosure of this file or its contents without the prior
* written consent of Digipen Institute of Technology is prohibited.
******************************************************************************/
#pragma once
#include "SHAssetData.h"
#include <string>
namespace SHADE
{
struct SHAudioBankAsset : SHAssetData
{
std::string name;
std::string path;
};
}

View File

@ -17,6 +17,52 @@
namespace SHADE
{
inline SHVec3 GetVec3FromVector(std::vector<double> const& vec)
{
assert(vec.size() == NODE_COMPONENT_COUNT_TRANSLATION);
return SHVec3{
static_cast<float>(vec[0]),
static_cast<float>(vec[1]),
static_cast<float>(vec[2])
};
}
inline SHVec4 GetVec4FromVector(std::vector<double> const& vec)
{
assert(vec.size() == NODE_COMPONENT_COUNT_ROTATION);
return SHVec4{
static_cast<float>(vec[0]),
static_cast<float>(vec[1]),
static_cast<float>(vec[2]),
static_cast<float>(vec[3])
};
}
inline SHMatrix GetMatrixFromVector(std::vector<double> const& vec)
{
assert(vec.size() == NODE_COMPONENT_COUNT_MATRIX);
return SHMatrix{
static_cast<float>(vec[0]),
static_cast<float>(vec[1]),
static_cast<float>(vec[2]),
static_cast<float>(vec[3]),
static_cast<float>(vec[4]),
static_cast<float>(vec[5]),
static_cast<float>(vec[6]),
static_cast<float>(vec[7]),
static_cast<float>(vec[8]),
static_cast<float>(vec[9]),
static_cast<float>(vec[10]),
static_cast<float>(vec[11]),
static_cast<float>(vec[12]),
static_cast<float>(vec[13]),
static_cast<float>(vec[14]),
static_cast<float>(vec[15])
};
}
void SHModelLoader::ReadHeaders(FileReference file, SHModelAsset& asset)
{
file.read(
@ -36,29 +82,12 @@ namespace SHADE
if (asset.header.animCount > 0)
{
asset.animHeaders.resize(asset.header.animCount);
for (auto i {0}; i < asset.header.animCount; ++i)
for (auto& animHeader : asset.animHeaders)
{
auto& animHeader = asset.animHeaders[i];
file.read(
reinterpret_cast<char*>(&animHeader.charCount),
sizeof(uint32_t)
reinterpret_cast<char*>(&animHeader),
sizeof(animHeader)
);
file.read(
reinterpret_cast<char*>(&animHeader.animNodeCount),
sizeof(uint32_t)
);
animHeader.nodeHeaders.resize(animHeader.animNodeCount);
for (auto j {0}; j < animHeader.animNodeCount; ++j)
{
auto& nodeHeader = animHeader.nodeHeaders[j];
file.read(
reinterpret_cast<char*>(&nodeHeader),
sizeof(SHAnimNodeInfo)
);
}
}
}
}
@ -74,53 +103,63 @@ namespace SHADE
ReadRigHeader(file, asset.rig.header);
ReadRigData(file, asset.rig.header, asset.rig.nodeDataCollection);
ReadRigTree(file, asset.rig.header, asset.rig.root);
for (auto& mesh : asset.meshes)
{
mesh->BoneCount = asset.rig.nodeDataCollection.size();
}
//BuildTransformMatrices(asset.rig);
}
}
void SHModelLoader::ReadAnimNode(FileReference file, SHAnimNodeInfo const& info, SHAnimData& data)
void SHModelLoader::ReadAnimNode(FileReference file, uint32_t frameCount, SHAnimNode& data)
{
data.name.resize(info.charCount);
file.read(
data.name.data(),
info.charCount
reinterpret_cast<char*>(&data.interpolation),
1
);
file.read(
reinterpret_cast<char*>(&data.pre),
sizeof(SHAnimationBehaviour)
);
file.read(
reinterpret_cast<char*>(&data.post),
sizeof(SHAnimationBehaviour)
);
uint32_t keySize {0};
file.read(
reinterpret_cast<char*>(&keySize),
sizeof(uint32_t)
);
data.positionKeys.resize(keySize);
data.rotationKeys.resize(keySize);
data.scaleKeys.resize(keySize);
data.positionKeys.resize(frameCount);
data.rotationKeys.resize(frameCount);
data.scaleKeys.resize(frameCount);
file.read(
reinterpret_cast<char*>(data.positionKeys.data()),
sizeof(PositionKey) * keySize
sizeof(PositionKey) * frameCount
);
file.read(
reinterpret_cast<char*>(data.rotationKeys.data()),
sizeof(RotationKey) * keySize
sizeof(RotationKey) * frameCount
);
file.read(
reinterpret_cast<char*>(data.scaleKeys.data()),
sizeof(ScaleKey) * keySize
sizeof(ScaleKey) * frameCount
);
}
void SHModelLoader::BuildTransformMatrices(SHRigAsset& rig)
{
std::queue<SHRigNodeAsset const*> nodeQueue;
nodeQueue.push(rig.root);
while(!nodeQueue.empty())
{
auto& current = nodeQueue.front();
nodeQueue.pop();
auto& parentData {rig.nodeDataCollection[current->idRef]};
for (auto const& child: current->children)
{
nodeQueue.push(child);
auto& childData {rig.nodeDataCollection[child->idRef]};
childData.transform = childData.transform * parentData.transform;
}
}
}
void SHModelLoader::ReadRigHeader(FileReference file, SHRigDataHeader& header)
{
file.read(
@ -128,6 +167,11 @@ namespace SHADE
sizeof(uint32_t)
);
file.read(
reinterpret_cast<char*>(&header.startNode),
sizeof(uint32_t)
);
header.charCounts.resize(header.nodeCount);
file.read(
reinterpret_cast<char*>(header.charCounts.data()),
@ -141,21 +185,72 @@ namespace SHADE
for (auto i {0}; i < header.nodeCount; ++i)
{
data[i].name.resize(header.charCounts[i]);
auto& node = data[i];
node.name.resize(header.charCounts[i]);
file.read(
data[i].name.data(),
node.name.data(),
header.charCounts[i]
);
file.read(
reinterpret_cast<char*>(&data[i].transform),
reinterpret_cast<char*>(&node.inverseBindMatrix),
sizeof(SHMatrix)
);
node.inverseBindMatrix = node.inverseBindMatrix;
NodeDataFlag flag;
file.get(reinterpret_cast<char&>(flag));
SHVec3 scale{ SHVec3::One }, translation{ SHVec3::Zero };
SHVec4 rotation{ SHVec4::UnitW };
SHMatrix matrix{ SHMatrix::Identity };
std::vector<double> carrier;
if (flag & NODE_DATA_ROTATION)
{
carrier.resize(NODE_COMPONENT_COUNT_ROTATION);
file.read(
reinterpret_cast<char*>(carrier.data()),
sizeof(double) * NODE_COMPONENT_COUNT_ROTATION
);
rotation = GetVec4FromVector(carrier);
}
if (flag & NODE_DATA_SCALE)
{
carrier.resize(NODE_COMPONENT_COUNT_SCALE);
file.read(
reinterpret_cast<char*>(carrier.data()),
sizeof(double) * NODE_COMPONENT_COUNT_SCALE
);
scale = GetVec3FromVector(carrier);
}
if (flag & NODE_DATA_TRANSLATION)
{
carrier.resize(NODE_COMPONENT_COUNT_TRANSLATION);
file.read(
reinterpret_cast<char*>(carrier.data()),
sizeof(double) * NODE_COMPONENT_COUNT_TRANSLATION
);
translation = GetVec3FromVector(carrier);
}
if (flag & NODE_DATA_MATRIX)
{
carrier.resize(NODE_COMPONENT_COUNT_MATRIX);
file.read(
reinterpret_cast<char*>(carrier.data()),
sizeof(double) * NODE_COMPONENT_COUNT_MATRIX
);
matrix = GetMatrixFromVector(carrier);
}
//matrix *= SHMatrix::Transform(translation, rotation, scale);
matrix *= SHMatrix::Translate(translation) * SHMatrix::Rotate(rotation) * SHMatrix::Scale(scale);
node.transform = matrix;
//node.transform = SHMatrix::Inverse(node.inverseBindMatrix);
file.read(
reinterpret_cast<char*>(&data[i].offset),
sizeof(SHMatrix)
);
}
}
@ -199,8 +294,6 @@ namespace SHADE
nodeQueue.emplace(depthPtr++, depthTempPtr++);
}
}
delete[] dst;
}
void SHModelLoader::ReadMeshData(FileReference file, std::vector<SHMeshDataHeader> const& headers,
@ -221,7 +314,6 @@ namespace SHADE
data.VertexNormals.resize(header.vertexCount);
data.VertexTexCoords.resize(header.vertexCount);
data.Indices.resize(header.indexCount);
data.BoneCount = header.boneCount;
file.read(data.name.data(), header.charCount);
file.read(reinterpret_cast<char*>(data.VertexPositions.data()), vertexVec3Byte);
@ -230,48 +322,20 @@ namespace SHADE
file.read(reinterpret_cast<char*>(data.VertexTexCoords.data()), vertexVec2Byte);
file.read(reinterpret_cast<char*>(data.Indices.data()), sizeof(uint32_t) * header.indexCount);
if (header.boneCount)
if (header.hasWeights)
{
std::vector<MeshBoneInfo> boneInfos(header.boneCount);
std::vector<MeshBone> bones(header.boneCount);
file.read(reinterpret_cast<char*>(boneInfos.data()), sizeof(MeshBoneInfo) * header.boneCount);
for (auto i{ 0 }; i < header.boneCount; ++i)
{
auto& bone = bones[i];
auto const& info = boneInfos[i];
bone.name.resize(info.charCount);
file.read(bone.name.data(), info.charCount);
file.read(reinterpret_cast<char*>(&bone.offset), sizeof(SHMatrix));
bone.weights.resize(info.weightCount);
file.read(reinterpret_cast<char*>(bone.weights.data()), sizeof(BoneWeight) * info.weightCount);
}
data.VertexBoneIndices.resize(header.vertexCount);
data.VertexBoneWeights.resize(header.vertexCount);
for (uint32_t boneIndex{0}; boneIndex < bones.size(); ++boneIndex)
{
auto const& bone = bones[boneIndex];
for (auto const& weight : bone.weights)
{
auto& boneIndices = data.VertexBoneIndices[weight.index];
auto& boneWeight = data.VertexBoneWeights[weight.index];
file.read(
reinterpret_cast<char*>(data.VertexBoneWeights.data()),
sizeof(SHVec4) * header.vertexCount
);
for (auto j{0}; j < BONE_INDEX_ALIGHTMENT; ++j)
{
if (boneWeight[j] == 0.f)
{
boneIndices[j] = boneIndex;
boneWeight[j] = weight.weight;
break;
}
}
}
}
file.read(
reinterpret_cast<char*>(data.VertexBoneIndices.data()),
sizeof(SHVec4U) * header.vertexCount
);
}
meshes[i] = &data;
@ -306,7 +370,7 @@ namespace SHADE
animAsset.nodeChannels.resize(header.animNodeCount);
for (auto i {0}; i < header.animNodeCount; ++i)
{
ReadAnimNode(file, header.nodeHeaders[i], animAsset.nodeChannels[i]);
ReadAnimNode(file, header.frameCount, animAsset.nodeChannels[i]);
}
anims[i] = &animAsset;

View File

@ -20,7 +20,6 @@ namespace SHADE
{
using FileReference = std::ifstream&;
void ReadAnimNode(FileReference file, SHAnimNodeInfo const& info, SHAnimData& data);
void ReadRigHeader(FileReference file, SHRigDataHeader& header);
void ReadRigData(FileReference file, SHRigDataHeader const& header, std::vector<SHRigNodeData>& data);
@ -28,6 +27,9 @@ namespace SHADE
void ReadMeshData(FileReference file, std::vector<SHMeshDataHeader> const& headers, std::vector<SHMeshAsset*>& meshes);
void ReadAnimData(FileReference file, std::vector<SHAnimDataHeader> const& headers, std::vector<SHAnimAsset*>& anims);
void ReadAnimNode(FileReference file, uint32_t frameCount, SHAnimNode& data);
void BuildTransformMatrices(SHRigAsset& rig);
void ReadHeaders(FileReference file, SHModelAsset& asset);
void ReadData(FileReference file, SHModelAsset& asset);

View File

@ -14,6 +14,7 @@
#include "Assets/Asset Types/SHSceneAsset.h"
#include "Assets/Asset Types/SHPrefabAsset.h"
#include "Assets/Asset Types/SHMaterialAsset.h"
#include "Assets/Asset Types/SHAudioBankAsset.h"
#include <fstream>
#include <sstream>
@ -22,6 +23,14 @@ namespace SHADE
{
SHAssetData* SHTextBasedLoader::Load(AssetPath path)
{
if (path.extension().string() == AUDIO_BANK_EXTENSION)
{
auto data = new SHAudioBankAsset();
data->name = path.stem().string();
data->path = path.string();
return data;
}
std::ifstream file{ path, std::ios::in };
if (!file.is_open())

View File

@ -56,6 +56,7 @@ enum class AssetType : AssetTypeMeta
MESH,
SCRIPT,
FONT,
AUDIO_BANK,
MAX_COUNT
};
constexpr size_t TYPE_COUNT{ static_cast<size_t>(AssetType::MAX_COUNT) };
@ -83,6 +84,7 @@ constexpr std::string_view MATERIAL_FOLDER{ "/Materials/" };
constexpr std::string_view META_EXTENSION {".shmeta"};
constexpr std::string_view AUDIO_EXTENSION {".ogg"};
constexpr std::string_view AUDIO_WAV_EXTENSION {".wav"};
constexpr std::string_view AUDIO_BANK_EXTENSION {".bank"};
constexpr std::string_view SHADER_EXTENSION{ ".shshader" };
constexpr std::string_view SHADER_BUILT_IN_EXTENSION{ ".shshaderb" };
constexpr std::string_view FONT_EXTENSION{ ".shfont" };
@ -105,10 +107,10 @@ constexpr std::string_view EXTENSIONS[] = {
"dummy",
SCRIPT_EXTENSION,
FONT_EXTENSION,
AUDIO_WAV_EXTENSION,
AUDIO_BANK_EXTENSION
};
constexpr size_t EXTENSIONS_COUNT{ 11 };
constexpr size_t EXTENSIONS_COUNT{ static_cast<size_t>(AssetType::MAX_COUNT) };
// EXTERNAL EXTENSIONS
constexpr std::string_view GLSL_EXTENSION{ ".glsl" };

View File

@ -445,6 +445,10 @@ namespace SHADE
fontPath += FONT_EXTENSION;
newPath = fontPath;
}
else if (ext == AUDIO_BANK_EXTENSION.data())
{
newPath = path.string();
}
else
{
SHLOG_WARNING("[Asset Manager] File Type compilation not yet Implemented: {}", path.string());
@ -528,6 +532,7 @@ namespace SHADE
loaders[static_cast<size_t>(AssetType::MESH)] = nullptr;
loaders[static_cast<size_t>(AssetType::SCRIPT)] = nullptr;
loaders[static_cast<size_t>(AssetType::FONT)] = dynamic_cast<SHAssetLoader*>(new SHFontLoader());
loaders[static_cast<size_t>(AssetType::AUDIO_BANK)] = loaders[static_cast<size_t>(AssetType::SCENE)];
}
/****************************************************************************
@ -696,6 +701,20 @@ namespace SHADE
return newAsset.id;
}
else if (ext == AUDIO_BANK_EXTENSION)
{
SHAsset newAsset{
path.stem().string(),
GenerateAssetID(AssetType::AUDIO_BANK),
AssetType::AUDIO_BANK,
path,
false
};
assetCollection.emplace(newAsset.id, newAsset);
SHAssetMetaHandler::WriteMetaData(newAsset);
return newAsset.id;
}
else if(ext == MATERIAL_EXTENSION)
{
SHAsset newAsset{

Some files were not shown because too many files have changed in this diff Show More