Updated MainMenu and Gameplay UI #433

Merged
maverickdgg merged 8 commits from SP3-20-UI-System into main 2023-03-21 14:48:59 +08:00
147 changed files with 8651 additions and 36646 deletions
Showing only changes of commit cb791b6390 - Show all commits

View File

@ -0,0 +1,7 @@
Name: MD_HomeownerV2Anims
ID: 217758867
Type: 12
Sub Assets:
Name: Full
ID: 227644717
Type: 13

View File

@ -3,6 +3,6 @@
SubPass: G-Buffer Write
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 57342922
data.textureIndex: 54758364
data.alpha: 0
data.beta: {x: 1, y: 1, z: 1}

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,7 +0,0 @@
Name: BoneIKTest4
ID: 81814706
Type: 4
Sub Assets:
Name: Cube
ID: 137599708
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,7 @@
Name: MD_Birdnest
ID: 75951674
Type: 4
Sub Assets:
Name: Birdnest
ID: 148793058
Type: 8

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,7 @@
Name: MD_DarkCorridor
ID: 83188665
Type: 4
Sub Assets:
Name: CorridorPiece
ID: 136332265
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Name: MD_RigTest01_SkinningTest
ID: 72178939
Type: 4
Sub Assets:
Name: Cube
ID: 141097368
Type: 8

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Name: MD_RigTest02_HierachyTest1
ID: 80500944
Type: 4
Sub Assets:
Name: Cube.001
ID: 135102560
Type: 8

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Name: MD_RigTest03_HierachyTest2
ID: 72063399
Type: 4
Sub Assets:
Name: Cube.001
ID: 140361184
Type: 8

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Name: MD_RigTest04_BakedIKLegTest
ID: 80728853
Type: 4
Sub Assets:
Name: Cube
ID: 149723808
Type: 8

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Name: MD_RigTest05_MeshDeformTest
ID: 82124728
Type: 4
Sub Assets:
Name: Sphere
ID: 138773466
Type: 8

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
Name: MD_RigTest06_Piston
ID: 76715962
Type: 4
Sub Assets:
Name: Cube
ID: 134911040
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,7 @@
Name: MD_RubbishBinV2
ID: 71821168
Type: 4
Sub Assets:
Name: RubbishBin02
ID: 141767450
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,28 @@
Name: MD_ShelvesItems
ID: 80837524
Type: 4
Sub Assets:
Name: Cube.026
ID: 149990626
Type: 8
Name: Cube.033
ID: 148931934
Type: 8
Name: Cube.043
ID: 150010583
Type: 8
Name: PottedPlant
ID: 136851231
Type: 8
Name: Cube.140
ID: 141518062
Type: 8
Name: Cube.079
ID: 139864675
Type: 8
Name: Cube.061
ID: 147649979
Type: 8
Name: Cube.062
ID: 137537688
Type: 8

View File

@ -1,276 +0,0 @@
- EID: 0
Name: Main Camera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0.472120881, z: 2.53064919}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0.472120881, z: 2.53064919}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Scripts: ~
- EID: 2
Name: Light
IsActive: true
NumberOfChildren: 0
Components:
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 1
Name: Plate
IsActive: true
NumberOfChildren: 4
Components:
Transform Component:
Translate: {x: 0.00451920554, y: 0.829197884, z: 1.75}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 0.999979734, y: 1, z: 0.999979734}
IsActive: true
Renderable Component:
Mesh: 140964851
Material: 126974645
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.200000003, y: 0.100000001, z: 0.200000003}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: Breakable
Enabled: true
threshHold: 0
force: 1
- EID: 4
Name: Piece1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 3.2922253e-07, y: 0, z: -0.0171992779}
Rotate: {x: -1.31316483e-07, y: 3.60887498e-09, z: 5.27542454e-11}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 146557542
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 5
Name: Piece2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.47731805e-07, y: 0, z: 0.0325666666}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 145439064
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.200000003}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 6
Name: Piece3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -0.0502781346, y: 1.18017197e-05, z: 6.97374344e-05}
Rotate: {x: 0.021297913, y: 0.00146768149, z: -5.48749846e-08}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 139411134
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 7
Name: Piece4
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0.0364143178, y: 7.39097595e-06, z: 6.61611557e-05}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 136742160
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.100000001, y: 0.0500000007, z: 0.150000006}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 3
Name: Ground
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -0.414889663, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 5, y: 1, z: 5}
IsActive: true
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~

View File

@ -1,3 +0,0 @@
Name: Breakables
ID: 85040588
Type: 5

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
Name: Environment
ID: 91553073
Type: 5

View File

@ -6842,7 +6842,6 @@
timer: 200
scoreText: 237
timeText: 525
minusTimerText: 65735
multiplierText: 524
maxMultiplierDuration: 5
maxMultiplierCombo: 10
@ -7549,14 +7548,17 @@
Enabled: true
respawnPoint: 65732
currentState: 0
maxMoveVel: 3
walkMaxMoveVel: 2.5
moveForce: 50
sprintMultiplier: 1.5
rotationFactorPerFrame: 5
maxJumpHeight: 2
maxJumpTime: 0.75
fallMultipler: 3
maxJumpTime: 1
fallMultipler: 2
jumpPadMultiplayer: 1.20000005
dropDuration: 0.5
jumpPadFallMultipler: 0.75
jumpPadMaxMoveVel: 1
lightMultiper: 0.899999976
mediumMultiper: 0.699999988
heavyMultiper: 0.5
@ -7564,13 +7566,16 @@
silhouetteBag: 465
- Type: PickAndThrow
Enabled: true
throwForce: [8, 10, 8]
throwForce: [8, 4, 8]
cameraArmOffSet: [0.25, 0.600000024, 0.200000003]
delayTimer: 1
aimingLength: 1
throwItem: false
rayDistance: 0.75
rayHeight: 0.100000001
lerpPickUpDuration: 0.75
tweenAimDuration: 0.300000012
aimingFOV: 15
- Type: StateMachine
Enabled: true
currentStateName: Idle State
@ -7624,7 +7629,7 @@
Camera Arm Component:
Arm Pitch: 45
Arm Yaw: -90
Arm Length: 3
Arm Length: 2
Look At Camera Origin: true
Target Offset: {x: 0, y: 0.75, z: 0}
Camera Collision: true
@ -7632,7 +7637,7 @@
Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 3
armLength: 2
turnSpeedPitch: 0.200000003
turnSpeedYaw: 0.400000006
inverseXControls: true
@ -7738,7 +7743,7 @@
Clicked: false
IsActive: true
Scripts:
- Type: SHADE_Scripting.UI.StealFoodPopUp
- Type: StealFoodPopUp
Enabled: true
popInDuration: 0.5
popOutDuration: 0.075000003
@ -8039,9 +8044,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -800, y: 365, z: 0.600000024}
Translate: {x: -775, y: 325, z: 0.600000024}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 100, y: 100, z: 60}
Scale: {x: 120, y: 120, z: 1}
IsActive: true
Text Renderer Component:
Text: My name is Brandon.
@ -8057,7 +8062,7 @@
Scripts:
- Type: SHADE_Scripting.UI.ScoreTextDigitPositioning
Enabled: true
offsetPerDigit: 25
offsetPerDigit: 30
- Type: SHADE_Scripting.UI.SingleScaleBounce
Enabled: true
durationUp: 0.150000006
@ -8066,12 +8071,12 @@
- EID: 525
Name: Timer Text
IsActive: true
NumberOfChildren: 2
NumberOfChildren: 1
Components:
Transform Component:
Translate: {x: 700, y: 400, z: 0.100000001}
Translate: {x: 650, y: 350, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 60, y: 60, z: 1}
Scale: {x: 85, y: 85, z: 1}
IsActive: true
Text Renderer Component:
Text: My name is Brandon.
@ -8105,40 +8110,15 @@
Clicked: false
IsActive: true
Scripts: ~
- EID: 65735
Name: Minus Timer Text
IsActive: false
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -0.800000012, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: false
Text Renderer Component:
Text: -10
Font: 174412429
Color: {x: 1, y: 0, z: 0, w: 1}
Text Size: {x: 1, y: 1, z: 1}
IsActive: false
UI Component:
Canvas ID: 526
Hovered: false
Clicked: false
IsActive: false
Scripts:
- Type: SHADE_Scripting.UI.MinusTimerText
Enabled: true
duration: 2
- EID: 524
Name: Multiplier Text
IsActive: true
NumberOfChildren: 1
Components:
Transform Component:
Translate: {x: -800, y: 250, z: 0.100000001}
Translate: {x: -800, y: 175, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 60}
Scale: {x: 80, y: 80, z: 1}
IsActive: true
Text Renderer Component:
Text: X2
@ -8163,7 +8143,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995}
Translate: {x: 0.649999976, y: 0.400000006, z: 0.98999995}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 4.26499987, y: 2, z: 1}
IsActive: true
@ -8185,9 +8165,9 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -770, y: 425, z: 59.9999962}
Translate: {x: -740, y: 400, z: 59.9999962}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 345.600006, y: 200, z: 60}
Scale: {x: 414, y: 240, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,376 +0,0 @@
- EID: 0
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Camera Component:
Position: {x: 0, y: 3, z: 8}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 1.79999995, y: 0, z: 1}
Color: {x: 0.951541841, y: 0.921719015, z: 0.553319454, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 7
Name: BigBoi
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -16.8647861, z: -14.039052}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 28.1434975, y: 28.1434975, z: 28.1434975}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
Scripts: ~
- EID: 8
Name: AmbientLight
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: 0.25
IsActive: true
Scripts: ~
- EID: 65542
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 0.5, z: -2.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 65538
Name: Movable
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 4.28833103, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 0, z: 1}
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 65537
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 5.25, y: 2.75, z: 2.5}
Rotate: {x: 0, y: 0, z: 1.57079637}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 9
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 5.25, y: 2.75, z: -2.5}
Rotate: {x: 0, y: 0, z: 1.57079637}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 10
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -5.25, y: 2.75, z: 2.5}
Rotate: {x: 0, y: 0, z: 1.57079637}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 11
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -5.25, y: 2.75, z: -2.5}
Rotate: {x: 0, y: 0, z: 1.57079637}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 12
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 2.75, z: 5.25}
Rotate: {x: 7.15255737e-07, y: 1.57079566, z: 1.57079589}
Scale: {x: 4.99999809, y: 0.499999762, z: 4.99999809}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 65551
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2.5, y: 2.75, z: 5.25}
Rotate: {x: 7.15255737e-07, y: 1.57079566, z: 1.57079589}
Scale: {x: 4.99999809, y: 0.499999762, z: 4.99999809}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 65550
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2.5, y: 2.75, z: -5.25}
Rotate: {x: 7.15255737e-07, y: 1.57079566, z: 1.57079589}
Scale: {x: 4.99999809, y: 0.499999762, z: 4.99999809}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 65549
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 2.75, z: -5.25}
Rotate: {x: 7.15255737e-07, y: 1.57079566, z: 1.57079589}
Scale: {x: 4.99999809, y: 0.499999762, z: 4.99999809}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 16
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 2.5, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 2.5, y: 0.5, z: 2.5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 5
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 0.5, z: 2.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 4
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2.5, y: 0.5, z: -2.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 3
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2.5, y: 0.5, z: 2.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 5, y: 0.5, z: 5}
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~

View File

@ -1,3 +0,0 @@
Name: M2Scene
ID: 94283040
Type: 5

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
Name: MainGameWithAI
ID: 96052853
Type: 5

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
Name: MainGameWithAIFixed
ID: 89830755
Type: 5

View File

@ -973,7 +973,7 @@
IsActive: true
Slider Component:
Slider Value: 1
Min Value: 45
Min Value: 30
Max Value: 120
IsActive: true
UI Component:

View File

@ -1,74 +0,0 @@
- EID: 0
Name: Mesh_Homeowner
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: -1}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 140697366
Material: 129495479
IsActive: true
Scripts: ~
- EID: 1
Name: Light_Ambient
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: Mesh_Apple
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: 144128170
Material: 131956078
IsActive: true
Scripts: ~
- EID: 3
Name: Mesh_Cheese
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 141841143
Material: 131956078
IsActive: true
Scripts: ~
- EID: 4
Name: Mesh_Meat
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 136892700
Material: 131956078
IsActive: true
Scripts: ~

View File

@ -1,3 +0,0 @@
Name: MeshImport
ID: 95609584
Type: 5

View File

@ -1,526 +0,0 @@
- EID: 0
Name: ScoreZone
IsActive: true
NumberOfChildren: 0
Components:
Camera Component:
Position: {x: 0, y: 0, z: 0}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 1.79999995, y: 0, z: 1}
Color: {x: 0.951541841, y: 0.921719015, z: 0.553319454, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 1
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1.440328, y: -4.41369677, z: -5}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 49.4798889, y: 0.5, z: 17.5}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 2
Name: Player
IsActive: true
NumberOfChildren: 3
Components:
Transform Component:
Translate: {x: -0.0897406489, y: -4.07369709, z: 3.6087606}
Rotate: {x: 0, y: -0.19268477, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 2
Angular Drag: 0
Use Gravity: false
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: true
Freeze Rotation Y: true
Freeze Rotation Z: true
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.5, y: 0.699999988, z: 0.5}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.300000012, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: PlayerController
Enabled: true
currentState: 0
maxMoveVel: 4
moveForce: 50
sprintMultiplier: 1.5
rotationFactorPerFrame: 4
maxJumpHeight: 4
maxJumpTime: 0.75
fallMultipler: 2
lightMultiper: 0.75
mediumMultiper: 0.5
heavyMultiper: 0.25
- Type: PickAndThrow
Enabled: true
throwForce: [300, 300, 300]
delayTimer: 1
aimingLength: 1.5
- Type: StateMachine
Enabled: true
currentStateName: ""
currentAnimName: ""
- EID: 3
Name: HoldingPoint
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 1.20000005, z: 0.5}
Rotate: {x: 0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 4
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: -0.738241911, y: 0.48064509, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: -0.0897406489, y: -4.07369709, z: 3.6087606}
Pitch: -42.2981453
Yaw: 16.4989109
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 2
turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5
pitchClamp: 45
- EID: 9
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: 144838771
Material: 123745521
IsActive: true
Scripts: ~
- EID: 6
Name: AI
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -8, y: -4.42369699, z: 3.65323806}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0
Angular Drag: 0
Use Gravity: true
Interpolate: false
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: true
Freeze Rotation Y: true
Freeze Rotation Z: true
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.5, y: 0.5, z: 0.5}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 7
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -16.8647861, z: -14.039052}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 28.1434975, y: 28.1434975, z: 28.1434975}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
Scripts: ~
- EID: 8
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: 0.25
IsActive: true
Scripts: ~
- EID: 11
Name: GameManager
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
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders: ~
IsActive: true
Scripts:
- Type: GameManager
Enabled: true
itemPool: 12
zonePool: 15
currGameState: 0
totalItemCount: 0
Score: 0
timer: 50
- EID: 12
Name: ItemPool
IsActive: true
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 10
Name: item
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 3.19896913, y: -3.66431332, z: -4.99997139}
Rotate: {x: -1.57956983e-05, y: 2.20007223e-06, z: -0.000548519194}
Scale: {x: 2, y: 2, z: 2}
IsActive: true
Renderable Component:
Mesh: 144838771
Material: 123745521
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.100000001
Angular Drag: 0.100000001
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 2, y: 2, z: 2}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 1
currCategory: 0
- EID: 5
Name: item
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -5.02078056, y: -4.17369747, z: -2.14891005}
Rotate: {x: -2.95397289e-08, y: 0.00065473502, z: -4.44611992e-08}
Scale: {x: 1.99998975, y: 2, z: 1.99998975}
IsActive: true
Renderable Component:
Mesh: 144838771
Material: 123745521
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.100000001
Angular Drag: 0.100000001
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.5, y: 0.5, z: 0.5}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 1, y: 1, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.5, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: Item
Enabled: true
Score: 1
currCategory: 0
- EID: 16
Name: Mesh_Apple
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -2.57231402, y: -3.27855849, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 144128170
Material: 131956078
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Type: Box
Half Extents: {x: 0.100000001, y: 0.100000001, z: 0.100000001}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
- Is Trigger: true
Type: Box
Half Extents: {x: 0.300000012, y: 0.300000012, z: 0.300000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts: ~
- EID: 15
Name: ScoreZonePool
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 13
Name: ScoreZone
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -24.4654179, y: -3.15127993, z: -3.29243231}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: true
Type: Box
Half Extents: {x: 1, y: 20, z: 20}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: ScoringZone
Enabled: true
- EID: 14
Name: ScoreZone
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -6.64785767, y: 0, z: -14.217104}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
RigidBody Component:
Type: Static
Drag: 0.00999999978
Angular Drag: 0.00999999978
Use Gravity: true
Interpolate: true
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: true
Type: Box
Half Extents: {x: 20, y: 20, z: 1}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: ScoringZone
Enabled: true

View File

@ -1,3 +0,0 @@
Name: PlayerControllerTest
ID: 92100024
Type: 5

View File

@ -1,148 +0,0 @@
- EID: 0
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0.304069757, z: 1.73034382}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0.304069757, z: 1.73034382}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1200
Near: 0.00999999978
Far: 10000
Perspective: true
FOV: 90
IsActive: true
Scripts: ~
- EID: 1
Name: Raccoon
IsActive: true
NumberOfChildren: 1
Components:
Transform Component:
Translate: {x: 0, y: 0.201105013, z: 0}
Rotate: {x: 0.00523597933, y: -2.96353412, z: -6.40293041e-10}
Scale: {x: 1.00000191, y: 1, z: 1.00000191}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
Scripts: ~
- EID: 3
Name: Bag
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0.00623797067, y: -0.000395311916, z: -2.03726813e-08}
Rotate: {x: 1.35041773e-08, y: 2.79945588, z: -9.6043955e-09}
Scale: {x: 1.00008798, y: 1, z: 1.0000881}
IsActive: true
Renderable Component:
Mesh: 144838771
Material: 123745521
IsActive: true
Scripts: ~
- EID: 2
Name: DirectionalLight
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 1.82978272, z: -3.28967047}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Light Component:
Position: {x: 3, y: 4.5, z: 7}
Type: Directional
Direction: {x: 0, y: 0, z: 1}
Color: {x: 1, y: 1, z: 1, w: 1}
Layer: 4294967295
Strength: 0
Casting Shadows: false
IsActive: true
Scripts: ~
- EID: 4
Name: AmbientLight
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: 0.600000024
Casting Shadows: false
IsActive: true
Scripts: ~
- EID: 5
Name: Floor
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0.0810000002, z: 0}
Rotate: {x: -1.57079625, y: 0, z: -0}
Scale: {x: 50, y: 49.9999924, z: 49.9999924}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 124370424
IsActive: true
Scripts: ~
- EID: 6
Name: TrajectoryTest
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -3.39616156, y: 3.66783714, z: -0.722039163}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.100000001
Gravity Scale: 1
Use Gravity: true
Interpolate: true
Sleeping Enabled: false
Freeze Position X: false
Freeze Position Y: false
Freeze Position Z: false
Freeze Rotation X: false
Freeze Rotation Y: false
Freeze Rotation Z: false
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Collision Tag: 0
Type: Sphere
Radius: 1
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Trajectory Renderer Component:
Mesh: 134305891
Start Color: {x: 1, y: 0.951541781, z: 0}
Start Alpha: 1
End Color: {x: 0, y: 1, z: 0.748898745}
End Alpha: 1
"Color Eval Rate ": 0.192000002
IsActive: true
Scripts: ~

View File

@ -1,3 +0,0 @@
Name: Scene2
ID: 87285316
Type: 5

View File

@ -1,104 +0,0 @@
- EID: 0
Name: Canvas
IsActive: true
NumberOfChildren: 2
Components:
Canvas Component:
Canvas Width: 10
Canvas Height: 10
IsActive: true
Scripts: ~
- EID: 6
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: 141771688
Material: 129340704
IsActive: true
Button Component:
Default Texture: 0
Hovered Texture: 0
Clicked Texture: 0
IsActive: true
Scripts: ~
- EID: 5
Name: Default
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -3.9000001, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: true
Toggle Button Component:
Non Toggled Texture: 0
Toggled Texture: 0
Value: true
IsActive: true
Scripts: ~
- EID: 1
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Camera Component:
Position: {x: 0, y: 3, z: 8}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1920
Height: 1080
Near: 0.00999999978
Far: 10000
Perspective: true
IsActive: true
Light Component:
Position: {x: 0, y: 0, z: 0}
Type: Directional
Direction: {x: 1.79999995, y: 0, z: 1}
Color: {x: 0.951541841, y: 0.921719015, z: 0.553319454, w: 1}
Layer: 4294967295
Strength: 0
IsActive: true
Scripts: ~
- EID: 7
Name: BigBoi
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -16.8647861, z: -14.039052}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 28.1434975, y: 28.1434975, z: 28.1434975}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
Scripts: ~
- EID: 8
Name: AmbientLight
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: 0.25
IsActive: true
Scripts: ~

View File

@ -1,3 +0,0 @@
Name: UI_Test
ID: 87244611
Type: 5

View File

@ -64,20 +64,20 @@
Transform Component:
Translate: {x: 0.332949668, y: 0, z: 0}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 0.0710000023, y: 0.0710000023, z: 0.0710000023}
Scale: {x: 0.173914507, y: 0.173914507, z: 0.173914507}
IsActive: true
Renderable Component:
Mesh: 141097368
Material: 128805346
Mesh: 148542784
Material: 121518381
IsActive: true
Animator Component:
Rig: 72178939
Rig: 76586906
AnimationController: 0
IsActive: true
Scripts:
- Type: SHADE.Test.AnimTest
Enabled: true
fullClip: 231416496
fullClip: 227644717
idleClip: 0
runClip: 0
pickUpClip: 0

View File

@ -52,8 +52,7 @@ public class Breakable : Script
if (ignoreRaccoon && info.GameObject.GetScript<PlayerController>())
return;
if (rb.LinearVelocity.GetSqrMagnitude() > threshHold && !info.GameObject.GetScript<PlayerController>())
if (rb.LinearVelocity.GetSqrMagnitude() > threshHold)
{
isBreak = true;
if (GameObject.GetScript<Item>())

View File

@ -3,30 +3,26 @@ using System;
public class PlayerIdleState : BaseState
{
private bool holdItem;
public PlayerIdleState(StateMachine stateMachine, bool hi) : base(stateMachine)
protected PlayerController player;
public PlayerIdleState(StateMachine stateMachine) : base(stateMachine)
{
stateName = "Idle State";
holdItem = hi;
}
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
if (PlayerAnimations.Instance)
{
if (!holdItem)
if (!machine.GetScript<PlayerController>().playLandedAnimation)
{
if (PlayerAnimations.Instance.playerIdleClip)
if (!machine.GetScript<PlayerController>().holdItem)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
}
else
{
if (PlayerAnimations.Instance.playerCarryIdleClip)
else
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
@ -34,6 +30,54 @@ public class PlayerIdleState : BaseState
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
}
else
{
PlayerAnimations.Instance.playerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpEndClip)
{
if (!machine.GetScript<PlayerController>().holdItem)
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
else
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
machine.GetScript<PlayerController>().playLandedAnimation = false;
}
});
PlayerAnimations.Instance.BagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpEndClip)
{
if (!machine.GetScript<PlayerController>().holdItem)
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
else
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
PlayerAnimations.Instance.silhoPlayerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpEndClip)
{
if (!machine.GetScript<PlayerController>().holdItem)
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
else
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
PlayerAnimations.Instance.silhoBagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpEndClip)
{
if (!machine.GetScript<PlayerController>().holdItem)
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
else
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
}
}
}
public override void update()

View File

@ -10,6 +10,60 @@ public class PlayerJumpState : BaseState
public override void OnEnter()
{
//Debug.Log("jump");
if (PlayerAnimations.Instance)
{
if (!machine.GetScript<PlayerController>().holdItem && PlayerAnimations.Instance.playerJumpStartClip)
{
PlayerAnimations.Instance.playerAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpStartClip);
PlayerAnimations.Instance.BagAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpStartClip);
PlayerAnimations.Instance.silhoPlayerAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpStartClip);
PlayerAnimations.Instance.silhoBagAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpStartClip);
PlayerAnimations.Instance.playerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpStartClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
}
});
PlayerAnimations.Instance.BagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpStartClip)
{
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
}
});
PlayerAnimations.Instance.silhoPlayerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpStartClip)
{
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
}
});
PlayerAnimations.Instance.silhoBagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerJumpStartClip)
{
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
}
});
}
else if (machine.GetScript<PlayerController>().holdItem && PlayerAnimations.Instance.playerJumpLoopClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerJumpLoopClip);
}
else
{
Debug.LogError("missing playercontroller in jump state");
}
}
}
public override void update()
{

View File

@ -9,7 +9,19 @@ public class PlayerLandState : BaseState
}
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
//Debug.Log("landed ENTER");
if (PlayerAnimations.Instance)
{
if (!machine.GetScript<PlayerController>().holdItem)
{
PlayerAnimations.Instance.playerAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
PlayerAnimations.Instance.BagAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
PlayerAnimations.Instance.silhoPlayerAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
PlayerAnimations.Instance.silhoBagAnimator.PlayOneShot(PlayerAnimations.Instance.playerJumpEndClip);
}
else
machine.GetScript<PlayerController>().playLandedAnimation = false;
}
}
public override void update()
{

View File

@ -14,7 +14,7 @@ public class PlayerRunState : BaseState
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
if (PlayerAnimations.Instance && PlayerAnimations.Instance.playerRunClip)
if (PlayerAnimations.Instance)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerRunClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerRunClip);

View File

@ -6,37 +6,37 @@ public class PlayerWalkState : BaseState
{
private float timer;
private float delay = 0.5f;
private bool holdItem;
public PlayerWalkState(StateMachine stateMachine, bool hi) : base(stateMachine)
public PlayerWalkState(StateMachine stateMachine) : base(stateMachine)
{
stateName = "Walk State";
holdItem = hi;
}
public override void OnEnter()
{
//Debug.Log("WALK ENTER");
timer = delay;
machine.GetScript<PlayerController>().playLandedAnimation = false;
if (PlayerAnimations.Instance)
{
if (!holdItem)
if (!machine.GetScript<PlayerController>().holdItem)
{
if (PlayerAnimations.Instance.playerWalkClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
}
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
}
else
else if (machine.GetScript<PlayerController>().holdItem)
{
if (PlayerAnimations.Instance.playerCarryWalkClip)
{
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
}
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
}
else
{
Debug.LogError("Missing playercontroller in walk state");
}
}
}

View File

@ -34,6 +34,22 @@ public class PickAndThrow : Script
[Tooltip("Height of ray")]
public float rayHeight = 0.1f;
[NonSerialized]
private TweenThread camArmTween;
[NonSerialized]
private TweenThreadVec3 offSetCamTween;
[NonSerialized]
private TweenThread FOVTween;
public float lerpPickUpDuration = 0.75f;
private float pickUptimer = 0.0f;
private bool foodHoldReach = false;
public float tweenAimDuration = 0.3f;
private bool camTweenUpdate = false;
public float aimingFOV = 15.0f;
protected override void awake()
{
pc = GetScript<PlayerController>();
@ -52,6 +68,10 @@ public class PickAndThrow : Script
timer = delayTimer;
}
protected override void start()
{
}
protected override void update()
{
if (GameManager.Instance.GamePause || !GameManager.Instance.stealFoodPopUpDone)
@ -65,22 +85,31 @@ public class PickAndThrow : Script
CalculateDir();
CastRay();
if (camTweenUpdate)
{
pc.camArm.TargetOffset = offSetCamTween.GetValue();
pc.camArm.ArmLength = camArmTween.GetValue();
pc.cam.FOV = FOVTween.GetValue();
if (offSetCamTween.IsCompleted() && camArmTween.IsCompleted() && FOVTween.IsCompleted())
camTweenUpdate = false;
}
if (pc && itemRidigBody && itemTransform && itemCollider)
{
if (pc.holdItem)
{
itemTransform.LocalPosition = raccoonHoldLocation.GlobalPosition;
TweenFood();
itemTransform.LocalRotation = pc.tranform.LocalRotation;
itemRidigBody.ClearForces();
itemRidigBody.ClearTorque();
itemRidigBody.LinearVelocity = Vector3.Zero;
itemRidigBody.AngularVelocity = Vector3.Zero;
if (Input.GetMouseButtonDown(Input.MouseCode.LeftButton))
{
pc.isAiming = true;
pc.camArm.ArmLength = aimingLength;
prevTargetOffSet = pc.camArm.TargetOffset;
pc.camArm.TargetOffset = cameraArmOffSet;
pc.cam.FOV = Settings.cameraFOV + 5;
TweenAimCamArm(true);
}
if (Input.GetMouseButtonUp(Input.MouseCode.LeftButton) && pc.isAiming)
@ -89,19 +118,19 @@ public class PickAndThrow : Script
itemRidigBody.IsGravityEnabled = true;
itemCollider.GetCollisionShape(0).IsTrigger = false;
pc.isAiming = false;
pc.camArm.TargetOffset = prevTargetOffSet;
pc.cam.FOV = Settings.cameraFOV;
if (tpc)
pc.camArm.ArmLength = tpc.armLength;
TweenAimCamArm(false);
pc.holdItem = false;
foodHoldReach = false;
inRange = false;
throwItem = true;
PlayThrowAnimation();
timer = 0.0f;
}
if (Input.GetMouseButtonDown(Input.MouseCode.RightButton) && !pc.isAiming)
{
pc.holdItem = false;
foodHoldReach = false;
inRange = false;
itemRidigBody.IsGravityEnabled = true;
itemCollider.GetCollisionShape(0).IsTrigger = false;
@ -112,9 +141,7 @@ public class PickAndThrow : Script
{
pc.isAiming = false;
pc.cam.FOV = Settings.cameraFOV;
pc.camArm.TargetOffset = prevTargetOffSet;
if (tpc)
pc.camArm.ArmLength = tpc.armLength;
TweenAimCamArm(false);
}
}
@ -131,6 +158,7 @@ public class PickAndThrow : Script
{
pc.holdItem = true;
RetrieveItemComponets();
PlayPickUpAnimation();
}
}
}
@ -224,9 +252,11 @@ public class PickAndThrow : Script
Vector3 playerRayPos = pc.tranform.GlobalPosition;
playerRayPos.y += rayHeight;
dirNor.Normalise();
List<RaycastHit> rayList1 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(22.5f))), rayDistance, false, (ushort)65535);
List<RaycastHit> rayList2 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(-22.5f))), rayDistance, false, (ushort)65535);
List<RaycastHit> rayList3 = Physics.Raycast(new Ray(playerRayPos, dirNor), rayDistance * 0.75f, false, (ushort)65535);
List<RaycastHit> rayList1 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(25.0f))), rayDistance, false, (ushort)65535);
List<RaycastHit> rayList2 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(-25.0f))), rayDistance, false, (ushort)65535);
List<RaycastHit> rayList3 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(12.5f))), rayDistance, false, (ushort)65535);
List<RaycastHit> rayList4 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(-12.5f))), rayDistance, false, (ushort)65535);
List<RaycastHit> rayList5 = Physics.Raycast(new Ray(playerRayPos, dirNor), rayDistance , false, (ushort)65535);
if (rayList1.Count > 0)
{
@ -246,6 +276,18 @@ public class PickAndThrow : Script
inRange = CheckForItem(ray3);
return;
}
else if (rayList4.Count > 0)
{
RaycastHit ray4 = rayList4[0];
inRange = CheckForItem(ray4);
return;
}
else if (rayList5.Count > 0)
{
RaycastHit ray5 = rayList5[0];
inRange = CheckForItem(ray5);
return;
}
else
{
inRange = false;
@ -273,5 +315,149 @@ public class PickAndThrow : Script
return (pc.camArm.Pitch - tpc.pitchUpperClamp) / (tpc.pitchLowerClamp - tpc.pitchUpperClamp);
}
private void PlayPickUpAnimation()
{
if (PlayerAnimations.Instance)
{
PlayerAnimations.Instance.playerAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.playerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerPickUpClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
else
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
PlayerAnimations.Instance.BagAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.BagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerPickUpClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
else
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
PlayerAnimations.Instance.silhoPlayerAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.silhoPlayerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerPickUpClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
else
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
PlayerAnimations.Instance.silhoBagAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.silhoBagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerPickUpClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryWalkClip);
else
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerCarryIdleClip);
}
});
}
}
private void PlayThrowAnimation()
{
if (PlayerAnimations.Instance)
{
PlayerAnimations.Instance.playerAnimator.PlayOneShot(PlayerAnimations.Instance.playerThrowClip);
PlayerAnimations.Instance.playerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerThrowClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
else
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
});
PlayerAnimations.Instance.BagAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.BagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerThrowClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
else
PlayerAnimations.Instance.BagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
});
PlayerAnimations.Instance.silhoPlayerAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.silhoPlayerAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerThrowClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
else
PlayerAnimations.Instance.silhoPlayerAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
});
PlayerAnimations.Instance.silhoBagAnimator.PlayOneShot(PlayerAnimations.Instance.playerPickUpClip);
PlayerAnimations.Instance.silhoBagAnimator.OnClipFinished.RegisterAction((x) =>
{
if (x.FinishedClip == PlayerAnimations.Instance.playerThrowClip)
{
if (pc.isMoveKeyPress)
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerWalkClip);
else
PlayerAnimations.Instance.silhoBagAnimator.Play(PlayerAnimations.Instance.playerIdleClip);
}
});
}
}
private void TweenFood()
{
if (!foodHoldReach)
{
pickUptimer += Time.DeltaTimeF;
itemTransform.LocalPosition = Vector3.Lerp(itemTransform.LocalPosition, raccoonHoldLocation.GlobalPosition, pickUptimer / lerpPickUpDuration);
}
else
itemTransform.LocalPosition = raccoonHoldLocation.GlobalPosition;
if (pickUptimer >= lerpPickUpDuration)
{
foodHoldReach = true;
pickUptimer = 0.0f;
}
}
private void TweenAimCamArm(bool aim)
{
if (aim)
{
offSetCamTween = TweenManager.CreateTweenThreadVec3(tweenAimDuration, pc.camArm.TargetOffset, cameraArmOffSet, EASING_METHOD.EASE_IN_SINE);
camArmTween = TweenManager.CreateTweenThread(tweenAimDuration, pc.camArm.ArmLength, aimingLength, EASING_METHOD.EASE_IN_SINE);
FOVTween = TweenManager.CreateTweenThread(tweenAimDuration, pc.cam.FOV, Settings.cameraFOV + aimingFOV, EASING_METHOD.EASE_IN_SINE);
}
else
{
offSetCamTween = TweenManager.CreateTweenThreadVec3(tweenAimDuration, pc.camArm.TargetOffset, prevTargetOffSet, EASING_METHOD.EASE_IN_SINE);
camArmTween = TweenManager.CreateTweenThread(tweenAimDuration, pc.camArm.ArmLength, tpc.armLength, EASING_METHOD.EASE_IN_SINE);
FOVTween = TweenManager.CreateTweenThread(tweenAimDuration, pc.cam.FOV, Settings.cameraFOV , EASING_METHOD.EASE_IN_SINE);
}
camTweenUpdate = true;
}
}

View File

@ -7,17 +7,17 @@ public class PlayerAnimations : Script
{
#region Raccoon
[SerializeField]
public AnimationClipAsset playerIdleClip; // done
public AnimationClipAsset playerIdleClip;
[SerializeField]
public AnimationClipAsset playerWalkClip; // done
public AnimationClipAsset playerWalkClip;
[SerializeField]
public AnimationClipAsset playerRunClip; // done
public AnimationClipAsset playerRunClip;
[SerializeField]
public AnimationClipAsset playerPickUpClip;
[SerializeField]
public AnimationClipAsset playerCarryIdleClip; // done
public AnimationClipAsset playerCarryIdleClip;
[SerializeField]
public AnimationClipAsset playerCarryWalkClip; // done
public AnimationClipAsset playerCarryWalkClip;
[SerializeField]
public AnimationClipAsset playerThrowClip;
[SerializeField]
@ -72,6 +72,37 @@ public class PlayerAnimations : Script
if (!silhoBagAnimator)
Debug.LogError("Silho Player Animator is MISSING!");
if(!playerIdleClip)
Debug.LogError("Idle clip is MISSING!");
if (!playerWalkClip)
Debug.LogError("run clip is MISSING!");
if (!playerPickUpClip)
Debug.LogError("Pickup clip is MISSING!");
if (!playerThrowClip)
Debug.LogError("Throw clip is MISSING!");
if (!playerJumpStartClip)
Debug.LogError("Jump start clip is MISSING!");
if (!playerJumpLoopClip)
Debug.LogError("Jump loop clip is MISSING!");
if (!playerJumpEndClip)
Debug.LogError("Jump end clip is MISSING!");
if (!playerCarryIdleClip)
Debug.LogError("Carry idle clip is MISSING!");
if (!playerCarryWalkClip)
Debug.LogError("Carry walk clip is MISSING!");
if (!playerRunClip)
Debug.LogError("Run clip is MISSING!");
}
protected override void onDestroy()

View File

@ -37,7 +37,7 @@ public class PlayerController : Script
//Movement variables============================================================
[Tooltip("Max vel for walking")]
public float maxMoveVel = 3.0f;
public float walkMaxMoveVel = 3.0f;
[Tooltip("how much force is apply for walking")]
public float moveForce = 50.0f;
[Tooltip("increase the moveForce and maxMoveVel by its amt")]
@ -69,6 +69,13 @@ public class PlayerController : Script
[Tooltip("multiply height on Jump Pad ")]
public float jumpPadMultiplayer = 2.0f;
private bool jumpPadDrop = false;
private float dropTimer = 0.0f;
public float dropDuration = 0.5f;
public float jumpPadFallMultipler = 0.75f;
public float jumpPadMaxMoveVel = 1.0f;
private float currMoveVel = 0.0f;
//ItemMultipler==================================================================
[Tooltip("How light item will affect player jump")]
public float lightMultiper = 0.75f;
@ -83,6 +90,8 @@ public class PlayerController : Script
public GameObject silhouetteBag;
private Renderable silhouetteBagRend;
public bool playLandedAnimation { get; set; }
protected override void awake()
{
//default setup
@ -108,8 +117,8 @@ public class PlayerController : Script
stateMachine = AddScript<StateMachine>();
Dictionary<Type, BaseState> dictionary = new Dictionary<Type, BaseState>();
dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine, holdItem));
dictionary.Add(typeof(PlayerWalkState), new PlayerWalkState(stateMachine, holdItem));
dictionary.Add(typeof(PlayerIdleState), new PlayerIdleState(stateMachine));
dictionary.Add(typeof(PlayerWalkState), new PlayerWalkState(stateMachine));
dictionary.Add(typeof(PlayerRunState), new PlayerRunState(stateMachine));
dictionary.Add(typeof(PlayerJumpState), new PlayerJumpState(stateMachine));
dictionary.Add(typeof(PlayerFallState), new PlayerFallState(stateMachine));
@ -134,6 +143,8 @@ public class PlayerController : Script
}
AudioHandler.audioClipHandlers["footsteps"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_footsteps");
playLandedAnimation = false;
}
protected override void start()
@ -177,18 +188,34 @@ public class PlayerController : Script
{
cam = GetComponentInChildren<Camera>();
if (pat)
{
cam.FOV = Settings.cameraFOV;
}
}
if(!camArm)
if (!camArm)
{
camArm = GetComponentInChildren<CameraArm>();
pat.prevTargetOffSet = camArm.TargetOffset;
}
if (jumpPadDrop && currentState == RaccoonStates.FALLING)
{
dropTimer += Time.DeltaTimeF;
if (dropTimer > dropDuration)
{
jumpPadDrop = false;
dropTimer = 0.0f;
currMoveVel = walkMaxMoveVel;
}
}
GotCaught();
Rotation();
MoveKey();
Sprint();
Jump();
//Debug.Log($"{currentState}");
//Debug.Log($" axisX: {axisMove.x} axisY:{axisMove.y}");
//Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}");
@ -273,10 +300,15 @@ public class PlayerController : Script
{
Vector3 velNor = rb.LinearVelocity;
velNor.y = 0.0f;
if (velNor.GetMagnitude() > maxMoveVel)
if (jumpPadDrop)
currMoveVel = jumpPadMaxMoveVel;
else
currMoveVel = walkMaxMoveVel;
if (velNor.GetMagnitude() > currMoveVel)
{
velNor.Normalise();
velNor *= maxMoveVel;
velNor *= currMoveVel;
rb.LinearVelocity = new Vector3(velNor.x, rb.LinearVelocity.y, velNor.z);
}
}
@ -298,22 +330,28 @@ public class PlayerController : Script
oldForce = moveForce;
moveForce *= sprintMultiplier;
maxOldVel = maxMoveVel;
maxMoveVel *= sprintMultiplier;
maxOldVel = walkMaxMoveVel;
walkMaxMoveVel *= sprintMultiplier;
}
}
if (Input.GetKeyUp(Input.KeyCode.LeftShift))
{
if (isMoveKeyPress)
{
if (isMoveKeyPress && isGrounded)
{
currentState = RaccoonStates.WALKING;
if(stateMachine && !stateMachine.IsState(typeof(PlayerWalkState)))
if (stateMachine && !stateMachine.IsState(typeof(PlayerWalkState)))
stateMachine.SetState(typeof(PlayerWalkState));
}
else if(!isMoveKeyPress && isGrounded)
{
currentState = RaccoonStates.IDLE;
if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState)))
stateMachine.SetState(typeof(PlayerIdleState));
}
sprintIncreaseOnce = false;
moveForce = oldForce;
maxMoveVel = maxOldVel;
walkMaxMoveVel = maxOldVel;
}
}
@ -323,6 +361,7 @@ public class PlayerController : Script
{
if ( (Input.GetKeyDown(Input.KeyCode.Space) || landedOnJumpPad ) && isGrounded && rb != null)
{
isGrounded = false;
currentState = RaccoonStates.JUMP;
if (stateMachine && !stateMachine.IsState(typeof(PlayerJumpState)))
stateMachine.SetState(typeof(PlayerJumpState));
@ -343,6 +382,7 @@ public class PlayerController : Script
{
v.y *= jumpPadMultiplayer;
landedOnJumpPad = false;
jumpPadDrop = true;
}
rb.LinearVelocity = v;
}
@ -386,6 +426,10 @@ public class PlayerController : Script
if (currentState == RaccoonStates.FALLING)
{
currentState = RaccoonStates.LANDED;
jumpPadDrop = false;
dropTimer = 0.0f;
currMoveVel = walkMaxMoveVel;
playLandedAnimation = true;
if (stateMachine && !stateMachine.IsState(typeof(PlayerLandState)))
stateMachine.SetState(typeof(PlayerLandState));
}
@ -400,7 +444,13 @@ public class PlayerController : Script
else if (currentState == RaccoonStates.FALLING)
{
float prevYVel = v.y;
float newYVel = v.y + (gravity * fallMultipler * (float)Time.FixedDeltaTime);
float newYVel = 0;
if (jumpPadDrop)
newYVel = v.y + (gravity * jumpPadFallMultipler * (float)Time.FixedDeltaTime);
else
newYVel = v.y + (gravity * fallMultipler * (float)Time.FixedDeltaTime);
float nextYVel = (prevYVel + newYVel) * 0.5f;
v.y = nextYVel;
}

View File

@ -69,8 +69,13 @@ public class GameManager : Script
stealFoodPopUpDone = false;
PreviewLevelDone = false;
AudioHandler.audioClipHandlers["BGMWin"] = Audio.CreateAudioClip("event:/Music/stingers/game_win");
AudioHandler.audioClipHandlers["BGMLose"] = Audio.CreateAudioClip("event:/Music/stingers/game_lose");
var winAudio = Audio.CreateAudioClip("event:/Music/stingers/game_win");
winAudio.DestroyOnSceneExit = false;
AudioHandler.audioClipHandlers["BGMWin"] = winAudio;
var loseAudio = Audio.CreateAudioClip("event:/Music/stingers/game_lose");
loseAudio.DestroyOnSceneExit = false;
AudioHandler.audioClipHandlers["BGMLose"] = loseAudio;
goingToWin = false;
goingToLose = false;
@ -199,6 +204,7 @@ public class GameManager : Script
if (Input.GetKeyUp(Input.KeyCode.F1))
{
currGameState = GameState.WIN;
AudioHandler.audioClipHandlers["BGMWin"].Play();
AudioHandler.StopAllSounds(false);
goingToWin = true;
if (SceneFadeInOut.Instance != null)
@ -207,6 +213,7 @@ public class GameManager : Script
else if (Input.GetKeyUp(Input.KeyCode.F2))
{
currGameState = GameState.LOSE;
AudioHandler.audioClipHandlers["BGMLose"].Play();
AudioHandler.StopAllSounds(false);
goingToLose = true;
if (SceneFadeInOut.Instance != null)

View File

@ -1,3 +0,0 @@
Name: PhysicsTest
ID: 159771801
Type: 9

View File

@ -1,9 +0,0 @@
using SHADE;
public class PrintWhenActive : Script
{
protected override void update()
{
Debug.Log("Active!");
}
}

View File

@ -1,3 +0,0 @@
Name: PrintWhenActive
ID: 162536221
Type: 9

View File

@ -1,58 +0,0 @@
using SHADE;
using System;
using System.Collections.Generic;
public class RaccoonShowcase : Script
{
[SerializeField]
[Tooltip("Speed of the rotation in radians per second.")]
[Range(-1.0f, 2.0f)]
private double RotateSpeed = 1.0;
//[SerializeField]
//[Range(-5, 20)]
//private int test = 5;
[SerializeField]
[Tooltip("Speed of the scaling in radians per second around each axis.")]
private Vector3 ScaleSpeed = Vector3.One;
private Transform Transform;
private double rotation = 0.0;
private Vector3 scale = Vector3.Zero;
private double originalScale = 1.0f;
[Tooltip("Sample list of Vector3s.")]
public List<Vector3> vecList = new List<Vector3>(new Vector3[] { new Vector3(1, 2, 3), new Vector3(4, 5, 6) });
[Range(-5, 5)]
public List<int> intList = new List<int>(new int[] { 2, 8, 2, 6, 8, 0, 1 });
public List<Light.Type> enumList = new List<Light.Type>(new Light.Type[] { Light.Type.Point, Light.Type.Directional, Light.Type.Ambient });
public List<int> nullList;
public FontAsset fontAsset;
public MeshAsset mesh;
public MaterialAsset matAsset;
protected override void awake()
{
Transform = GetComponent<Transform>();
if (Transform == null)
{
Debug.LogError("Transform is NULL!");
}
foreach (var child in Owner)
{
Debug.Log(child.Name);
}
originalScale = Transform.LocalScale.z;
}
protected override void update()
{
//rotation += RotateSpeed * 0.16;
//scale += ScaleSpeed * 0.16;
//Transform.LocalRotation = new Vector3(0.0f, rotation, 0.0f);
//Transform.LocalScale = new Vector3(System.Math.Abs(System.Math.Sin(scale.x)) * originalScale, System.Math.Abs(System.Math.Cos(scale.y)) * originalScale, System.Math.Abs(System.Math.Sin(scale.z)) * originalScale);
}
protected override void onDrawGizmos()
{
Gizmos.DrawLine(new Vector3(-1.0f, 0.0f, 0.0f), new Vector3(1.0f, 0.0f, 0.0f));
Gizmos.DrawLine(new Vector3(-1.0f, 1.0f, 0.0f), new Vector3(1.0f, 1.0f, 0.0f), Color.Red);
}
}

View File

@ -1,3 +0,0 @@
Name: RaccoonShowcase
ID: 159969631
Type: 9

View File

@ -1,32 +0,0 @@
using SHADE;
using System;
public class RaccoonSpin : Script
{
[SerializeField]
[Tooltip("Speed of the rotation in radians per second.")]
private float RotateSpeed = 1.0f;
private float rotation = 0.0f;
[SerializeField]
private CallbackEvent emptyEvent;
[SerializeField]
private CallbackEvent<int> testEvent;
[SerializeField]
private CallbackEvent<int, double, Vector3> testEvent3 = new CallbackEvent<int, double, Vector3>();
private Transform Transform;
protected override void awake()
{
emptyEvent = new CallbackEvent();
emptyEvent.RegisterAction(() => Debug.Log("Empty event action!"));
testEvent = new CallbackEvent<int>();
Action<int> action = (x) => Debug.Log($"{x}");
testEvent.RegisterAction(action);
Transform = GetComponent<Transform>();
if (Transform == null)
{
Debug.LogError("Transform is NULL!");
}
}
}

View File

@ -1,3 +0,0 @@
Name: RaccoonSpin
ID: 157367824
Type: 9

View File

@ -1,3 +0,0 @@
Name: SC_JumpPad
ID: 167326885
Type: 9

View File

@ -1,37 +0,0 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting
{
public class StaticTest
{
public static int x;
static StaticTest()
{
x = 5;
Debug.Log("Static Constructor!");
}
}
public class ImplicitStaticTest : Script
{
public static int x = 5;
static ImplicitStaticTest()
{
Debug.Log("Static Constructor!");
}
protected override void awake()
{
Debug.LogWarning($"Before Add: x = {x}");
++x;
Debug.LogWarning($"After Add: x = {x}");
}
}
}

View File

@ -1,3 +0,0 @@
Name: StaticTest
ID: 159057282
Type: 9

View File

@ -1,103 +1,111 @@
using System;
using SHADE_Scripting.Audio;
using SHADE;
namespace SHADE_Scripting.UI
public class StealFoodPopUp : Script
{
public class StealFoodPopUp : Script
[NonSerialized]
private TweenThread rot;
[NonSerialized]
private TweenThread scaleX;
[NonSerialized]
private TweenThread scaleY;
[NonSerialized]
private TweenThread scaleOutX;
[NonSerialized]
private TweenThread scaleOutY;
private Transform tran;
public float popInDuration = 0.3f;
public float popOutDuration = 0.3f;
public float stayDuration = 1.0f;
public float rotationAmt = 1800;
public float scaleAmtX = 538;
public float scaleAmtY = 377;
private bool popInDone = false;
private bool stayDone = false;
private bool createThreadOnce = true;
private float timer = 0;
private bool playAudio = true;
protected override void start()
{
[NonSerialized]
private TweenThread rot;
[NonSerialized]
private TweenThread scaleX;
[NonSerialized]
private TweenThread scaleY;
[NonSerialized]
private TweenThread scaleOutX;
[NonSerialized]
private TweenThread scaleOutY;
rot = TweenManager.CreateTweenThread(popInDuration, 0, rotationAmt, EASING_METHOD.EASE_IN_SINE);
scaleX = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtX, EASING_METHOD.EASE_IN_SINE);
scaleY = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtY, EASING_METHOD.EASE_IN_SINE);
private Transform tran;
public float popInDuration = 0.3f;
public float popOutDuration = 0.3f;
public float stayDuration = 1.0f;
public float rotationAmt = 1800;
public float scaleAmtX = 538;
public float scaleAmtY = 377;
private bool popInDone = false;
private bool stayDone = false;
private bool createThreadOnce = true;
private float timer = 0;
protected override void start()
tran = GetComponent<Transform>();
if (!tran)
Debug.LogError("Missing Transform");
else
{
rot = TweenManager.CreateTweenThread(popInDuration, 0, rotationAmt, EASING_METHOD.EASE_IN_SINE);
scaleX = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtX, EASING_METHOD.EASE_IN_SINE);
scaleY = TweenManager.CreateTweenThread(popInDuration, 0, scaleAmtY, EASING_METHOD.EASE_IN_SINE);
tran = GetComponent<Transform>();
if (!tran)
Debug.LogError("Missing Transform");
else
{
tran.LocalScale = new Vector3(0.0f,0.0f,1.0f);
tran.LocalEulerAngles = new Vector3(0.0f,0.0f,0.0f);
}
}
//538x377
protected override void update()
{
if (!GameManager.Instance.PreviewLevelDone)
{
if (rot != null && scaleX != null && scaleY != null)
{
rot.Reset();
scaleX.Reset();
scaleY.Reset();
}
return;
}
if (!popInDone && rot != null && scaleX != null && scaleY != null)
{
tran.LocalEulerAngles = new Vector3(0.0f, 0.0f, SHADE.Math.DegreesToRadians(rot.GetValue()));
tran.LocalScale = new Vector3(scaleX.GetValue(), scaleY.GetValue(), 1);
}
else
{
timer += Time.DeltaTimeF;
if (timer >= stayDuration)
stayDone = true;
}
if (rot != null && scaleX != null && scaleY != null && rot.IsCompleted() && scaleX.IsCompleted() && scaleY.IsCompleted())
popInDone = true;
if (stayDone)
{
if (createThreadOnce)
{
scaleOutX = TweenManager.CreateTweenThread(popOutDuration, scaleAmtX, 0, EASING_METHOD.EASE_IN_SINE);
scaleOutY = TweenManager.CreateTweenThread(popOutDuration, scaleAmtY, 0, EASING_METHOD.EASE_IN_SINE);
createThreadOnce = false;
}
if(scaleOutX != null && scaleOutY != null)
tran.LocalScale = new Vector3(scaleOutX.GetValue(), scaleOutY.GetValue(), 1);
if (scaleOutX != null && scaleOutY != null && scaleOutX.IsCompleted() && scaleOutY.IsCompleted())
{
GameObject.SetActive(false);
GameManager.Instance.stealFoodPopUpDone = true;
}
}
tran.LocalScale = new Vector3(0.0f, 0.0f, 1.0f);
tran.LocalEulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
}
AudioHandler.audioClipHandlers["StealFood"] = Audio.CreateAudioClip("event:/UI/spin_in");
}
protected override void update()
{
if (!GameManager.Instance.PreviewLevelDone)
{
if (rot != null && scaleX != null && scaleY != null)
{
rot.Reset();
scaleX.Reset();
scaleY.Reset();
}
return;
}
if (playAudio)
{
AudioHandler.audioClipHandlers["StealFood"].Play();
playAudio = false;
}
if (!popInDone && rot != null && scaleX != null && scaleY != null)
{
tran.LocalEulerAngles = new Vector3(0.0f, 0.0f, SHADE.Math.DegreesToRadians(rot.GetValue()));
tran.LocalScale = new Vector3(scaleX.GetValue(), scaleY.GetValue(), 1);
}
else
{
timer += Time.DeltaTimeF;
if (timer >= stayDuration)
stayDone = true;
}
if (rot != null && scaleX != null && scaleY != null && rot.IsCompleted() && scaleX.IsCompleted() && scaleY.IsCompleted())
popInDone = true;
if (stayDone)
{
if (createThreadOnce)
{
scaleOutX = TweenManager.CreateTweenThread(popOutDuration, scaleAmtX, 0, EASING_METHOD.EASE_IN_SINE);
scaleOutY = TweenManager.CreateTweenThread(popOutDuration, scaleAmtY, 0, EASING_METHOD.EASE_IN_SINE);
createThreadOnce = false;
}
if (scaleOutX != null && scaleOutY != null)
tran.LocalScale = new Vector3(scaleOutX.GetValue(), scaleOutY.GetValue(), 1);
if (scaleOutX != null && scaleOutY != null && scaleOutX.IsCompleted() && scaleOutY.IsCompleted())
{
GameObject.SetActive(false);
GameManager.Instance.stealFoodPopUpDone = true;
}
}
}
}

View File

@ -8,7 +8,7 @@ static public class Settings
{
static public float cameraSensitivity = 100.0f;
static public float cameraFOV = 45.0f;
static public float cameraFOV = 60.0f;
static public float masterVolume = 100.0f;
static public float sfxVolume = 100.0f;

View File

@ -1,24 +1,32 @@
#version 450
#define PI 3.14159265f
layout(local_size_x = 128) in;
struct EmitterParameters
{
vec4 angularMin;
vec4 angularMax;
vec4 angularRangesAndOffsets;
float minSpeed;
float maxSpeed;
float rotationSpeed;
float rotationDecay;
vec4 lifeAndSizeRange; // min life, max life, min size, max size
}
float sizeDecay;
uint textureIndex;
float padding[2];
};
struct ParticleData
{
vec4 position;
vec4 rotation;
vec4 orientationSpeedDecay;
vec4 velocity;
vec4 acceleration;
vec4 scaleAndDecay;
float life;
uint textureIndex;
}
};
struct GenericData
{
@ -96,22 +104,86 @@ float rand(inout uint state)
return float(x)*uintBitsToFloat(0x2f800004u);
}
float map(float value, float inMin, float inMax, float outMin, float outMax)
{
return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin);
}
void main()
{
uint emitterInvocationIndex = gl_GlobalInvocationID.x;
vec4 emitterPosition = emitterPushConstant.emitterPosition;
vec4 angularRangesAndOffsets = emitterParams.data.angularRangesAndOffsets;
float minSpeed = emitterParams.data.minSpeed;
float maxSpeed = emitterParams.data.maxSpeed;
if (emitterInvocationIndex >= emitterPushConstant.emissionCount)
return;
// Freecount will start at max particles. Here we subtract every time we emit.
int freelistIndex = atomicAdd (freelist.freeCount, -1) - 1;
if (freelistIndex < 0)
atomicAdd (freelist.freeCount, 1);
ParticleData particle;
int index = freelist.freeIndices[freelistIndex];
particle.position = emitterPosition;
particle.life = emitterParams.10.0f;
// Get seed for randomization
uint pixel_index = uint (emitterPosition.x + emitterPosition.y + floatBitsToUint(genericDataBuffer.data.elapsedTime) * (gl_GlobalInvocationID.x + 1));
uint seed = pcg_hash (pixel_index);
particles[index] = particle;
int index = freelist.freeIndices[freelistIndex];
// emit particle from emitter position
particle.position = vec4 (emitterPosition.xyz, 1.0f);
vec2 eulerAngles = vec2 (rand(seed) * angularRangesAndOffsets.x + angularRangesAndOffsets.z,
rand(seed) * angularRangesAndOffsets.y + angularRangesAndOffsets.w);
// Set its velocity
// particle.velocity.xyz = vec3 (cos(eulerAngles.x) * cos(eulerAngles.y),
// sin(eulerAngles.x) * cos(eulerAngles.y),
// sin(eulerAngles.y));
float bank = eulerAngles.y;
float cb = cos(bank);
float sb = sin(bank);
float ch = cos (eulerAngles.x);
float sh = sin (eulerAngles.x);
float cp = cos (0.0f);
float sp = sin (0.0f);
particle.velocity.xyz = mat3 (
(ch * cb + sh * sp * sb), (sb * cp), (-sh * cb + ch * sp * sb),
(-ch * sb + sh * sp * cb), (cb * cp), ( sb * sh + ch * sp * cb),
(sh * cp), (-sp), (ch * cp)
) * vec3 (1.0f, 0.0f, 0.0f);
particle.velocity *= map (rand (seed), 0.0f, 1.0f, minSpeed.x, maxSpeed.x);
// randomize life value that ranges from minLife to maxLife
particle.life = map (rand(seed), 0.0f, 1.0f, emitterParams.data.lifeAndSizeRange.x, emitterParams.data.lifeAndSizeRange.y);
float particleSize = map (rand(seed), 0.0f, 1.0f, emitterParams.data.lifeAndSizeRange.z, emitterParams.data.lifeAndSizeRange.w);
// Set size of particle
particle.scaleAndDecay.x = particleSize;
particle.scaleAndDecay.y = particleSize;
particle.scaleAndDecay.z = emitterParams.data.sizeDecay;
particle.scaleAndDecay.w = emitterParams.data.sizeDecay;
// Set the texture for the particle
particle.textureIndex = emitterParams.data.textureIndex;
// Set orientation and rotation speed
if (emitterParams.data.rotationSpeed != 0.0f)
particle.orientationSpeedDecay = vec4 (rand(seed) * PI, emitterParams.data.rotationSpeed, emitterParams.data.rotationDecay, 0.0f);
else
particle.orientationSpeedDecay = vec4 (0.0f);
particle.acceleration = vec4 (0.0f, -0.058f, 0.0f, 0.0f);
inputParticles.data[index] = particle;
}

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: ParticleEmit_CS
ID: 49959611
Type: 2

View File

@ -0,0 +1,146 @@
#version 450
layout(local_size_x = 128) in;
struct DrawArraysIndirectArgs
{
uint count;
uint instanceCount;
uint first;
uint baseInstance;
};
struct ParticleData
{
vec4 position;
vec4 orientationSpeedDecay;
vec4 velocity;
vec4 acceleration;
vec4 scaleAndDecay;
float life;
uint textureIndex;
};
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(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;
layout (std430, set = 2, binding = 1) coherent restrict readonly buffer ParticlesInputBuffer
{
ParticleData data[];
} inputParticles;
// output buffer not needed
layout (std430, set = 2, binding = 2) coherent restrict buffer ParticlesOutputBuffer
{
ParticleData data[];
} outputParticles;
layout (std430, set = 2, binding = 3) coherent restrict buffer ParticlesFreelistBuffer
{
int freeCount;
int freeIndices[];
} freelist;
layout (std430, set = 2, binding = 4) coherent restrict buffer IndicesData
{
uint indices[];
};
layout (std140, set = 2, binding = 5) coherent restrict buffer IndirectDrawArgs
{
DrawArraysIndirectArgs indirectArgs;
};
// push constants
layout(std140, push_constant) uniform EmitterPushConstant
{
vec4 emitterPosition;
uint emissionCount;
} emitterPushConstant;
uint pcg_hash(uint seed)
{
uint state = seed * 747796405u + 2891336453u;
uint word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u;
return (word >> 22u) ^ word;
}
// Used to advance the PCG state.
uint rand_pcg(inout uint rng_state)
{
uint state = rng_state;
rng_state = rng_state * 747796405u + 2891336453u;
uint word = ((state >> ((state >> 28u) + 4u)) ^ state) * 277803737u;
return (word >> 22u) ^ word;
}
// Advances the prng state and returns the corresponding random float.
float rand(inout uint state)
{
uint x = rand_pcg(state);
state = x;
return float(x)*uintBitsToFloat(0x2f800004u);
}
void main()
{
uint index = gl_GlobalInvocationID.x;
ParticleData particle = inputParticles.data[index];
// Get seed for randomization
uint pixel_index = uint (particle.position.x + particle.position.y + floatBitsToUint(genericDataBuffer.data.elapsedTime) * (gl_GlobalInvocationID.x + 1));
uint seed = pcg_hash (pixel_index);
if (particle.life > 0.0f)
{
// update position from velocity
particle.position += particle.velocity * genericDataBuffer.data.dt;
particle.velocity += vec4 (rand(seed) * particle.acceleration.x, rand(seed) * particle.acceleration.y, rand(seed) * particle.acceleration.z, 1.0f);
particle.life -= genericDataBuffer.data.dt;
if (particle.life < 0.0f || particle.scaleAndDecay.x < 0.0f || particle.scaleAndDecay.y < 0.0f)
{
particle.life = 0.0f;
particle.position.x = 9999.0f;
outputParticles.data[index] = particle;
freelist.freeIndices[atomicAdd(freelist.freeCount, 1)] = int (index);
return;
}
uint drawIndex = atomicAdd (indirectArgs.instanceCount, 1);
indices[drawIndex] = index;
}
outputParticles.data[index] = particle;
}

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: ParticleUpdateRandomAcc_CS
ID: 35838633
Type: 2

View File

@ -13,13 +13,13 @@ struct DrawArraysIndirectArgs
struct ParticleData
{
vec4 position;
vec4 rotation;
vec4 orientationSpeedDecay;
vec4 velocity;
vec4 acceleration;
vec4 scaleAndDecay;
float life;
uint textureIndex;
}
};
struct GenericData
{
@ -73,10 +73,10 @@ layout (std430, set = 2, binding = 4) coherent restrict buffer IndicesData
uint indices[];
};
layout (std140, set = 2, binding = 5) coherent restrict uniform IndirectDrawArgs
layout (std140, set = 2, binding = 5) coherent restrict buffer IndirectDrawArgs
{
DrawArraysIndirectArgs indirectArgs;
};
};
// push constants
layout(std140, push_constant) uniform EmitterPushConstant
@ -116,26 +116,37 @@ void main()
ParticleData particle = inputParticles.data[index];
if (particle.lifetime > 0.0f)
if (particle.life > 0.0f)
{
// particle.position += particle.velocity * dt;
// update position from velocity
particle.position += particle.velocity * genericDataBuffer.data.dt;
particle.velocity += particle.acceleration;
particle.life -= genericDataBuffer.data.dt;
particle.orientationSpeedDecay.x += particle.orientationSpeedDecay.y;
particle.scaleAndDecay.x *= particle.scaleAndDecay.z;
particle.scaleAndDecay.y *= particle.scaleAndDecay.w;
// particle.lifetime -= dt;
// particle.size -= 1.2f * dt;
// particle.color += 1.0f * dt;
if (particle.lifetime < 0.0f || particle.size < 0.0f)
if (particle.orientationSpeedDecay.y > 0.0f)
{
particle.lifetime = 0.0f;
particle.position.x = 99999.0f;
particle.orientationSpeedDecay.y -= particle.orientationSpeedDecay.z * genericDataBuffer.data.dt;
if (particle.orientationSpeedDecay.y < 0.0f)
particle.orientationSpeedDecay.y = 0.0f;
}
if (particle.life < 0.0f || particle.scaleAndDecay.x < 0.0f || particle.scaleAndDecay.y < 0.0f)
{
particle.life = 0.0f;
particle.position.x = 9999.0f;
outputParticles.data[index] = particle;
freelist.freeIndices[atomicAdd(freelist.freeCount, 1)] = int (index);
return;
}
outputParticles.data[index] = particle;
uint drawIndex = atomicAdd (indirectArgs.instanceCount, 1);
indices[drawIndex] = index;
}
outputParticles.data[index] = particle;
}

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: ParticleUpdate_CS
ID: 36260925
Type: 2

View File

@ -0,0 +1,26 @@
#version 460 core
#extension GL_EXT_nonuniform_qualifier : require
layout (location = 0) out vec4 fragColor;
layout (set = 0, binding = 1) uniform sampler2D textures[]; // for textures (global)
// between shader stages
layout(location = 0) in struct
{
vec2 uv; // location = 0
} In;
// material stuff
layout(location = 1) flat in struct
{
uint textureIndex;
} InFlat;
void main ()
{
fragColor = vec4 (texture(textures [nonuniformEXT(InFlat.textureIndex)], In.uv));
if (fragColor.a < 0.01f)
discard;
}

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: Particle_FS
ID: 42509714
Type: 2

View File

@ -0,0 +1,101 @@
#version 460 core
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;
};
struct ParticleData
{
vec4 position;
vec4 orientationSpeedDecay;
vec4 velocity;
vec4 acceleration;
vec4 scaleAndDecay;
float life;
uint textureIndex;
};
layout (set = 0, binding = 0) uniform GenericDataBuffer
{
GenericData data;
} genericDataBuffer;
layout(set = 1, binding = 0) uniform CameraData
{
vec4 position;
mat4 vpMat;
mat4 viewMat;
mat4 projMat;
} cameraData;
// output buffer not needed
layout (std430, set = 2, binding = 2) coherent restrict buffer ParticlesOutputBuffer
{
ParticleData data[];
} outputParticles;
layout (std430, set = 2, binding = 4) coherent restrict buffer IndicesData
{
uint indices[];
};
// between shader stages
layout(location = 0) out struct
{
vec2 uv; // location = 0
} Out;
// material stuff
layout(location = 1) out struct
{
uint textureIndex; // location = 1
} OutFlat;
vec2 CreateQuad (in uint vertexID)
{
uint b = 1 << vertexID;
return vec2 ((0x3 & b) != 0, (0x9 & b) != 0);
}
void main()
{
// Create a quad and its texture coordinates
Out.uv = CreateQuad (gl_VertexIndex);
vec3 vertexPos = vec3 (Out.uv - vec2(0.5f), 0.0f);
ParticleData particle = outputParticles.data[indices[gl_InstanceIndex]];
vec3 normalized = normalize (particle.velocity.xyz);
float angle = particle.orientationSpeedDecay.x;
// float angle = atan (normalized.y, normalized.x);
vec2 particleScaleData = particle.scaleAndDecay.xy; // x and y
mat3 rotate = mat3 (1.0f);
rotate[0][0] = cos(angle);
rotate[0][1] = sin(angle);
rotate[1][0] = -sin(angle);
rotate[1][1] = cos(angle);
vec3 particlePos = rotate * vertexPos;
vec3 viewRight = normalize (vec3 (cameraData.viewMat[0][0], cameraData.viewMat[1][0], cameraData.viewMat[2][0]));
vec3 viewUp = normalize(vec3 (cameraData.viewMat[0][1], cameraData.viewMat[1][1], cameraData.viewMat[2][1]));
particlePos = particle.position.xyz + (viewRight * particlePos.x * particleScaleData.x) + (viewUp * particlePos.y * particleScaleData.y);
OutFlat.textureIndex = particle.textureIndex;
gl_Position = cameraData.vpMat * vec4(particlePos, 1.0f);
}

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