Merge branch 'main' into SP3-22-AnimationController
This commit is contained in:
commit
9486762693
|
@ -1,4 +1,4 @@
|
||||||
Start Maximized: true
|
Start Maximized: true
|
||||||
Working Scene ID: 97158628
|
Working Scene ID: 86098106
|
||||||
Window Size: {x: 1920, y: 1013}
|
Window Size: {x: 1920, y: 1013}
|
||||||
Style: 0
|
Style: 0
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 37048829
|
||||||
|
FragmentShader: 45685219
|
||||||
|
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}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: ShinyHightlight
|
||||||
|
ID: 122370915
|
||||||
|
Type: 7
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 38847805
|
||||||
|
FragmentShader: 42962441
|
||||||
|
SubPass: Object VFX Subpass No Depth
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 0
|
||||||
|
data.alpha: 0
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Silhouette
|
||||||
|
ID: 126391182
|
||||||
|
Type: 7
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 35983630
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 51158984
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: GameIcon
|
||||||
|
ID: 126117259
|
||||||
|
Type: 7
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 35983630
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 62200943
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Instruction_01
|
||||||
|
ID: 124926341
|
||||||
|
Type: 7
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 35983630
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 53303669
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Instruction_02
|
||||||
|
ID: 128721520
|
||||||
|
Type: 7
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 35983630
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 61780097
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Instruction_03
|
||||||
|
ID: 124482180
|
||||||
|
Type: 7
|
|
@ -0,0 +1,8 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 35983630
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 59178524
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Instruction_04
|
||||||
|
ID: 129768803
|
||||||
|
Type: 7
|
|
@ -4,5 +4,5 @@
|
||||||
Properties:
|
Properties:
|
||||||
data.color: {x: 1, y: 1, z: 1, w: 1}
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
data.textureIndex: 51995224
|
data.textureIndex: 51995224
|
||||||
data.alpha: 0
|
data.alpha: 1
|
||||||
data.beta: {x: 1, y: 1, z: 1}
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -4,5 +4,5 @@
|
||||||
Properties:
|
Properties:
|
||||||
data.color: {x: 1, y: 1, z: 1, w: 1}
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
data.textureIndex: 54429632
|
data.textureIndex: 54429632
|
||||||
data.alpha: 0
|
data.alpha: 1
|
||||||
data.beta: {x: 1, y: 1, z: 1}
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,12 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 48832081
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 64651793
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
||||||
|
data.sliderThreshold: 1
|
||||||
|
data.sliderStartColor: {x: 0, y: 1, z: 0, w: 1}
|
||||||
|
data.sliderEndColor: {x: 1, y: 0, z: 0, w: 1}
|
||||||
|
data.sliderBarColor: {x: 1, y: 1, z: 1, w: 1}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: UIMat_Slider
|
||||||
|
ID: 128676209
|
||||||
|
Type: 7
|
|
@ -4,5 +4,5 @@
|
||||||
Properties:
|
Properties:
|
||||||
data.color: {x: 1, y: 1, z: 1, w: 1}
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
data.textureIndex: 57302694
|
data.textureIndex: 57302694
|
||||||
data.alpha: 0
|
data.alpha: 1
|
||||||
data.beta: {x: 1, y: 1, z: 1}
|
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -0,0 +1,9 @@
|
||||||
|
- VertexShader: 46580970
|
||||||
|
FragmentShader: 43211183
|
||||||
|
SubPass: UI
|
||||||
|
Properties:
|
||||||
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
data.textureIndex: 51995224
|
||||||
|
data.alpha: 1
|
||||||
|
data.beta: {x: 1, y: 1, z: 1}
|
||||||
|
data.sliderThreshold: 1
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: UIMat_Slider_Textured
|
||||||
|
ID: 127128823
|
||||||
|
Type: 7
|
|
@ -0,0 +1,147 @@
|
||||||
|
- EID: 0
|
||||||
|
PrefabID: 117058283
|
||||||
|
Name: ====Raccoon====
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 2
|
||||||
|
Components: ~
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 1
|
||||||
|
Name: Player
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 3
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 2.35245037, y: 0.38365531, z: 7.10571432}
|
||||||
|
Rotate: {x: -0, y: 0, z: -0}
|
||||||
|
Scale: {x: 0.999999881, y: 1, z: 0.999999881}
|
||||||
|
IsActive: true
|
||||||
|
Renderable Component:
|
||||||
|
Mesh: 149697411
|
||||||
|
Material: 126974645
|
||||||
|
IsActive: true
|
||||||
|
RigidBody Component:
|
||||||
|
Type: Dynamic
|
||||||
|
Drag: 0.00999999978
|
||||||
|
Angular Drag: 0.100000001
|
||||||
|
Use Gravity: false
|
||||||
|
Interpolate: false
|
||||||
|
Sleeping Enabled: true
|
||||||
|
Freeze Position X: false
|
||||||
|
Freeze Position Y: true
|
||||||
|
Freeze Position Z: false
|
||||||
|
Freeze Rotation X: true
|
||||||
|
Freeze Rotation Y: true
|
||||||
|
Freeze Rotation Z: true
|
||||||
|
IsActive: true
|
||||||
|
Collider Component:
|
||||||
|
Colliders:
|
||||||
|
- Is Trigger: false
|
||||||
|
Collision Tag: 0
|
||||||
|
Type: Box
|
||||||
|
Half Extents: {x: 0.400000006, y: 0.5, z: 0.300000012}
|
||||||
|
Friction: 0.400000006
|
||||||
|
Bounciness: 0
|
||||||
|
Density: 1
|
||||||
|
Position Offset: {x: 0, y: 0.25, z: 0}
|
||||||
|
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||||
|
IsActive: true
|
||||||
|
Scripts:
|
||||||
|
- Type: PlayerController
|
||||||
|
Enabled: true
|
||||||
|
respawnPoint: 239
|
||||||
|
currentState: 0
|
||||||
|
maxMoveVel: 3
|
||||||
|
moveForce: 50
|
||||||
|
sprintMultiplier: 1.5
|
||||||
|
rotationFactorPerFrame: 5
|
||||||
|
maxJumpHeight: 2
|
||||||
|
maxJumpTime: 0.75
|
||||||
|
fallMultipler: 3
|
||||||
|
lightMultiper: 0.899999976
|
||||||
|
mediumMultiper: 0.699999988
|
||||||
|
heavyMultiper: 0.5
|
||||||
|
- Type: PickAndThrow
|
||||||
|
Enabled: true
|
||||||
|
throwForce: [10, 8, 10]
|
||||||
|
cameraArmOffSet: [0.25, 0.600000024, 0.200000003]
|
||||||
|
delayTimer: 1
|
||||||
|
aimingLength: 1
|
||||||
|
throwItem: false
|
||||||
|
rayDistance: 0.75
|
||||||
|
rayHeight: 0.100000001
|
||||||
|
- EID: 2
|
||||||
|
Name: HoldingPoint
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 0, y: 0.899999976, z: 0.200000286}
|
||||||
|
Rotate: {x: 0, y: 0, z: -0}
|
||||||
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 3
|
||||||
|
Name: PlayerCamera
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 0, y: -5.96046448e-08, z: 0}
|
||||||
|
Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08}
|
||||||
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
Camera Component:
|
||||||
|
Position: {x: 2.12735963, y: 0.362327784, z: 7.98933029}
|
||||||
|
Pitch: 0
|
||||||
|
Yaw: 360
|
||||||
|
Roll: 1.28065994e-06
|
||||||
|
Width: 2560
|
||||||
|
Near: 0.00999999978
|
||||||
|
Far: 10000
|
||||||
|
Perspective: true
|
||||||
|
FOV: 45
|
||||||
|
IsActive: true
|
||||||
|
Camera Arm Component:
|
||||||
|
Arm Pitch: 0
|
||||||
|
Arm Yaw: 0
|
||||||
|
Arm Length: 3
|
||||||
|
Look At Camera Origin: true
|
||||||
|
Target Offset: {x: 0, y: 0.75, z: 0}
|
||||||
|
Camera Collision: true
|
||||||
|
IsActive: true
|
||||||
|
Scripts:
|
||||||
|
- Type: SHADE_Scripting.ThirdPersonCamera
|
||||||
|
Enabled: true
|
||||||
|
armLength: 3
|
||||||
|
turnSpeedPitch: 0.200000003
|
||||||
|
turnSpeedYaw: 0.400000006
|
||||||
|
pitchClamp: 45
|
||||||
|
inverseXControls: false
|
||||||
|
inverseYControls: false
|
||||||
|
lowerClamp: 5
|
||||||
|
- EID: 4
|
||||||
|
Name: PlayerBag
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07}
|
||||||
|
Rotate: {x: 0, y: 0, z: -0}
|
||||||
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
Renderable Component:
|
||||||
|
Mesh: 144838771
|
||||||
|
Material: 123745521
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 5
|
||||||
|
Name: RespawnPoint
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: 2.5, y: 0.660660267, z: 7}
|
||||||
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: ====Raccoon====
|
||||||
|
ID: 117058283
|
||||||
|
Type: 6
|
|
@ -8540,6 +8540,7 @@
|
||||||
currCategory: 1
|
currCategory: 1
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 157
|
- EID: 157
|
||||||
Name: Mesh_Meat
|
Name: Mesh_Meat
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8587,6 +8588,7 @@
|
||||||
currCategory: 1
|
currCategory: 1
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 156
|
- EID: 156
|
||||||
Name: Mesh_Meat
|
Name: Mesh_Meat
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8599,7 +8601,7 @@
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
Mesh: 136892700
|
Mesh: 136892700
|
||||||
Material: 131956078
|
Material: 122370915
|
||||||
IsActive: true
|
IsActive: true
|
||||||
RigidBody Component:
|
RigidBody Component:
|
||||||
Type: Dynamic
|
Type: Dynamic
|
||||||
|
@ -8634,6 +8636,7 @@
|
||||||
currCategory: 1
|
currCategory: 1
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 155
|
- EID: 155
|
||||||
Name: Mesh_Cheese
|
Name: Mesh_Cheese
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8681,6 +8684,7 @@
|
||||||
currCategory: 2
|
currCategory: 2
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 154
|
- EID: 154
|
||||||
Name: Mesh_Cheese
|
Name: Mesh_Cheese
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8728,6 +8732,7 @@
|
||||||
currCategory: 2
|
currCategory: 2
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 153
|
- EID: 153
|
||||||
Name: Mesh_Cheese
|
Name: Mesh_Cheese
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8775,6 +8780,7 @@
|
||||||
currCategory: 2
|
currCategory: 2
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 65778
|
- EID: 65778
|
||||||
Name: Mesh_Apple
|
Name: Mesh_Apple
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8822,6 +8828,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 152
|
- EID: 152
|
||||||
Name: Mesh_Apple
|
Name: Mesh_Apple
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8869,6 +8876,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 151
|
- EID: 151
|
||||||
Name: Mesh_Apple
|
Name: Mesh_Apple
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8916,6 +8924,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 65686
|
- EID: 65686
|
||||||
Name: Watermelon
|
Name: Watermelon
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -8967,6 +8976,7 @@
|
||||||
currCategory: 2
|
currCategory: 2
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 131220
|
- EID: 131220
|
||||||
Name: Piece1
|
Name: Piece1
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9014,6 +9024,7 @@
|
||||||
currCategory: 1
|
currCategory: 1
|
||||||
density: 3
|
density: 3
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 131219
|
- EID: 131219
|
||||||
Name: Piece2
|
Name: Piece2
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9061,6 +9072,7 @@
|
||||||
currCategory: 1
|
currCategory: 1
|
||||||
density: 3
|
density: 3
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 131221
|
- EID: 131221
|
||||||
Name: Piece3
|
Name: Piece3
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9108,6 +9120,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 3
|
density: 3
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 145
|
- EID: 145
|
||||||
Name: Piece4
|
Name: Piece4
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9155,6 +9168,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 3
|
density: 3
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 196754
|
- EID: 196754
|
||||||
Name: Piece5
|
Name: Piece5
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9202,6 +9216,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 3
|
density: 3
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 144
|
- EID: 144
|
||||||
Name: Egg
|
Name: Egg
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9253,6 +9268,7 @@
|
||||||
currCategory: 0
|
currCategory: 0
|
||||||
density: 2
|
density: 2
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 143
|
- EID: 143
|
||||||
Name: Piece1
|
Name: Piece1
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
@ -9575,24 +9591,14 @@
|
||||||
gamePauseText: 11
|
gamePauseText: 11
|
||||||
canvas: 10
|
canvas: 10
|
||||||
- EID: 199
|
- EID: 199
|
||||||
Name: =====Text====
|
Name: Gameplay UI Canvas
|
||||||
IsActive: true
|
IsActive: true
|
||||||
NumberOfChildren: 4
|
NumberOfChildren: 4
|
||||||
Components: ~
|
|
||||||
Scripts: ~
|
|
||||||
- EID: 237
|
|
||||||
Name: Score
|
|
||||||
IsActive: true
|
|
||||||
NumberOfChildren: 0
|
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Canvas Component:
|
||||||
Translate: {x: -800, y: 400, z: 0}
|
Canvas Width: 1920
|
||||||
Rotate: {x: 0, y: 0, z: 0}
|
Canvas Height: 1080
|
||||||
Scale: {x: 60, y: 60, z: 60}
|
Scale by canvas width: false
|
||||||
IsActive: true
|
|
||||||
Text Renderer Component:
|
|
||||||
Text: My name is Brandon.
|
|
||||||
Font: 176667660
|
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 206
|
- EID: 206
|
||||||
|
@ -9609,6 +9615,11 @@
|
||||||
Text: My name is Brandon.
|
Text: My name is Brandon.
|
||||||
Font: 176667660
|
Font: 176667660
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 139
|
- EID: 139
|
||||||
Name: Multiplier
|
Name: Multiplier
|
||||||
|
@ -9624,6 +9635,11 @@
|
||||||
Text: TEST
|
Text: TEST
|
||||||
Font: 176667660
|
Font: 176667660
|
||||||
IsActive: true
|
IsActive: true
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 11
|
- EID: 11
|
||||||
Name: GamePause
|
Name: GamePause
|
||||||
|
@ -9639,6 +9655,51 @@
|
||||||
Text: Game Pause
|
Text: Game Pause
|
||||||
Font: 176667660
|
Font: 176667660
|
||||||
IsActive: false
|
IsActive: false
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 462
|
||||||
|
Name: Score BG
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 1
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: -850, y: 450, z: 0}
|
||||||
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
|
Scale: {x: 400, y: 100, z: 1}
|
||||||
|
IsActive: true
|
||||||
|
Renderable Component:
|
||||||
|
Mesh: 141771688
|
||||||
|
Material: 129340704
|
||||||
|
IsActive: true
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
|
Scripts: ~
|
||||||
|
- EID: 237
|
||||||
|
Name: Score Text
|
||||||
|
IsActive: true
|
||||||
|
NumberOfChildren: 0
|
||||||
|
Components:
|
||||||
|
Transform Component:
|
||||||
|
Translate: {x: -0.050249815, y: -0.300000191, z: 0}
|
||||||
|
Rotate: {x: 0, y: 0, z: 0}
|
||||||
|
Scale: {x: 0.150000006, y: 0.600000024, z: 60}
|
||||||
|
IsActive: true
|
||||||
|
Text Renderer Component:
|
||||||
|
Text: My name is Brandon.
|
||||||
|
Font: 176667660
|
||||||
|
IsActive: true
|
||||||
|
UI Component:
|
||||||
|
Canvas ID: 199
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 198
|
- EID: 198
|
||||||
Name: ====Raccoon====
|
Name: ====Raccoon====
|
||||||
|
@ -9653,7 +9714,7 @@
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 2.35245037, y: 0.38365531, z: 7.10571432}
|
Translate: {x: 2.35245037, y: 0.38365531, z: 7.10571432}
|
||||||
Rotate: {x: -0, y: 0, z: -0}
|
Rotate: {x: 0, y: 0.326376587, z: 0.0698131472}
|
||||||
Scale: {x: 0.999999881, y: 1, z: 0.999999881}
|
Scale: {x: 0.999999881, y: 1, z: 0.999999881}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
|
@ -9731,7 +9792,7 @@
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 0, y: -5.96046448e-08, z: 0}
|
Translate: {x: 0, y: -5.96046448e-08, z: 0}
|
||||||
Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08}
|
Rotate: {x: 0, y: 5.95680904, z: -0.0698131248}
|
||||||
Scale: {x: 1, y: 1, z: 1}
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Camera Component:
|
Camera Component:
|
||||||
|
@ -9739,8 +9800,7 @@
|
||||||
Pitch: 0
|
Pitch: 0
|
||||||
Yaw: 360
|
Yaw: 360
|
||||||
Roll: 1.28065994e-06
|
Roll: 1.28065994e-06
|
||||||
Width: 2560
|
Width: 1055
|
||||||
Height: 1369
|
|
||||||
Near: 0.00999999978
|
Near: 0.00999999978
|
||||||
Far: 10000
|
Far: 10000
|
||||||
Perspective: true
|
Perspective: true
|
||||||
|
@ -10512,14 +10572,14 @@
|
||||||
NumberOfChildren: 0
|
NumberOfChildren: 0
|
||||||
Components:
|
Components:
|
||||||
Transform Component:
|
Transform Component:
|
||||||
Translate: {x: 2.70000005, y: 0.100000001, z: -2}
|
Translate: {x: 0, y: 0, z: -2.64324665}
|
||||||
Rotate: {x: -0, y: 0, z: -0}
|
Rotate: {x: -0, y: 0, z: -0}
|
||||||
Scale: {x: 1, y: 1, z: 1}
|
Scale: {x: 1, y: 1, z: 1}
|
||||||
IsActive: false
|
IsActive: true
|
||||||
Renderable Component:
|
Renderable Component:
|
||||||
Mesh: 140697366
|
Mesh: 140697366
|
||||||
Material: 129495479
|
Material: 129495479
|
||||||
IsActive: false
|
IsActive: true
|
||||||
RigidBody Component:
|
RigidBody Component:
|
||||||
Type: Dynamic
|
Type: Dynamic
|
||||||
Drag: 0.00999999978
|
Drag: 0.00999999978
|
||||||
|
@ -10533,7 +10593,7 @@
|
||||||
Freeze Rotation X: true
|
Freeze Rotation X: true
|
||||||
Freeze Rotation Y: false
|
Freeze Rotation Y: false
|
||||||
Freeze Rotation Z: true
|
Freeze Rotation Z: true
|
||||||
IsActive: false
|
IsActive: true
|
||||||
Collider Component:
|
Collider Component:
|
||||||
Colliders:
|
Colliders:
|
||||||
- Is Trigger: false
|
- Is Trigger: false
|
||||||
|
@ -10545,7 +10605,7 @@
|
||||||
Density: 1
|
Density: 1
|
||||||
Position Offset: {x: 0, y: 0.899999976, z: 0}
|
Position Offset: {x: 0, y: 0.899999976, z: 0}
|
||||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||||
IsActive: false
|
IsActive: true
|
||||||
Scripts:
|
Scripts:
|
||||||
- Type: Homeowner1
|
- Type: Homeowner1
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -10605,6 +10665,7 @@
|
||||||
currCategory: 1
|
currCategory: 1
|
||||||
density: 1
|
density: 1
|
||||||
dontReturn: false
|
dontReturn: false
|
||||||
|
soundDistance: 10
|
||||||
- EID: 16
|
- EID: 16
|
||||||
Name: JumpPad
|
Name: JumpPad
|
||||||
IsActive: false
|
IsActive: false
|
||||||
|
@ -10632,13 +10693,14 @@
|
||||||
Enabled: true
|
Enabled: true
|
||||||
- EID: 10
|
- EID: 10
|
||||||
Name: Canvas
|
Name: Canvas
|
||||||
IsActive: false
|
IsActive: true
|
||||||
NumberOfChildren: 3
|
NumberOfChildren: 3
|
||||||
Components:
|
Components:
|
||||||
Canvas Component:
|
Canvas Component:
|
||||||
Canvas Width: 1920
|
Canvas Width: 1920
|
||||||
Canvas Height: 1080
|
Canvas Height: 1080
|
||||||
IsActive: false
|
Scale by canvas width: false
|
||||||
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 8
|
- EID: 8
|
||||||
Name: ResumeButton
|
Name: ResumeButton
|
||||||
|
@ -10661,6 +10723,8 @@
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 10
|
Canvas ID: 10
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 0
|
- EID: 0
|
||||||
|
@ -10684,6 +10748,8 @@
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 10
|
Canvas ID: 10
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 461
|
- EID: 461
|
||||||
|
@ -10707,5 +10773,7 @@
|
||||||
IsActive: true
|
IsActive: true
|
||||||
UI Component:
|
UI Component:
|
||||||
Canvas ID: 10
|
Canvas ID: 10
|
||||||
|
Hovered: false
|
||||||
|
Clicked: false
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
File diff suppressed because it is too large
Load Diff
|
@ -111,6 +111,7 @@
|
||||||
Near: 0.00999999978
|
Near: 0.00999999978
|
||||||
Far: 10000
|
Far: 10000
|
||||||
Perspective: true
|
Perspective: true
|
||||||
|
FOV: 90
|
||||||
IsActive: true
|
IsActive: true
|
||||||
Scripts: ~
|
Scripts: ~
|
||||||
- EID: 4
|
- EID: 4
|
||||||
|
|
|
@ -74,6 +74,9 @@ public partial class Homeowner1 : BehaviourTree
|
||||||
private float footstepSFXIntervalMultiplier;
|
private float footstepSFXIntervalMultiplier;
|
||||||
|
|
||||||
private float footstepTimeRemaining;
|
private float footstepTimeRemaining;
|
||||||
|
|
||||||
|
//singleton for AI
|
||||||
|
public static Homeowner1 aiInstance { get; private set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//AI tree
|
//AI tree
|
||||||
|
@ -111,6 +114,11 @@ public partial class Homeowner1 : BehaviourTree
|
||||||
AudioHandler.audioClipHandlers["SFXFootstep"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_footsteps");
|
AudioHandler.audioClipHandlers["SFXFootstep"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_footsteps");
|
||||||
AudioHandler.audioClipHandlers["SFXDetectAh"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_detect_raccoon");
|
AudioHandler.audioClipHandlers["SFXDetectAh"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_detect_raccoon");
|
||||||
AudioHandler.audioClipHandlers["SFXDetectSting"] = Audio.CreateAudioClip("event:/Music/stingers/player_detected");
|
AudioHandler.audioClipHandlers["SFXDetectSting"] = Audio.CreateAudioClip("event:/Music/stingers/player_detected");
|
||||||
|
|
||||||
|
if (aiInstance != null && aiInstance != this)
|
||||||
|
RemoveScript<Homeowner1>();
|
||||||
|
else
|
||||||
|
aiInstance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Called every tick
|
//Called every tick
|
||||||
|
@ -182,4 +190,10 @@ public partial class Homeowner1 : BehaviourTree
|
||||||
//Debug.Log("Tree Created");
|
//Debug.Log("Tree Created");
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void onDestroy()
|
||||||
|
{
|
||||||
|
if (aiInstance == this)
|
||||||
|
aiInstance = null;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -22,6 +22,10 @@ public class Item : Script
|
||||||
private Collider collider;
|
private Collider collider;
|
||||||
public float density = 1.0f;
|
public float density = 1.0f;
|
||||||
public bool dontReturn = false;
|
public bool dontReturn = false;
|
||||||
|
|
||||||
|
|
||||||
|
private bool checkSound = false;
|
||||||
|
public float soundDistance = 10;
|
||||||
|
|
||||||
|
|
||||||
protected override void awake()
|
protected override void awake()
|
||||||
|
@ -55,10 +59,25 @@ public class Item : Script
|
||||||
|
|
||||||
returnBack = false;
|
returnBack = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (checkSound)
|
||||||
|
{
|
||||||
|
/* //need to wait for collisionEnter Fix
|
||||||
|
Vector3 itemPos = transform.LocalPosition;
|
||||||
|
Vector3 len = Homeowner1.aiInstance.GetComponent<Transform>().LocalPosition - itemPos;
|
||||||
|
Debug.Log($"distance: {len.GetSqrMagnitude()}");
|
||||||
|
if (len.GetSqrMagnitude() <= soundDistance)
|
||||||
|
{
|
||||||
|
//set ai to alert
|
||||||
|
}
|
||||||
|
checkSound = false;*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void onCollisionEnter(CollisionInfo info)
|
protected override void onCollisionEnter(CollisionInfo info)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!caputurePos)
|
if (!caputurePos)
|
||||||
{
|
{
|
||||||
firstPostion = transform.LocalPosition;
|
firstPostion = transform.LocalPosition;
|
||||||
|
@ -83,6 +102,7 @@ public class Item : Script
|
||||||
protected override void onCollisionExit(CollisionInfo info)
|
protected override void onCollisionExit(CollisionInfo info)
|
||||||
{
|
{
|
||||||
playSound = true;
|
playSound = true;
|
||||||
|
checkSound = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -26,6 +26,7 @@ public class PickAndThrow : Script
|
||||||
private float lastZDir;
|
private float lastZDir;
|
||||||
private bool inRange = false;
|
private bool inRange = false;
|
||||||
public bool throwItem = false;
|
public bool throwItem = false;
|
||||||
|
private Vector3 prevTargetOffSet;
|
||||||
|
|
||||||
[Tooltip("Lenght of ray")]
|
[Tooltip("Lenght of ray")]
|
||||||
public float rayDistance = 1;
|
public float rayDistance = 1;
|
||||||
|
@ -56,8 +57,12 @@ public class PickAndThrow : Script
|
||||||
}
|
}
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
|
if (GameManager.Instance.GamePause)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(timer <= delayTimer)
|
if (timer <= delayTimer)
|
||||||
timer += Time.DeltaTimeF;
|
timer += Time.DeltaTimeF;
|
||||||
|
|
||||||
CalculateDir();
|
CalculateDir();
|
||||||
|
@ -76,6 +81,7 @@ public class PickAndThrow : Script
|
||||||
{
|
{
|
||||||
pc.isAiming = true;
|
pc.isAiming = true;
|
||||||
pc.camArm.ArmLength = aimingLength;
|
pc.camArm.ArmLength = aimingLength;
|
||||||
|
prevTargetOffSet = pc.camArm.TargetOffset;
|
||||||
pc.camArm.TargetOffset = cameraArmOffSet;
|
pc.camArm.TargetOffset = cameraArmOffSet;
|
||||||
pc.cam.FOV = aimingFOV;
|
pc.cam.FOV = aimingFOV;
|
||||||
}
|
}
|
||||||
|
@ -86,7 +92,7 @@ public class PickAndThrow : Script
|
||||||
itemRidigBody.IsGravityEnabled = true;
|
itemRidigBody.IsGravityEnabled = true;
|
||||||
itemCollider.GetCollisionShape(0).IsTrigger = false;
|
itemCollider.GetCollisionShape(0).IsTrigger = false;
|
||||||
pc.isAiming = false;
|
pc.isAiming = false;
|
||||||
pc.camArm.TargetOffset = Vector3.Zero;
|
pc.camArm.TargetOffset = prevTargetOffSet;
|
||||||
pc.cam.FOV = defaultFOV;
|
pc.cam.FOV = defaultFOV;
|
||||||
if (tpc)
|
if (tpc)
|
||||||
pc.camArm.ArmLength = tpc.armLength;
|
pc.camArm.ArmLength = tpc.armLength;
|
||||||
|
@ -109,7 +115,7 @@ public class PickAndThrow : Script
|
||||||
{
|
{
|
||||||
pc.isAiming = false;
|
pc.isAiming = false;
|
||||||
pc.cam.FOV = defaultFOV;
|
pc.cam.FOV = defaultFOV;
|
||||||
pc.camArm.TargetOffset = Vector3.Zero;
|
pc.camArm.TargetOffset = prevTargetOffSet;
|
||||||
if (tpc)
|
if (tpc)
|
||||||
pc.camArm.ArmLength = tpc.armLength;
|
pc.camArm.ArmLength = tpc.armLength;
|
||||||
}
|
}
|
||||||
|
@ -134,6 +140,11 @@ public class PickAndThrow : Script
|
||||||
|
|
||||||
protected override void fixedUpdate()
|
protected override void fixedUpdate()
|
||||||
{
|
{
|
||||||
|
if (GameManager.Instance.GamePause)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (throwItem && itemRidigBody && pc)
|
if (throwItem && itemRidigBody && pc)
|
||||||
{
|
{
|
||||||
if (itemScript)
|
if (itemScript)
|
||||||
|
|
|
@ -124,8 +124,14 @@ public class PlayerController : Script
|
||||||
protected override void lateUpdate()
|
protected override void lateUpdate()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
|
if (GameManager.Instance.GamePause)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (delayTimer <= 1)
|
if (delayTimer <= 1)
|
||||||
delayTimer += Time.DeltaTimeF;
|
delayTimer += Time.DeltaTimeF;
|
||||||
|
|
||||||
|
@ -158,22 +164,27 @@ public class PlayerController : Script
|
||||||
if (tranform)
|
if (tranform)
|
||||||
tranform.LocalEulerAngles = new Vector3(0.0f, tranform.LocalEulerAngles.y, 0.0f);
|
tranform.LocalEulerAngles = new Vector3(0.0f, tranform.LocalEulerAngles.y, 0.0f);
|
||||||
|
|
||||||
|
GotCaught();
|
||||||
Rotation();
|
Rotation();
|
||||||
MoveKey();
|
MoveKey();
|
||||||
Sprint();
|
Sprint();
|
||||||
Jump();
|
Jump();
|
||||||
GotCaught();
|
|
||||||
//Debug.Log($"{currentState}");
|
//Debug.Log($"{currentState}");
|
||||||
//Debug.Log($" axisX: {axisMove.x} axisY:{axisMove.y}");
|
//Debug.Log($" axisX: {axisMove.x} axisY:{axisMove.y}");
|
||||||
//Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}");
|
//Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}");
|
||||||
//Debug.Log(currentState.ToString() + " x:" + rb.LinearVelocity.x.ToString() + " y:" + rb.LinearVelocity.y.ToString() + " z:" + rb.LinearVelocity.z.ToString());
|
//Debug.Log(currentState.ToString() + " x:" + rb.LinearVelocity.x.ToString() + " y:" + rb.LinearVelocity.y.ToString() + " z:" + rb.LinearVelocity.z.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void fixedUpdate()
|
protected override void fixedUpdate()
|
||||||
{
|
{
|
||||||
|
if (GameManager.Instance.GamePause)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Move();
|
Move();
|
||||||
Gravity();
|
Gravity();
|
||||||
//Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,7 +245,7 @@ public class PlayerController : Script
|
||||||
|
|
||||||
private void Move()
|
private void Move()
|
||||||
{
|
{
|
||||||
if (rb != null)
|
if (rb != null && currentState != RaccoonStates.CAUGHT)
|
||||||
{
|
{
|
||||||
rb.LinearVelocity += new Vector3(axisMove.x * moveForce, 0.0f, axisMove.y * moveForce) * Time.DeltaTimeF;
|
rb.LinearVelocity += new Vector3(axisMove.x * moveForce, 0.0f, axisMove.y * moveForce) * Time.DeltaTimeF;
|
||||||
|
|
||||||
|
@ -286,7 +297,6 @@ public class PlayerController : Script
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//press and hold jump
|
|
||||||
private void Jump()
|
private void Jump()
|
||||||
{
|
{
|
||||||
if (currentState == RaccoonStates.WALKING || currentState == RaccoonStates.RUNNING || currentState == RaccoonStates.IDLE)
|
if (currentState == RaccoonStates.WALKING || currentState == RaccoonStates.RUNNING || currentState == RaccoonStates.IDLE)
|
||||||
|
|
|
@ -41,6 +41,11 @@ namespace SHADE_Scripting
|
||||||
|
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
|
if (GameManager.Instance.GamePause)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CameraArm arm = GetComponent<CameraArm>();
|
CameraArm arm = GetComponent<CameraArm>();
|
||||||
if (arm)
|
if (arm)
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,13 +38,11 @@ public class GameManager : Script
|
||||||
private Vector3 fontScalar;
|
private Vector3 fontScalar;
|
||||||
|
|
||||||
public static GameManager Instance { get; private set; }
|
public static GameManager Instance { get; private set; }
|
||||||
//public static int highScore { get; private set; } maybe need
|
|
||||||
|
|
||||||
public bool GamePause { get; set; }
|
public bool GamePause { get; set; }
|
||||||
|
|
||||||
protected override void start()
|
protected override void start()
|
||||||
{
|
{
|
||||||
base.start();
|
|
||||||
|
|
||||||
AudioHandler.audioClipHandlers["BGMAdaptive"] = Audio.CreateAudioClip("event:/Music/bgm_adaptive");
|
AudioHandler.audioClipHandlers["BGMAdaptive"] = Audio.CreateAudioClip("event:/Music/bgm_adaptive");
|
||||||
AudioHandler.audioClipHandlers["BGMAdaptive"].Play();
|
AudioHandler.audioClipHandlers["BGMAdaptive"].Play();
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_JumpPad
|
||||||
|
ID: 163951275
|
||||||
|
Type: 9
|
|
@ -0,0 +1,96 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum EASING_METHOD
|
||||||
|
{
|
||||||
|
EASE_IN_SINE,
|
||||||
|
EASE_OUT_SINE,
|
||||||
|
EASE_OUT_BOUNCE,
|
||||||
|
EASE_IN_BOUNCE,
|
||||||
|
EASE_INOUT_BOUNCE
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class EasingHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
public static float EaseHelp(float value, EASING_METHOD method)
|
||||||
|
{
|
||||||
|
switch (method)
|
||||||
|
{
|
||||||
|
case EASING_METHOD.EASE_IN_SINE:
|
||||||
|
{
|
||||||
|
return EaseInSine(value);
|
||||||
|
}break;
|
||||||
|
case EASING_METHOD.EASE_OUT_SINE:
|
||||||
|
{
|
||||||
|
return EaseOutSine(value);
|
||||||
|
}break;
|
||||||
|
case EASING_METHOD.EASE_OUT_BOUNCE:
|
||||||
|
{
|
||||||
|
return EaseOutBounce(value);
|
||||||
|
}break;
|
||||||
|
case EASING_METHOD.EASE_IN_BOUNCE:
|
||||||
|
{
|
||||||
|
return EaseInBounce(value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EASING_METHOD.EASE_INOUT_BOUNCE:
|
||||||
|
{
|
||||||
|
return EaseInOutBounce(value);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float EaseInSine(float value)
|
||||||
|
{
|
||||||
|
return (float)(1.0f - Math.Cos((value * Math.PI) / 2.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float EaseOutSine(float value)
|
||||||
|
{
|
||||||
|
return (float)(1.0f - Math.Sin(value * Math.PI) / 2.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static float EaseOutBounce(float value)
|
||||||
|
{
|
||||||
|
const float n1 = 7.5625f;
|
||||||
|
const float d1 = 2.75f;
|
||||||
|
if (value < 1.0f / d1)
|
||||||
|
{
|
||||||
|
return n1 * value * value;
|
||||||
|
} else if (value < 2.0f / d1)
|
||||||
|
{
|
||||||
|
return n1 * (value -= 2.25f / d1) * value + 0.9375f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return n1 * (value -= 2.625f / d1) * value + 0.984375f;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static float EaseInBounce(float value)
|
||||||
|
{
|
||||||
|
return 1 - EaseOutBounce(1 - value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static float EaseInOutBounce(float value)
|
||||||
|
{
|
||||||
|
return (value < 0.5f)
|
||||||
|
?(1.0f - EaseOutBounce(1.0f - 2.0f * value)) / 2.0f
|
||||||
|
: (1.0f + EaseOutBounce(2.0f * value - 1.0f)) / 2.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: EasingHelper
|
||||||
|
ID: 161000975
|
||||||
|
Type: 9
|
|
@ -0,0 +1,123 @@
|
||||||
|
using SHADE;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
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";
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
private AudioClipHandler onHoverEnterACHandler;
|
||||||
|
[NonSerialized]
|
||||||
|
private AudioClipHandler onHoverExitACHandler;
|
||||||
|
[NonSerialized]
|
||||||
|
private AudioClipHandler onClickACHandler;
|
||||||
|
[NonSerialized]
|
||||||
|
private AudioClipHandler onReleaseACHandler;
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
private Vector3 defaultScale;
|
||||||
|
|
||||||
|
public float hoverScale = 1.1f;
|
||||||
|
public float clickScale = 0.9f;
|
||||||
|
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
private TweenThread thread;
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
private bool tweening = false;
|
||||||
|
[NonSerialized]
|
||||||
|
private float currentScale = 1.0f;
|
||||||
|
|
||||||
|
protected override void awake()
|
||||||
|
{
|
||||||
|
onHoverEnterACHandler = SHADE.Audio.CreateAudioClip(onHoverEnterSound);
|
||||||
|
onHoverExitACHandler = SHADE.Audio.CreateAudioClip(onHoverExitSound);
|
||||||
|
onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound);
|
||||||
|
onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void start()
|
||||||
|
{
|
||||||
|
thread = TweenManager.CreateTweenThread(0.1f, 0.9f, 1.0f, EASING_METHOD.EASE_IN_SINE);
|
||||||
|
|
||||||
|
|
||||||
|
Transform transform = GetComponent<Transform>();
|
||||||
|
if (transform == null)
|
||||||
|
return;
|
||||||
|
defaultScale = transform.LocalScale;
|
||||||
|
|
||||||
|
|
||||||
|
UIElement ui = GetComponent<UIElement>();
|
||||||
|
if (ui == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
ui.OnClick.RegisterAction(() =>
|
||||||
|
{
|
||||||
|
if (onClickSound != "")
|
||||||
|
onClickACHandler.Play();
|
||||||
|
tweening = true;
|
||||||
|
if(thread != null)
|
||||||
|
thread.Reset(currentScale,clickScale);
|
||||||
|
});
|
||||||
|
|
||||||
|
ui.OnRelease.RegisterAction(() =>
|
||||||
|
{
|
||||||
|
if (onReleaseSound != "")
|
||||||
|
onReleaseACHandler.Play();
|
||||||
|
tweening = true;
|
||||||
|
if (thread != null)
|
||||||
|
thread.Reset(currentScale, 1.0f);
|
||||||
|
});
|
||||||
|
|
||||||
|
ui.OnHoverEnter.RegisterAction(() =>
|
||||||
|
{
|
||||||
|
if (onHoverEnterSound != "")
|
||||||
|
onHoverEnterACHandler.Play();
|
||||||
|
tweening = true;
|
||||||
|
if (thread != null)
|
||||||
|
thread.Reset(currentScale, hoverScale);
|
||||||
|
});
|
||||||
|
|
||||||
|
ui.OnHoverExit.RegisterAction(() =>
|
||||||
|
{
|
||||||
|
if (onHoverExitSound != "")
|
||||||
|
onHoverExitACHandler.Play();
|
||||||
|
tweening = true;
|
||||||
|
if (thread != null)
|
||||||
|
thread.Reset(currentScale, 1.0f);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void update()
|
||||||
|
{
|
||||||
|
Transform transform = GetComponent<Transform>();
|
||||||
|
if (transform == null)
|
||||||
|
return;
|
||||||
|
if (tweening == true && thread != null)
|
||||||
|
{
|
||||||
|
Debug.Log("Tweening value " + thread.GetValue());
|
||||||
|
transform.LocalScale = defaultScale * thread.GetValue();
|
||||||
|
currentScale = thread.GetValue();
|
||||||
|
if (thread.IsCompleted())
|
||||||
|
tweening = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_ButtonFX
|
||||||
|
ID: 163796084
|
||||||
|
Type: 9
|
|
@ -0,0 +1,42 @@
|
||||||
|
using SHADE;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
public class ChangeCanvasButton:Script
|
||||||
|
{
|
||||||
|
|
||||||
|
public GameObject canvasToActivate;
|
||||||
|
|
||||||
|
protected override void awake()
|
||||||
|
{
|
||||||
|
//if (canvasToActivate.GetComponent<Canvas>() == null)
|
||||||
|
// return;
|
||||||
|
UIElement ui = GetComponent<UIElement>();
|
||||||
|
ui.OnRelease.RegisterAction(() =>
|
||||||
|
{
|
||||||
|
Canvas.DeactivateAllCanvas();
|
||||||
|
|
||||||
|
canvasToActivate.SetActive(true);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void start()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_ChangeCanvasButton
|
||||||
|
ID: 154633292
|
||||||
|
Type: 9
|
|
@ -11,8 +11,9 @@ public class ChangeSceneButton : Script
|
||||||
UIElement ui = GetComponent<UIElement>();
|
UIElement ui = GetComponent<UIElement>();
|
||||||
if (ui != null)
|
if (ui != null)
|
||||||
{
|
{
|
||||||
ui.OnClick.RegisterAction(() =>
|
ui.OnRelease.RegisterAction(() =>
|
||||||
{
|
{
|
||||||
|
|
||||||
if (sceneID != 0)
|
if (sceneID != 0)
|
||||||
{
|
{
|
||||||
Audio.PlaySFXOnce2D("event:/UI/success");
|
Audio.PlaySFXOnce2D("event:/UI/success");
|
||||||
|
@ -24,6 +25,7 @@ public class ChangeSceneButton : Script
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.LogError("Failed to register button action for ChangeSceneButton.");
|
Debug.LogError("Failed to register button action for ChangeSceneButton.");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override void update()
|
protected override void update()
|
||||||
|
|
|
@ -5,6 +5,10 @@ using SHADE_Scripting.Audio;
|
||||||
public class MainMenu : Script
|
public class MainMenu : Script
|
||||||
{
|
{
|
||||||
public uint sceneID;
|
public uint sceneID;
|
||||||
|
|
||||||
|
public GameObject obj;
|
||||||
|
private Renderable renderable;
|
||||||
|
|
||||||
protected override void awake()
|
protected override void awake()
|
||||||
{
|
{
|
||||||
AudioHandler.audioClipHandlers["BGMMainMenu"] = Audio.CreateAudioClip("event:/Music/main_menu");
|
AudioHandler.audioClipHandlers["BGMMainMenu"] = Audio.CreateAudioClip("event:/Music/main_menu");
|
||||||
|
@ -12,9 +16,31 @@ public class MainMenu : Script
|
||||||
AudioHandler.audioClipHandlers["SFXUISuccess"] = Audio.CreateAudioClip("event:/UI/success");
|
AudioHandler.audioClipHandlers["SFXUISuccess"] = Audio.CreateAudioClip("event:/UI/success");
|
||||||
//Audio.PlayBGMOnce2D("event:/Music/main_menu");
|
//Audio.PlayBGMOnce2D("event:/Music/main_menu");
|
||||||
AudioHandler.audioClipHandlers["BGMMainMenu"].Play();
|
AudioHandler.audioClipHandlers["BGMMainMenu"].Play();
|
||||||
|
|
||||||
|
renderable = obj.GetComponent<Renderable>();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void start()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
|
if (Input.GetKeyDown(Input.KeyCode.K) && obj)
|
||||||
|
{
|
||||||
|
if (renderable.Material.GetProperty<float>("data.alpha") == 1)
|
||||||
|
{
|
||||||
|
Debug.Log("ALPHA ZERO");
|
||||||
|
Debug.Log($"{obj.EntityId}");
|
||||||
|
obj.GetComponent<Renderable>().Material.SetProperty<float>("data.alpha", 0);
|
||||||
|
}
|
||||||
|
else if (renderable.Material.GetProperty<float>("data.alpha") == 0)
|
||||||
|
{
|
||||||
|
Debug.Log("ALPHA ONE");
|
||||||
|
Debug.Log($"{obj.EntityId}");
|
||||||
|
obj.GetComponent<Renderable>().Material.SetProperty<float>("data.alpha", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Input.GetKeyDown(Input.KeyCode.Space))
|
if (Input.GetKeyDown(Input.KeyCode.Space))
|
||||||
{
|
{
|
||||||
//Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
|
//Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
using SHADE;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
public class MultiImageList:Script
|
||||||
|
{
|
||||||
|
public List<MaterialAsset> imageAssetList = new List<MaterialAsset>();
|
||||||
|
[NonSerialized]
|
||||||
|
private int index = 0;
|
||||||
|
|
||||||
|
|
||||||
|
protected override void awake()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NextImage()
|
||||||
|
{
|
||||||
|
++index;
|
||||||
|
if(index >= imageAssetList.Count())
|
||||||
|
{
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Renderable rend = GetComponent<Renderable>();
|
||||||
|
rend.SetMaterial(imageAssetList[index]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrevImage()
|
||||||
|
{
|
||||||
|
if (index == 0)
|
||||||
|
index = imageAssetList.Count();
|
||||||
|
--index;
|
||||||
|
|
||||||
|
Renderable rend = GetComponent<Renderable>();
|
||||||
|
rend.SetMaterial(imageAssetList[index]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_MultiImageList
|
||||||
|
ID: 166320642
|
||||||
|
Type: 9
|
|
@ -0,0 +1,40 @@
|
||||||
|
using SHADE;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
public class MultiImageListControlButton: Script
|
||||||
|
{
|
||||||
|
public bool isNext = true;
|
||||||
|
public GameObject multiImageList;
|
||||||
|
|
||||||
|
protected override void awake()
|
||||||
|
{
|
||||||
|
|
||||||
|
UIElement ui = GetComponent<UIElement>();
|
||||||
|
if (ui != null)
|
||||||
|
{
|
||||||
|
ui.OnRelease.RegisterAction(() =>
|
||||||
|
{
|
||||||
|
|
||||||
|
MultiImageList imageList = multiImageList.GetScript<MultiImageList>();
|
||||||
|
if(imageList != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (isNext)
|
||||||
|
imageList.NextImage();
|
||||||
|
else
|
||||||
|
imageList.PrevImage();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_MultiImageListControlButton
|
||||||
|
ID: 164209885
|
||||||
|
Type: 9
|
|
@ -59,8 +59,7 @@ public class PauseMenu : Script
|
||||||
retry.OnClick.RegisterAction(() =>
|
retry.OnClick.RegisterAction(() =>
|
||||||
{
|
{
|
||||||
Audio.StopAllSounds();
|
Audio.StopAllSounds();
|
||||||
//get curr scene
|
SceneManager.RestartScene();
|
||||||
//SceneManager.ChangeScene();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -86,10 +85,6 @@ public class PauseMenu : Script
|
||||||
|
|
||||||
protected override void update()
|
protected override void update()
|
||||||
{
|
{
|
||||||
if (GameManager.Instance.GamePause)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause)
|
if (Input.GetKeyDown(Input.KeyCode.Escape) && !GameManager.Instance.GamePause)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
using SHADE;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
public class ScaleBounce:Script
|
||||||
|
{
|
||||||
|
[NonSerialized]
|
||||||
|
private TweenThread thread;
|
||||||
|
|
||||||
|
public float minScale = 1.0f;
|
||||||
|
public float maxScale = 1.2f;
|
||||||
|
public float duration = 1.0f;
|
||||||
|
|
||||||
|
private Vector3 defaultScale;
|
||||||
|
|
||||||
|
|
||||||
|
protected override void start()
|
||||||
|
{
|
||||||
|
thread = TweenManager.CreateTweenThread(duration, minScale, maxScale, EASING_METHOD.EASE_IN_SINE);
|
||||||
|
Transform trans = GetComponent<Transform>();
|
||||||
|
if(trans != null)
|
||||||
|
{
|
||||||
|
defaultScale = trans.LocalScale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void update()
|
||||||
|
{
|
||||||
|
Transform trans = GetComponent<Transform>();
|
||||||
|
if(trans != null)
|
||||||
|
{
|
||||||
|
trans.LocalScale = defaultScale * thread.GetValue();
|
||||||
|
}
|
||||||
|
if(thread.IsCompleted())
|
||||||
|
{
|
||||||
|
thread.ResetInvert();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_ScaleBounce
|
||||||
|
ID: 152015842
|
||||||
|
Type: 9
|
|
@ -0,0 +1,31 @@
|
||||||
|
using SHADE;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
public class SliderText:Script
|
||||||
|
{
|
||||||
|
public GameObject sliderObj;
|
||||||
|
|
||||||
|
public int minValue = 0;
|
||||||
|
public int maxValue = 0;
|
||||||
|
|
||||||
|
|
||||||
|
protected override void update()
|
||||||
|
{
|
||||||
|
Slider slider = sliderObj.GetComponent<Slider>();
|
||||||
|
TextRenderable text = GetComponent<TextRenderable>();
|
||||||
|
if(slider != null && text != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_SliderText
|
||||||
|
ID: 158412308
|
||||||
|
Type: 9
|
|
@ -0,0 +1,120 @@
|
||||||
|
using SHADE;
|
||||||
|
using SHADE_Scripting.Audio;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SHADE_Scripting.UI
|
||||||
|
{
|
||||||
|
|
||||||
|
public class TweenThread
|
||||||
|
{
|
||||||
|
private float timer = 0.0f;
|
||||||
|
public float duration = 1.0f;
|
||||||
|
public EASING_METHOD method;
|
||||||
|
private float value = 0.0f;
|
||||||
|
public float startValue = 0.0f;
|
||||||
|
public float endValue = 1.0f;
|
||||||
|
|
||||||
|
|
||||||
|
public TweenThread(float duration, float startValue, float endValue, EASING_METHOD method)
|
||||||
|
{
|
||||||
|
this.duration = duration;
|
||||||
|
this.method = method;
|
||||||
|
this.startValue = startValue;
|
||||||
|
this.endValue = endValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(float deltaTime)
|
||||||
|
{
|
||||||
|
if (timer > duration)
|
||||||
|
return;
|
||||||
|
timer += deltaTime;
|
||||||
|
if (timer > duration)
|
||||||
|
timer = duration;
|
||||||
|
|
||||||
|
value = EasingHelper.EaseHelp(timer/duration, method) * (endValue - startValue) + startValue ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsCompleted()
|
||||||
|
{
|
||||||
|
return timer >= duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
timer = 0.0f;
|
||||||
|
value = startValue;
|
||||||
|
}
|
||||||
|
public void Reset(float startValue, float endValue)
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
this.startValue = startValue;
|
||||||
|
this.endValue = endValue;
|
||||||
|
}
|
||||||
|
public void ResetInvert()
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
float temp = startValue;
|
||||||
|
startValue = endValue;
|
||||||
|
endValue = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public float GetValue()
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TweenManager : Script
|
||||||
|
{
|
||||||
|
public static TweenManager Instance { get; private set; }
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
private List<TweenThread> threadList;
|
||||||
|
|
||||||
|
protected override void awake()
|
||||||
|
{
|
||||||
|
if (Instance != null && Instance != this)
|
||||||
|
RemoveScript<TweenManager>();
|
||||||
|
else
|
||||||
|
Instance = this;
|
||||||
|
|
||||||
|
threadList = new List<TweenThread>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void onDestroy()
|
||||||
|
{
|
||||||
|
if (Instance == this)
|
||||||
|
Instance = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void update()
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach (TweenThread thread in threadList)
|
||||||
|
{
|
||||||
|
thread.Update(Time.DeltaTimeF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static TweenThread CreateTweenThread(float duration, float startValue, float endValue, EASING_METHOD method)
|
||||||
|
{
|
||||||
|
if (Instance == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
|
||||||
|
TweenThread thread = new TweenThread(duration, startValue, endValue, method);
|
||||||
|
Instance.threadList.Add(thread);
|
||||||
|
thread.Reset();
|
||||||
|
return thread;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
Name: SC_TweenManager
|
||||||
|
ID: 164072799
|
||||||
|
Type: 9
|
|
@ -26,6 +26,7 @@ layout(set = 3, binding = 3, r32ui) uniform uimage2D lightLayerData;
|
||||||
layout(set = 3, binding = 4, r8) uniform image2D ssaoBlurredImage;
|
layout(set = 3, binding = 4, r8) uniform image2D ssaoBlurredImage;
|
||||||
layout(set = 3, binding = 5, rgba8) uniform image2D positionWorldSpace;
|
layout(set = 3, binding = 5, rgba8) uniform image2D positionWorldSpace;
|
||||||
layout(set = 3, binding = 6, rgba8) uniform image2D targetImage;
|
layout(set = 3, binding = 6, rgba8) uniform image2D targetImage;
|
||||||
|
layout(set = 3, binding = 7, rgba8) uniform image2D objectVFXImage;
|
||||||
|
|
||||||
layout (set = 4, binding = 0) uniform sampler2D shadowMaps[]; // for textures (global)
|
layout (set = 4, binding = 0) uniform sampler2D shadowMaps[]; // for textures (global)
|
||||||
|
|
||||||
|
@ -141,6 +142,9 @@ void main()
|
||||||
float ssaoVal = imageLoad (ssaoBlurredImage, globalThread).r;
|
float ssaoVal = imageLoad (ssaoBlurredImage, globalThread).r;
|
||||||
fragColor *= ssaoVal;
|
fragColor *= ssaoVal;
|
||||||
|
|
||||||
|
vec4 objectVFXColor = imageLoad (objectVFXImage, globalThread);
|
||||||
|
fragColor += objectVFXColor.rgb * objectVFXColor.a;
|
||||||
|
|
||||||
// store result into result image
|
// store result into result image
|
||||||
imageStore(targetImage, ivec2(gl_GlobalInvocationID.xy), vec4(fragColor.rgb, 1.0f));
|
imageStore(targetImage, ivec2(gl_GlobalInvocationID.xy), vec4(fragColor.rgb, 1.0f));
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,97 @@
|
||||||
|
#version 450
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
#extension GL_ARB_shading_language_420pack : enable
|
||||||
|
#extension GL_EXT_nonuniform_qualifier : require
|
||||||
|
|
||||||
|
struct MatPropData
|
||||||
|
{
|
||||||
|
int textureIndex;
|
||||||
|
float highlightPosition;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GenericData
|
||||||
|
{
|
||||||
|
//! Delta time
|
||||||
|
float dt;
|
||||||
|
|
||||||
|
//! Elapsed time of the application
|
||||||
|
float elapsedTime;
|
||||||
|
|
||||||
|
//! Viewport width of the scene (excluding imgui, that means smaller than window)
|
||||||
|
uint viewportWidth;
|
||||||
|
|
||||||
|
//! Ditto but for height
|
||||||
|
uint viewportHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
layout(location = 0) in struct
|
||||||
|
{
|
||||||
|
vec4 vertPos; // location 0
|
||||||
|
vec2 uv; // location = 1
|
||||||
|
vec4 normal; // location = 2
|
||||||
|
vec4 worldPos; // location = 3
|
||||||
|
} In;
|
||||||
|
|
||||||
|
// material stuff
|
||||||
|
layout(location = 4) flat in struct
|
||||||
|
{
|
||||||
|
int materialIndex;
|
||||||
|
uint eid;
|
||||||
|
uint lightLayerIndex;
|
||||||
|
vec3 screenSpacePos;
|
||||||
|
|
||||||
|
} In2;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 0) uniform GenericDataBuffer
|
||||||
|
{
|
||||||
|
GenericData data;
|
||||||
|
} genericDataBuffer;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global)
|
||||||
|
layout (std430, set = 2, binding = 0) buffer MaterialProperties // For materials
|
||||||
|
{
|
||||||
|
MatPropData data[];
|
||||||
|
} MatProp;
|
||||||
|
|
||||||
|
layout(location = 0) out vec4 position;
|
||||||
|
layout(location = 1) out uint outEntityID;
|
||||||
|
layout(location = 2) out uint lightLayerIndices;
|
||||||
|
layout(location = 3) out vec4 normals;
|
||||||
|
layout(location = 4) out vec4 albedo;
|
||||||
|
layout(location = 5) out vec4 worldSpacePosition;
|
||||||
|
layout(location = 6) out vec4 objectVFX;
|
||||||
|
|
||||||
|
float map (float value, float srcLow, float srcHigh, float dstLow, float dstHigh)
|
||||||
|
{
|
||||||
|
return dstLow + (value - srcLow) * (dstHigh - dstLow) / (srcHigh - srcLow);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
position = In.vertPos;
|
||||||
|
normals = In.normal;
|
||||||
|
albedo = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
|
||||||
|
worldSpacePosition = In.worldPos;
|
||||||
|
|
||||||
|
outEntityID = In2.eid;
|
||||||
|
lightLayerIndices = In2.lightLayerIndex;
|
||||||
|
|
||||||
|
float vpHeight = (float (In2.screenSpacePos.y) - (genericDataBuffer.data.elapsedTime * 4000.0f * (1.0f - In2.screenSpacePos.z)));
|
||||||
|
vpHeight = float (int (vpHeight) % genericDataBuffer.data.viewportHeight);
|
||||||
|
float scanlineScale = 2500.0f * (1.0f - In2.screenSpacePos.z);
|
||||||
|
|
||||||
|
float lowerLimit = vpHeight - scanlineScale;
|
||||||
|
float upperLimit = vpHeight + scanlineScale;
|
||||||
|
if (gl_FragCoord.y > lowerLimit && gl_FragCoord.y < upperLimit)
|
||||||
|
{
|
||||||
|
float opacity = 0.0f;
|
||||||
|
opacity = map (abs (gl_FragCoord.y - vpHeight), 0.0f, upperLimit - vpHeight, 0.0f, 1.0f);
|
||||||
|
opacity = 1.0f - clamp (opacity, 0.0f, 1.0f);
|
||||||
|
|
||||||
|
|
||||||
|
objectVFX = vec4(opacity);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
objectVFX = vec4(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: ShinyHighlight_FS
|
||||||
|
ID: 45685219
|
||||||
|
Type: 2
|
|
@ -0,0 +1,99 @@
|
||||||
|
#version 450
|
||||||
|
#extension GL_KHR_vulkan_glsl : enable
|
||||||
|
|
||||||
|
layout(location = 0) in vec3 aVertexPos;
|
||||||
|
layout(location = 1) in vec2 aUV;
|
||||||
|
layout(location = 2) in vec3 aNormal;
|
||||||
|
layout(location = 3) in vec3 aTangent;
|
||||||
|
layout(location = 4) in mat4 worldTransform;
|
||||||
|
layout(location = 8) in uvec2 integerData;
|
||||||
|
layout(location = 9) in uvec4 aBoneIndices;
|
||||||
|
layout(location = 10) in vec4 aBoneWeights;
|
||||||
|
layout(location = 11) in uint firstBoneIndex;
|
||||||
|
|
||||||
|
layout(location = 0) out struct
|
||||||
|
{
|
||||||
|
vec4 vertPos; // location 0
|
||||||
|
vec2 uv; // location = 1
|
||||||
|
vec4 normal; // location = 2
|
||||||
|
vec4 worldPos; // location = 3
|
||||||
|
|
||||||
|
} Out;
|
||||||
|
|
||||||
|
struct GenericData
|
||||||
|
{
|
||||||
|
//! Delta time
|
||||||
|
float dt;
|
||||||
|
|
||||||
|
//! Elapsed time of the application
|
||||||
|
float elapsedTime;
|
||||||
|
|
||||||
|
//! Viewport width of the scene (excluding imgui, that means smaller than window)
|
||||||
|
uint viewportWidth;
|
||||||
|
|
||||||
|
//! Ditto but for height
|
||||||
|
uint viewportHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
// material stuff
|
||||||
|
layout(location = 4) out struct
|
||||||
|
{
|
||||||
|
int materialIndex;
|
||||||
|
uint eid;
|
||||||
|
uint lightLayerIndex;
|
||||||
|
vec3 screenSpacePos;
|
||||||
|
|
||||||
|
|
||||||
|
} Out2;
|
||||||
|
|
||||||
|
layout(set = 1, binding = 0) uniform CameraData
|
||||||
|
{
|
||||||
|
vec4 position;
|
||||||
|
mat4 vpMat;
|
||||||
|
mat4 viewMat;
|
||||||
|
mat4 projMat;
|
||||||
|
} cameraData;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 0) uniform GenericDataBuffer
|
||||||
|
{
|
||||||
|
GenericData data;
|
||||||
|
} genericDataBuffer;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
Out2.materialIndex = gl_InstanceIndex;
|
||||||
|
Out2.eid = integerData[0];
|
||||||
|
Out2.lightLayerIndex = integerData[1];
|
||||||
|
|
||||||
|
// for transforming gBuffer position and normal data
|
||||||
|
mat4 modelViewMat = cameraData.viewMat * worldTransform;
|
||||||
|
|
||||||
|
// gBuffer position will be in view space
|
||||||
|
Out.vertPos = modelViewMat * vec4(aVertexPos, 1.0f);
|
||||||
|
|
||||||
|
Out.worldPos = worldTransform * vec4 (aVertexPos, 1.0f);
|
||||||
|
|
||||||
|
// uvs for texturing in fragment shader
|
||||||
|
Out.uv = aUV;
|
||||||
|
|
||||||
|
mat3 transposeInv = mat3 (transpose(inverse(modelViewMat)));
|
||||||
|
|
||||||
|
// normals are also in view space
|
||||||
|
Out.normal.rgb = transposeInv * aNormal.rgb;
|
||||||
|
Out.normal.rgb = normalize (Out.normal.rgb);
|
||||||
|
|
||||||
|
// Get center of object in world position
|
||||||
|
vec4 worldPos = vec4(worldTransform[3][0], worldTransform[3][1], worldTransform[3][2], 1.0f);
|
||||||
|
|
||||||
|
// transform to clip space
|
||||||
|
worldPos = cameraData.vpMat * worldPos;
|
||||||
|
worldPos.xyz /= worldPos.w;
|
||||||
|
|
||||||
|
// transform to screen space
|
||||||
|
worldPos.xy = ((worldPos.xy + vec2(1.0f)) * vec2 (0.5f)) * vec2 (genericDataBuffer.data.viewportWidth, genericDataBuffer.data.viewportHeight);
|
||||||
|
|
||||||
|
Out2.screenSpacePos = worldPos.xyz;
|
||||||
|
|
||||||
|
// clip space for rendering
|
||||||
|
gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: ShinyHighlight_VS
|
||||||
|
ID: 37048829
|
||||||
|
Type: 2
|
|
@ -0,0 +1,67 @@
|
||||||
|
#version 450
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
#extension GL_ARB_shading_language_420pack : enable
|
||||||
|
#extension GL_EXT_nonuniform_qualifier : require
|
||||||
|
|
||||||
|
struct MatPropData
|
||||||
|
{
|
||||||
|
vec4 color;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GenericData
|
||||||
|
{
|
||||||
|
//! Delta time
|
||||||
|
float dt;
|
||||||
|
|
||||||
|
//! Elapsed time of the application
|
||||||
|
float elapsedTime;
|
||||||
|
|
||||||
|
//! Viewport width of the scene (excluding imgui, that means smaller than window)
|
||||||
|
uint viewportWidth;
|
||||||
|
|
||||||
|
//! Ditto but for height
|
||||||
|
uint viewportHeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(location = 0) in struct
|
||||||
|
{
|
||||||
|
vec4 vertPos; // location 0
|
||||||
|
vec2 uv; // location = 1
|
||||||
|
vec4 normal; // location = 2
|
||||||
|
vec4 worldPos; // location = 3
|
||||||
|
} In;
|
||||||
|
|
||||||
|
// material stuff
|
||||||
|
layout(location = 4) flat in struct
|
||||||
|
{
|
||||||
|
int materialIndex;
|
||||||
|
uint eid;
|
||||||
|
uint lightLayerIndex;
|
||||||
|
} In2;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global)
|
||||||
|
layout (std430, set = 2, binding = 0) buffer MaterialProperties // For materials
|
||||||
|
{
|
||||||
|
MatPropData data[];
|
||||||
|
} MatProp;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 0) uniform GenericDataBuffer
|
||||||
|
{
|
||||||
|
GenericData data;
|
||||||
|
} genericDataBuffer;
|
||||||
|
|
||||||
|
layout(location = 0) out vec4 objectVFX;
|
||||||
|
layout(input_attachment_index = 0, set = 3, binding = 0) uniform subpassInput depthBuffer;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// Sample depth buffer using UV and save it
|
||||||
|
float currentDepth = subpassLoad (depthBuffer).r;
|
||||||
|
|
||||||
|
// Use depth buffer to check against current fragment's depth. If fragment is behind depth buffer, render fragment.
|
||||||
|
if (currentDepth > gl_FragCoord.z)
|
||||||
|
discard;
|
||||||
|
|
||||||
|
objectVFX = MatProp.data[In2.materialIndex].color;
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Silhouette_FS
|
||||||
|
ID: 42962441
|
||||||
|
Type: 2
|
|
@ -0,0 +1,68 @@
|
||||||
|
#version 450
|
||||||
|
#extension GL_KHR_vulkan_glsl : enable
|
||||||
|
|
||||||
|
//#include "ShaderDescriptorDefinitions.glsl"
|
||||||
|
|
||||||
|
|
||||||
|
layout(location = 0) in vec3 aVertexPos;
|
||||||
|
layout(location = 1) in vec2 aUV;
|
||||||
|
layout(location = 2) in vec3 aNormal;
|
||||||
|
layout(location = 3) in vec3 aTangent;
|
||||||
|
layout(location = 4) in mat4 worldTransform;
|
||||||
|
layout(location = 8) in uvec2 integerData;
|
||||||
|
layout(location = 9) in uvec4 aBoneIndices;
|
||||||
|
layout(location = 10) in vec4 aBoneWeights;
|
||||||
|
layout(location = 11) in uint firstBoneIndex;
|
||||||
|
|
||||||
|
layout(location = 0) out struct
|
||||||
|
{
|
||||||
|
vec4 vertPos; // location 0
|
||||||
|
vec2 uv; // location = 1
|
||||||
|
vec4 normal; // location = 2
|
||||||
|
vec4 worldPos; // location = 3
|
||||||
|
|
||||||
|
} Out;
|
||||||
|
|
||||||
|
// material stuff
|
||||||
|
layout(location = 4) out struct
|
||||||
|
{
|
||||||
|
int materialIndex;
|
||||||
|
uint eid;
|
||||||
|
uint lightLayerIndex;
|
||||||
|
|
||||||
|
} Out2;
|
||||||
|
|
||||||
|
layout(set = 1, binding = 0) uniform CameraData
|
||||||
|
{
|
||||||
|
vec4 position;
|
||||||
|
mat4 vpMat;
|
||||||
|
mat4 viewMat;
|
||||||
|
mat4 projMat;
|
||||||
|
} cameraData;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
Out2.materialIndex = gl_InstanceIndex;
|
||||||
|
Out2.eid = integerData[0];
|
||||||
|
Out2.lightLayerIndex = integerData[1];
|
||||||
|
|
||||||
|
// for transforming gBuffer position and normal data
|
||||||
|
mat4 modelViewMat = cameraData.viewMat * worldTransform;
|
||||||
|
|
||||||
|
// gBuffer position will be in view space
|
||||||
|
Out.vertPos = modelViewMat * vec4(aVertexPos, 1.0f);
|
||||||
|
|
||||||
|
Out.worldPos = worldTransform * vec4 (aVertexPos, 1.0f);
|
||||||
|
|
||||||
|
// uvs for texturing in fragment shader
|
||||||
|
Out.uv = aUV;
|
||||||
|
|
||||||
|
mat3 transposeInv = mat3 (transpose(inverse(modelViewMat)));
|
||||||
|
|
||||||
|
// normals are also in view space
|
||||||
|
Out.normal.rgb = transposeInv * aNormal.rgb;
|
||||||
|
Out.normal.rgb = normalize (Out.normal.rgb);
|
||||||
|
|
||||||
|
// clip space for rendering
|
||||||
|
gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: Silhouette_VS
|
||||||
|
ID: 38847805
|
||||||
|
Type: 2
|
|
@ -3,7 +3,7 @@
|
||||||
#extension GL_ARB_shading_language_420pack : enable
|
#extension GL_ARB_shading_language_420pack : enable
|
||||||
#extension GL_EXT_nonuniform_qualifier : require
|
#extension GL_EXT_nonuniform_qualifier : require
|
||||||
|
|
||||||
layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput sceneTexture;
|
layout (input_attachment_index = 0, set = 3, binding = 0) uniform subpassInput sceneTexture;
|
||||||
|
|
||||||
|
|
||||||
layout(location = 0) out vec4 fragColor;
|
layout(location = 0) out vec4 fragColor;
|
||||||
|
|
Binary file not shown.
|
@ -5,10 +5,8 @@
|
||||||
|
|
||||||
struct MatPropData
|
struct MatPropData
|
||||||
{
|
{
|
||||||
vec4 color;
|
|
||||||
int textureIndex;
|
int textureIndex;
|
||||||
float alpha;
|
float alpha;
|
||||||
vec3 beta;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
layout(location = 0) in struct
|
layout(location = 0) in struct
|
||||||
|
@ -43,6 +41,8 @@ void main()
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
fragColor.a = MatProp.data[In2.materialIndex].alpha;
|
||||||
|
|
||||||
|
// fragColor.a = 1.0f;
|
||||||
outEntityID = In2.eid;
|
outEntityID = In2.eid;
|
||||||
}
|
}
|
Binary file not shown.
|
@ -0,0 +1,60 @@
|
||||||
|
#version 450
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
#extension GL_ARB_shading_language_420pack : enable
|
||||||
|
#extension GL_EXT_nonuniform_qualifier : require
|
||||||
|
|
||||||
|
struct MatPropData
|
||||||
|
{
|
||||||
|
int textureIndex;
|
||||||
|
float alpha;
|
||||||
|
float sliderThreshold;
|
||||||
|
vec4 sliderStartColor;
|
||||||
|
vec4 sliderEndColor;
|
||||||
|
vec4 sliderBarColor;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(location = 0) in struct
|
||||||
|
{
|
||||||
|
vec4 vertPos; // location 0
|
||||||
|
vec2 uv; // location = 1
|
||||||
|
vec4 normal; // location = 2
|
||||||
|
|
||||||
|
} In;
|
||||||
|
|
||||||
|
// material stuff
|
||||||
|
layout(location = 3) flat in struct
|
||||||
|
{
|
||||||
|
int materialIndex;
|
||||||
|
uint eid;
|
||||||
|
uint lightLayerIndex;
|
||||||
|
|
||||||
|
} In2;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global)
|
||||||
|
layout (std430, set = 2, binding = 0) buffer MaterialProperties // For materials
|
||||||
|
{
|
||||||
|
MatPropData data[];
|
||||||
|
} MatProp;
|
||||||
|
|
||||||
|
layout(location = 0) out vec4 fragColor;
|
||||||
|
layout(location = 1) out uint outEntityID;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
|
||||||
|
|
||||||
|
if (In.uv.x > MatProp.data[In2.materialIndex].sliderThreshold)
|
||||||
|
fragColor = MatProp.data[In2.materialIndex].sliderBarColor;
|
||||||
|
else
|
||||||
|
fragColor = (1.0f - In.uv.x) * MatProp.data[In2.materialIndex].sliderStartColor + In.uv.x * MatProp.data[In2.materialIndex].sliderEndColor;
|
||||||
|
//fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
|
||||||
|
if (fragColor.a < 0.01f)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragColor.a = MatProp.data[In2.materialIndex].alpha;
|
||||||
|
|
||||||
|
// fragColor.a = 1.0f;
|
||||||
|
outEntityID = In2.eid;
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: UI_Slider_FS
|
||||||
|
ID: 48832081
|
||||||
|
Type: 2
|
|
@ -0,0 +1,62 @@
|
||||||
|
#version 450
|
||||||
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
#extension GL_ARB_shading_language_420pack : enable
|
||||||
|
#extension GL_EXT_nonuniform_qualifier : require
|
||||||
|
|
||||||
|
struct MatPropData
|
||||||
|
{
|
||||||
|
int textureIndex;
|
||||||
|
float alpha;
|
||||||
|
float sliderThreshold;
|
||||||
|
vec4 sliderStartColor;
|
||||||
|
vec4 sliderEndColor;
|
||||||
|
vec4 sliderBarColor;
|
||||||
|
};
|
||||||
|
|
||||||
|
layout(location = 0) in struct
|
||||||
|
{
|
||||||
|
vec4 vertPos; // location 0
|
||||||
|
vec2 uv; // location = 1
|
||||||
|
vec4 normal; // location = 2
|
||||||
|
|
||||||
|
} In;
|
||||||
|
|
||||||
|
// material stuff
|
||||||
|
layout(location = 3) flat in struct
|
||||||
|
{
|
||||||
|
int materialIndex;
|
||||||
|
uint eid;
|
||||||
|
uint lightLayerIndex;
|
||||||
|
|
||||||
|
} In2;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global)
|
||||||
|
layout (std430, set = 2, binding = 0) buffer MaterialProperties // For materials
|
||||||
|
{
|
||||||
|
MatPropData data[];
|
||||||
|
} MatProp;
|
||||||
|
|
||||||
|
layout(location = 0) out vec4 fragColor;
|
||||||
|
layout(location = 1) out uint outEntityID;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
|
||||||
|
|
||||||
|
if (In.uv.x > MatProp.data[In2.materialIndex].sliderThreshold)
|
||||||
|
fragColor = MatProp.data[In2.materialIndex].sliderBarColor;
|
||||||
|
else
|
||||||
|
//fragColor = (1.0f - In.uv.x) * MatProp.data[In2.materialIndex].sliderStartColor + In.uv.x * MatProp.data[In2.materialIndex].sliderEndColor;
|
||||||
|
fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
|
||||||
|
|
||||||
|
|
||||||
|
if (fragColor.a < 0.01f)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragColor.a = MatProp.data[In2.materialIndex].alpha;
|
||||||
|
|
||||||
|
// fragColor.a = 1.0f;
|
||||||
|
outEntityID = In2.eid;
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: UI_Slider_Textured_FS
|
||||||
|
ID: 43211183
|
||||||
|
Type: 2
|
|
@ -58,8 +58,11 @@ void main()
|
||||||
Out.normal.rgb = transposeInv * aNormal.rgb;
|
Out.normal.rgb = transposeInv * aNormal.rgb;
|
||||||
Out.normal.rgb = normalize (Out.normal.rgb);
|
Out.normal.rgb = normalize (Out.normal.rgb);
|
||||||
|
|
||||||
|
vec3 vert = aVertexPos;
|
||||||
|
vert.z += 0.1f;
|
||||||
|
|
||||||
// clip space for rendering
|
// clip space for rendering
|
||||||
gl_Position = cameraData.projMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
gl_Position = cameraData.projMat * worldTransform * vec4 (vert, 1.0f);
|
||||||
gl_Position.z += 0.1f; // HAX
|
// gl_Position.z += 0.1f; // HAX
|
||||||
// gl_Position = vec4 (aVertexPos, 1.0f);
|
// gl_Position = vec4 (aVertexPos, 1.0f);
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: RaccoonTransparent
|
||||||
|
ID: 51158984
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: TX_WK10_HowToPlay_01
|
||||||
|
ID: 62200943
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: TX_WK10_HowToPlay_02
|
||||||
|
ID: 53303669
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: TX_WK10_HowToPlay_03
|
||||||
|
ID: 61780097
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: TX_WK10_HowToPlay_04
|
||||||
|
ID: 59178524
|
||||||
|
Type: 3
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue