diff --git a/Assets/Materials/UI/UIMat_MainMenu.shmat b/Assets/Materials/UI/UIMat_MainMenu.shmat index 30ec7fd5..8aefe36e 100644 --- a/Assets/Materials/UI/UIMat_MainMenu.shmat +++ b/Assets/Materials/UI/UIMat_MainMenu.shmat @@ -3,6 +3,6 @@ SubPass: UI Properties: data.color: {x: 1, y: 1, z: 1, w: 1} - data.textureIndex: 56004904 + data.textureIndex: 58181851 data.alpha: 1 data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_MenuBG.shmat b/Assets/Materials/UIMat_MenuBG.shmat deleted file mode 100644 index b35277f5..00000000 --- a/Assets/Materials/UIMat_MenuBG.shmat +++ /dev/null @@ -1,8 +0,0 @@ -- VertexShader: 46580970 - FragmentShader: 35983630 - SubPass: UI - Properties: - data.color: {x: 1, y: 1, z: 1, w: 1} - data.textureIndex: 60776650 - data.alpha: 1 - data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Materials/UIMat_MenuBG.shmat.shmeta b/Assets/Materials/UIMat_MenuBG.shmat.shmeta deleted file mode 100644 index 2dc79f2e..00000000 --- a/Assets/Materials/UIMat_MenuBG.shmat.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: UIMat_MenuBG -ID: 130823048 -Type: 7 diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index c64dde4e..fbb6ba1c 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -6842,7 +6842,6 @@ timer: 200 scoreText: 237 timeText: 525 - minusTimerText: 65735 multiplierText: 524 maxMultiplierDuration: 5 maxMultiplierCombo: 10 @@ -7125,7 +7124,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -2.50000072, y: 0.799999893, z: -4.28408909} + Translate: {x: -2.51287055, y: 0.799999893, z: -4.28408909} Rotate: {x: -5.83341553e-08, y: 7.48974247e-14, z: 1.10461471e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true @@ -8045,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. @@ -8063,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 @@ -8072,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. @@ -8111,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 @@ -8169,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 @@ -8191,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 @@ -8204,4 +8178,75 @@ Hovered: false Clicked: false IsActive: true - Scripts: ~ \ No newline at end of file + Scripts: ~ +- EID: 523 + Name: Mesh_Apple + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -7.29431438, y: 1.17736602, z: -4.53253984} + Rotate: {x: -5.83341553e-08, y: 7.48974247e-14, z: 1.10461471e-08} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 144128170 + Material: 122370915 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Gravity Scale: 1 + Use Gravity: true + Interpolate: false + 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 + Collision Tag: 2 + Type: Box + Half Extents: {x: 0.200000003, y: 0.200000003, 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 + classSHADE::SHParticleEmitterComponent: + Emission Count: 4 + Is Passive: false + Emission Interval: 0 + Min Life: 1 + Max Life: 2 + Minimum Speed: 1 + Maximum Speed: 1.5 + Minimum Size: 0 + Maximum Size: 0.075000003 + Size Decay: 0.907999992 + Angular Ranges And Offset: {x: 6.19999981, y: 3.1400001, z: 0, w: 1.70000005} + Rotation Speed: 0.805999994 + Rotation Decay: 0 + Texture Asset ID: 0 + Custom Update Shader Asset ID: 0 + Color Tint: {x: 0.470701218, y: 0.559471369, z: 0.283432603, w: 1} + Acceleration: {x: 0, y: -0.0390000008, z: 0} + IsActive: true + Scripts: + - Type: Item + Enabled: true + Score: 10 + currCategory: 0 + density: 1 + dontReturn: false + soundDistance: 10 + highlightSpeed: 200 + highlightThickness: 60 + highlightLowerClamp: 0.25 \ No newline at end of file diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index 1cae00e9..ee82e785 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -2878,9 +2878,8 @@ Score: 0 timer: 200 scoreText: 237 - timeText: 131278 - minusTimerText: 131211 - multiplierText: 66055 + timeText: 66057 + multiplierText: 65675 maxMultiplierDuration: 5 maxMultiplierCombo: 10 multiplierFont: 60 @@ -14825,7 +14824,7 @@ FOV: 90 IsActive: true Scripts: ~ -- EID: 131271 +- EID: 65735 Name: Gameplay Canvas IsActive: true NumberOfChildren: 4 @@ -14842,9 +14841,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. @@ -14853,28 +14852,28 @@ Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: - Canvas ID: 131271 + Canvas ID: 65735 Hovered: false Clicked: false IsActive: true Scripts: - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning Enabled: true - offsetPerDigit: 25 + offsetPerDigit: 30 - Type: SHADE_Scripting.UI.SingleScaleBounce Enabled: true durationUp: 0.150000006 durationDown: 0.300000012 scaleSize: 1.20000005 -- EID: 131278 +- EID: 66057 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. @@ -14883,7 +14882,7 @@ Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: - Canvas ID: 131271 + Canvas ID: 65735 Hovered: false Clicked: false IsActive: true @@ -14903,45 +14902,20 @@ Material: 126220632 IsActive: true UI Component: - Canvas ID: 131271 + Canvas ID: 65735 Hovered: false Clicked: false IsActive: true Scripts: ~ -- EID: 131211 - 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: 131271 - Hovered: false - Clicked: false - IsActive: false - Scripts: - - Type: SHADE_Scripting.UI.MinusTimerText - Enabled: true - duration: 2 -- EID: 66055 +- EID: 65675 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 @@ -14950,7 +14924,7 @@ Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: - Canvas ID: 131271 + Canvas ID: 65735 Hovered: false Clicked: false IsActive: true @@ -14960,13 +14934,13 @@ maxSize: 1 minSize: 0.300000012 minAlpha: 0.300000012 -- EID: 131593 +- EID: 519 Name: Multiplier BG IsActive: true 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 @@ -14975,29 +14949,29 @@ Material: 133784677 IsActive: true UI Component: - Canvas ID: 131271 + Canvas ID: 65735 Hovered: false Clicked: false IsActive: true Scripts: - Type: FixRotation Enabled: true -- EID: 568 +- EID: 65742 Name: Score BG IsActive: true 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 Material: 127527215 IsActive: true UI Component: - Canvas ID: 131271 + Canvas ID: 65735 Hovered: false Clicked: false IsActive: true diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index 7b3c8319..d7b5a026 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -8657,18 +8657,18 @@ Scripts: ~ - EID: 542 Name: ====AI===== - IsActive: true + IsActive: false NumberOfChildren: 0 Components: Transform Component: Translate: {x: 0.892607987, y: 0, z: 1.50168896} Rotate: {x: -0, y: 0, z: -0} Scale: {x: 1, y: 1, z: 1} - IsActive: true + IsActive: false Renderable Component: Mesh: 140697366 Material: 129495479 - IsActive: true + IsActive: false RigidBody Component: Type: Dynamic Drag: 0.00999999978 @@ -8683,7 +8683,7 @@ Freeze Rotation X: true Freeze Rotation Y: false Freeze Rotation Z: true - IsActive: true + IsActive: false Collider Component: Colliders: - Is Trigger: false @@ -8695,7 +8695,7 @@ Density: 1 Position Offset: {x: 0, y: 0.899999976, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} - IsActive: true + IsActive: false Scripts: - Type: Homeowner1 Enabled: true @@ -8814,6 +8814,158 @@ Scale: {x: 1, y: 1, z: 1} IsActive: true Scripts: ~ +- EID: 526 + Name: Gameplay Canvas + IsActive: true + NumberOfChildren: 4 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 237 + Name: Score Text + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -775, y: 325, z: 0.600000024} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 120, y: 120, z: 1} + IsActive: true + Text Renderer Component: + Text: My name is Brandon. + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 526 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning + Enabled: true + offsetPerDigit: 30 + - Type: SHADE_Scripting.UI.SingleScaleBounce + Enabled: true + durationUp: 0.150000006 + durationDown: 0.300000012 + scaleSize: 1.20000005 +- EID: 525 + Name: Timer Text + IsActive: true + NumberOfChildren: 1 + Components: + Transform Component: + Translate: {x: 650, y: 350, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 85, y: 85, z: 1} + IsActive: true + Text Renderer Component: + Text: My name is Brandon. + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 526 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 520 + Name: Timer BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0.5, y: 0.300000012, z: 0.98999995} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 5, y: 2, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 126220632 + IsActive: true + UI Component: + Canvas ID: 526 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ +- EID: 524 + Name: Multiplier Text + IsActive: true + NumberOfChildren: 1 + Components: + Transform Component: + Translate: {x: -800, y: 175, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 80, y: 80, z: 1} + IsActive: true + Text Renderer Component: + Text: X2 + Font: 174412429 + Color: {x: 1, y: 1, z: 1, w: 1} + Text Size: {x: 1, y: 1, z: 1} + IsActive: true + UI Component: + Canvas ID: 526 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.MultiplierTextFx + Enabled: true + maxSize: 1 + minSize: 0.300000012 + minAlpha: 0.300000012 +- EID: 519 + Name: Multiplier BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + 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 + Renderable Component: + Mesh: 141771688 + Material: 133784677 + IsActive: true + UI Component: + Canvas ID: 526 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: FixRotation + Enabled: true +- EID: 521 + Name: Score BG + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -740, y: 400, z: 59.9999962} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 414, y: 240, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 127527215 + IsActive: true + UI Component: + Canvas ID: 526 + Hovered: false + Clicked: false + IsActive: true + Scripts: ~ - EID: 238 Name: ====GameManager==== IsActive: true @@ -8830,7 +8982,6 @@ timer: 200 scoreText: 237 timeText: 525 - minusTimerText: 524 multiplierText: 524 maxMultiplierDuration: 5 maxMultiplierCombo: 10 @@ -14624,181 +14775,4 @@ Position Offset: {x: 0, y: 0.200000003, z: 0} Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true - Scripts: ~ -- EID: 526 - Name: Gameplay Canvas - IsActive: true - NumberOfChildren: 4 - Components: - Canvas Component: - Canvas Width: 1920 - Canvas Height: 1080 - Scale by canvas width: false - IsActive: true - Scripts: ~ -- EID: 237 - Name: Score Text - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -800, y: 365, z: 0.600000024} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 100, y: 100, z: 60} - IsActive: true - Text Renderer Component: - Text: My name is Brandon. - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.ScoreTextDigitPositioning - Enabled: true - offsetPerDigit: 25 - - Type: SHADE_Scripting.UI.SingleScaleBounce - Enabled: true - durationUp: 0.150000006 - durationDown: 0.300000012 - scaleSize: 1.20000005 -- EID: 525 - Name: Timer Text - IsActive: true - NumberOfChildren: 2 - Components: - Transform Component: - Translate: {x: 700, y: 400, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 60, y: 60, z: 1} - IsActive: true - Text Renderer Component: - Text: My name is Brandon. - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 520 - Name: Timer BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.5, y: 0.300000012, z: 0.98999995} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 5, y: 2, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 126220632 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 524 - 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: 521 - Name: Multiplier Text - IsActive: true - NumberOfChildren: 1 - Components: - Transform Component: - Translate: {x: -800, y: 250, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 50, y: 50, z: 60} - IsActive: true - Text Renderer Component: - Text: X2 - Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} - Text Size: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.MultiplierTextFx - Enabled: true - maxSize: 1 - minSize: 0.300000012 - minAlpha: 0.300000012 -- EID: 519 - Name: Multiplier BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0.400000006, y: 0.400000006, z: 0.98999995} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 4.26499987, y: 2, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 133784677 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: FixRotation - Enabled: true -- EID: 599 - Name: Score BG - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -770, y: 425, z: 59.9999962} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 345.600006, y: 200, z: 60} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 127527215 - IsActive: true - UI Component: - Canvas ID: 526 - Hovered: false - Clicked: false - IsActive: true Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 9de5cb3d..1ea16fb5 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -35,9 +35,9 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 100, z: 0.300000012} + Translate: {x: -700, y: 350, z: 0.300000012} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 600, y: 600, z: 1.18585491} + Scale: {x: 355.756439, y: 355.756439, z: 1.18585491} IsActive: true Renderable Component: Mesh: 141771688 @@ -60,9 +60,9 @@ NumberOfChildren: 6 Components: Transform Component: - Translate: {x: 0, y: -400, z: 0} + Translate: {x: -60, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 0.800000012, y: 0.800000012, z: 1} + Scale: {x: 0.899999976, y: 0.899999976, z: 1} IsActive: true UI Component: Canvas ID: 0 @@ -76,9 +76,9 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 0.400000006} + Translate: {x: -700, y: 100, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 450, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -95,6 +95,9 @@ Clicked: false IsActive: true Scripts: + - Type: ChangeSceneButton + Enabled: true + sceneID: 91947920 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true onHoverEnterSound: event:/UI/botton_hover @@ -103,18 +106,15 @@ onReleaseSound: event:/UI/button_fail hoverScale: 1.10000002 clickScale: 0.899999976 - - Type: SHADE_Scripting.UI.ChangeCanvasButton - Enabled: true - canvasToActivate: 50 - EID: 6 Name: Quit Game Button IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 900, y: 0, z: 0.400000006} + Translate: {x: -700, y: -525, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 450, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -143,28 +143,28 @@ clickScale: 0.899999976 - EID: 7 Name: Level Select Button - IsActive: false + IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 0.400000006} + Translate: {x: -700, y: -25, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} - IsActive: false + Scale: {x: 450, y: 100, z: 1} + IsActive: true Renderable Component: Mesh: 141771688 Material: 129340704 - IsActive: false + IsActive: true Button Component: Default Texture: 66852025 Hovered Texture: 65992947 Clicked Texture: 57197441 - IsActive: false + IsActive: true UI Component: Canvas ID: 0 Hovered: false Clicked: false - IsActive: false + IsActive: true Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true @@ -183,9 +183,9 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -450, y: 0, z: 0.400000006} + Translate: {x: -700, y: -150, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 450, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -219,9 +219,9 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: -900, y: 0, z: 0.400000006} + Translate: {x: -700, y: -275, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 450, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -255,9 +255,9 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 450, y: 0, z: 0.400000006} + Translate: {x: -700, y: -400, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 400, y: 100, z: 1} + Scale: {x: 450, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -343,7 +343,7 @@ - EID: 13 Name: How To Play Canvas IsActive: false - NumberOfChildren: 6 + NumberOfChildren: 5 Components: Canvas Component: Canvas Width: 1920 @@ -479,17 +479,17 @@ Components: Transform Component: Translate: {x: -800, y: 450, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 273, y: 100, z: 1} + Rotate: {x: 0, y: 0, z: 3.14159274} + Scale: {x: 100, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 Material: 129340704 IsActive: true Button Component: - Default Texture: 59813125 - Hovered Texture: 59813125 - Clicked Texture: 59813125 + Default Texture: 55358401 + Hovered Texture: 59400474 + Clicked Texture: 52333376 IsActive: true UI Component: Canvas ID: 13 @@ -508,40 +508,24 @@ onReleaseSound: event:/UI/button_fail hoverScale: 1.10000002 clickScale: 0.899999976 -- EID: 444 - Name: SubMenuBackGround - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 2} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1920, y: 1080, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 130823048 - IsActive: true - UI Component: - Canvas ID: 13 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.FadeInOnActive - Enabled: true - alpha: 0 - EID: 19 Name: Options Canvas IsActive: false - NumberOfChildren: 12 + NumberOfChildren: 11 Components: Canvas Component: Canvas Width: 1920 Canvas Height: 1080 Scale by canvas width: false IsActive: false - Scripts: ~ + Scripts: + - Type: SHADE_Scripting.UI.Options + Enabled: true + masterVolSlider: 29 + sfxVolSlider: 30 + bgmVolSlider: 31 + fovSlider: 37 + sensitivitySlider: 38 - EID: 20 Name: BackGround IsActive: true @@ -569,17 +553,17 @@ Components: Transform Component: Translate: {x: -800, y: 450, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 273, y: 100, z: 1} + Rotate: {x: 0, y: 0, z: 3.14159274} + Scale: {x: 100, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 Material: 129340704 IsActive: true Button Component: - Default Texture: 59813125 - Hovered Texture: 59813125 - Clicked Texture: 59813125 + Default Texture: 55358401 + Hovered Texture: 59400474 + Clicked Texture: 52333376 IsActive: true UI Component: Canvas ID: 19 @@ -1214,29 +1198,6 @@ - Type: SHADE_Scripting.UI.SliderText Enabled: true sliderObj: 38 -- EID: 443 - Name: SubMenuBackGround - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 1} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1920, y: 1080, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 130823048 - IsActive: true - UI Component: - Canvas ID: 19 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.FadeInOnActive - Enabled: true - alpha: 0 - EID: 46 Name: Credits Canvas IsActive: false @@ -1270,8 +1231,8 @@ Scripts: - Type: SHADE_Scripting.UI.ScrollingCredits Enabled: true - endY: 4500 - duration: 32 + endY: 4000 + duration: 20 - EID: 48 Name: BackButton IsActive: true @@ -1279,17 +1240,17 @@ Components: Transform Component: Translate: {x: -800, y: 450, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 273, y: 100, z: 1} + Rotate: {x: 0, y: 0, z: 3.14159274} + Scale: {x: 100, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 Material: 129340704 IsActive: true Button Component: - Default Texture: 59813125 - Hovered Texture: 59813125 - Clicked Texture: 59813125 + Default Texture: 55358401 + Hovered Texture: 59400474 + Clicked Texture: 52333376 IsActive: true UI Component: Canvas ID: 46 @@ -1353,7 +1314,7 @@ - EID: 50 Name: Level Select Canvas IsActive: false - NumberOfChildren: 5 + NumberOfChildren: 3 Components: Canvas Component: Canvas Width: 1920 @@ -1388,17 +1349,17 @@ Components: Transform Component: Translate: {x: -800, y: 450, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 273, y: 100, z: 1} + Rotate: {x: 0, y: 0, z: 3.14159274} + Scale: {x: 100, y: 100, z: 1} IsActive: true Renderable Component: Mesh: 141771688 Material: 129340704 IsActive: true Button Component: - Default Texture: 59813125 - Hovered Texture: 59813125 - Clicked Texture: 59813125 + Default Texture: 55358401 + Hovered Texture: 59400474 + Clicked Texture: 52333376 IsActive: true UI Component: Canvas ID: 50 @@ -1439,129 +1400,6 @@ Clicked: false IsActive: true Scripts: ~ -- EID: 442 - Name: SubMenuBackGround - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 0.5} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1920, y: 1080, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 130823048 - IsActive: true - UI Component: - Canvas ID: 50 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: SHADE_Scripting.UI.FadeInOnActive - Enabled: true - alpha: 0 -- EID: 441 - Name: Level Select Buttons - IsActive: true - NumberOfChildren: 3 - Components: - Transform Component: - Translate: {x: 0, y: -75, z: 0.100000001} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - UI Component: - Canvas ID: 50 - Hovered: false - Clicked: false - IsActive: true - Scripts: ~ -- EID: 440 - Name: Level 1 Button - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: -600, y: 0, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 380, y: 879, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 129340704 - IsActive: true - Button Component: - Default Texture: 52916516 - Hovered Texture: 52916516 - Clicked Texture: 52916516 - IsActive: true - UI Component: - Canvas ID: 50 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: ChangeSceneButton - Enabled: true - sceneID: 91947920 -- EID: 439 - Name: Level 2 Button - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 0, y: 0, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 380, y: 879, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 129340704 - IsActive: true - Button Component: - Default Texture: 55380564 - Hovered Texture: 55380564 - Clicked Texture: 55380564 - IsActive: true - UI Component: - Canvas ID: 50 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: ChangeSceneButton - Enabled: true - sceneID: 86098106 -- EID: 438 - Name: Level 3 Button - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 600, y: 0, z: 0} - Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 380, y: 879, z: 1} - IsActive: true - Renderable Component: - Mesh: 141771688 - Material: 129340704 - IsActive: true - Button Component: - Default Texture: 53392159 - Hovered Texture: 53392159 - Clicked Texture: 53392159 - IsActive: true - UI Component: - Canvas ID: 50 - Hovered: false - Clicked: false - IsActive: true - Scripts: - - Type: ChangeSceneButton - Enabled: true - sceneID: 88928066 - EID: 450 Name: TransitionCanvas IsActive: true diff --git a/Assets/Scenes/Scene2.shade b/Assets/Scenes/Scene2.shade new file mode 100644 index 00000000..d284d4ea --- /dev/null +++ b/Assets/Scenes/Scene2.shade @@ -0,0 +1,177 @@ +- 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: false + 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: false + Renderable Component: + Mesh: 149697411 + Material: 126974645 + IsActive: false + 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: false + 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: false + Renderable Component: + Mesh: 141771688 + Material: 124370424 + IsActive: false + 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: ~ +- EID: 7 + Name: ParticleTest + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0.823412895, z: -4.31447983} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + classSHADE::SHParticleEmitterComponent: + Emission Count: 15 + Is Passive: true + Emission Interval: 0.0939999968 + Min Life: 2 + Max Life: 3 + Minimum Speed: 3 + Maximum Speed: 6 + Minimum Size: 0 + Maximum Size: 0.5 + Size Decay: 0.990999997 + Angular Ranges And Offset: {x: 6.19999981, y: 1.10000002, z: 0, w: 0.100000001} + Rotation Speed: 0.0309999995 + Rotation Decay: 0.0199999996 + Texture Asset ID: 63456868 + Custom Update Shader Asset ID: 0 + Color Tint: {x: 1, y: 0, z: 0, w: 1} + IsActive: true + Scripts: ~ \ No newline at end of file diff --git a/Assets/Scenes/Scene2.shade.shmeta b/Assets/Scenes/Scene2.shade.shmeta new file mode 100644 index 00000000..9ec289c8 --- /dev/null +++ b/Assets/Scenes/Scene2.shade.shmeta @@ -0,0 +1,3 @@ +Name: Scene2 +ID: 89281126 +Type: 5 diff --git a/Assets/Scripts/Gameplay/Item/SC_Item.cs b/Assets/Scripts/Gameplay/Item/SC_Item.cs index be28bb5a..3fdeee6e 100644 --- a/Assets/Scripts/Gameplay/Item/SC_Item.cs +++ b/Assets/Scripts/Gameplay/Item/SC_Item.cs @@ -33,6 +33,8 @@ public class Item : Script public float highlightThickness = 600.0f; public float highlightLowerClamp = 0.25f; + private ParticleEmitter emitter; + protected override void awake() { @@ -50,6 +52,8 @@ public class Item : Script AudioHandler.audioClipHandlers["SFXImpactElastic"] = Audio.CreateAudioClip("event:/Props/impact_elastic"); AudioHandler.audioClipHandlers["SFXImpactHard"] = Audio.CreateAudioClip("event:/Props/impact_hard"); + + emitter = GetComponent(); } protected override void start() @@ -135,6 +139,11 @@ public class Item : Script playSound = false; Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers["SFXImpactElastic"]); Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers["SFXImpactHard"]); + + if(emitter) + emitter.Emit(); + + Debug.Log("EMIT"); } if (info.GameObject.GetScript() && !returnBack) diff --git a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs index a3c20e0a..e38f2e70 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PlayerController.cs @@ -476,8 +476,6 @@ public class PlayerController : Script stateMachine.SetState(typeof(PlayerIdleState)); tranform.LocalPosition = respawnPoint.GetComponent().LocalPosition; - GameManager.Instance.RacoonCaught(); - if (pat && pat.item) { if (holdItem) diff --git a/Assets/Scripts/Gameplay/SC_GameManager.cs b/Assets/Scripts/Gameplay/SC_GameManager.cs index c628e129..6cec41f4 100644 --- a/Assets/Scripts/Gameplay/SC_GameManager.cs +++ b/Assets/Scripts/Gameplay/SC_GameManager.cs @@ -3,7 +3,6 @@ using SHADE_Scripting.Audio; using SHADE_Scripting.UI; using System; using System.Collections.Generic; -using System.Diagnostics.Contracts; public class GameManager : Script { @@ -28,7 +27,6 @@ public class GameManager : Script public GameObject scoreText; public GameObject timeText; - public GameObject minusTimerText; //mulitpler info public GameObject multiplierText; @@ -186,19 +184,6 @@ public class GameManager : Script } } - public void RacoonCaught() - { - timer -= 10.0f; - if(minusTimerText != GameObject.Null) - { - MinusTimerText text =minusTimerText.GetScript(); - if(text) - { - text.Reset(); - } - } - } - private void Cheat() { if (Input.GetKeyUp(Input.KeyCode.F1)) diff --git a/Assets/Scripts/UI/EasingHelper.cs b/Assets/Scripts/UI/EasingHelper.cs index 4e20d3e0..c737ddfc 100644 --- a/Assets/Scripts/UI/EasingHelper.cs +++ b/Assets/Scripts/UI/EasingHelper.cs @@ -10,8 +10,7 @@ using System.Threading.Tasks; EASE_OUT_SINE, EASE_OUT_BOUNCE, EASE_IN_BOUNCE, - EASE_INOUT_BOUNCE, - LINEAR + EASE_INOUT_BOUNCE } public static class EasingHelper @@ -25,33 +24,28 @@ public static class EasingHelper { 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); } - - case EASING_METHOD.LINEAR: - { - return value; - } - - default: + break; + default: return 0.0f; } } diff --git a/Assets/Scripts/UI/SC_FadeInOnActive.cs b/Assets/Scripts/UI/SC_FadeInOnActive.cs deleted file mode 100644 index d86dc5d2..00000000 --- a/Assets/Scripts/UI/SC_FadeInOnActive.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SHADE; - - -namespace SHADE_Scripting.UI -{ - public class FadeInOnActive: Script - { - [NonSerialized] - TweenThread thread; - - - protected override void start() - { - thread = TweenManager.CreateTweenThread(0.5f, 0.0f, 1.0f, EASING_METHOD.LINEAR); - thread.SetResetOnInactive(GameObject); - } - - protected override void update() - { - if(thread != null) - { - Renderable renderable = GetComponent(); - if(renderable) - { - renderable.Material.SetProperty("data.alpha", thread.GetValue()); - } - } - } - - - - - } -} diff --git a/Assets/Scripts/UI/SC_FadeInOnActive.cs.shmeta b/Assets/Scripts/UI/SC_FadeInOnActive.cs.shmeta deleted file mode 100644 index d45157a2..00000000 --- a/Assets/Scripts/UI/SC_FadeInOnActive.cs.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: SC_FadeInOnActive -ID: 163833605 -Type: 9 diff --git a/Assets/Scripts/UI/SC_MinusTimerText.cs b/Assets/Scripts/UI/SC_MinusTimerText.cs deleted file mode 100644 index 8ab03d4d..00000000 --- a/Assets/Scripts/UI/SC_MinusTimerText.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SHADE; - -namespace SHADE_Scripting.UI -{ - public class MinusTimerText: Script - { - public float duration = 0.5f; - - - private Vector3 startPos; - - [NonSerialized] - TweenThread thread; - - protected override void awake() - { - Transform transform = GetComponent(); - if(transform) - { - startPos = transform.LocalPosition; - } - - - } - - protected override void start() - { - thread = TweenManager.CreateTweenThread(duration, 1.0f, 0.0f, EASING_METHOD.LINEAR); - thread.SetResetOnInactive(GameObject); - } - - - protected override void update() - { - if(thread != null) - { - TextRenderable text = GetComponent(); - if (text) - { - Color temp = text.TextColor; - temp.a = thread.GetValue(); - text.TextColor = temp; - } - if(thread.IsCompleted()) - { - GameObject.SetActive(false); - } - } - - Transform transform = GetComponent(); - if(transform) - { - Vector3 temp = transform.LocalPosition; - temp.y -= (float)Time.DeltaTime; - transform.LocalPosition = temp; - } - - } - - public void Reset() - { - GameObject.SetActive(true); - thread.Reset(); - Transform transform = GetComponent(); - if (transform) - { - transform.LocalPosition = startPos; - } - } - - - } -} diff --git a/Assets/Scripts/UI/SC_MinusTimerText.cs.shmeta b/Assets/Scripts/UI/SC_MinusTimerText.cs.shmeta deleted file mode 100644 index b99138cc..00000000 --- a/Assets/Scripts/UI/SC_MinusTimerText.cs.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: SC_MinusTimerText -ID: 154875718 -Type: 9 diff --git a/Assets/Scripts/UI/SC_ScrollingCredits.cs b/Assets/Scripts/UI/SC_ScrollingCredits.cs index 1e58d6bd..d4b362d8 100644 --- a/Assets/Scripts/UI/SC_ScrollingCredits.cs +++ b/Assets/Scripts/UI/SC_ScrollingCredits.cs @@ -30,8 +30,7 @@ namespace SHADE_Scripting.UI Transform transform = GetComponent(); if(transform != null) { - thread = TweenManager.CreateTweenThread(duration, transform.LocalPosition.y, endY, EASING_METHOD.LINEAR); - thread.SetResetOnInactive(GameObject); + thread = TweenManager.CreateTweenThread(duration, transform.LocalPosition.y, endY, EASING_METHOD.EASE_IN_SINE); } } diff --git a/Assets/Scripts/UI/SC_TweenManager.cs b/Assets/Scripts/UI/SC_TweenManager.cs index 0595f701..31a67ebd 100644 --- a/Assets/Scripts/UI/SC_TweenManager.cs +++ b/Assets/Scripts/UI/SC_TweenManager.cs @@ -12,8 +12,6 @@ public class TweenThread private float value = 0.0f; public float startValue = 0.0f; public float endValue = 1.0f; - - private GameObject goToCheckActive = GameObject.Null; public TweenThread(float duration, float startValue, float endValue, EASING_METHOD method) { this.duration = duration; @@ -23,15 +21,6 @@ public class TweenThread } public void Update(float deltaTime) { - if (goToCheckActive != GameObject.Null) - { - if (goToCheckActive.IsActiveInHierarchy == false) - { - Reset(); - - return; - } - } if (timer >= duration) return; @@ -67,11 +56,6 @@ public class TweenThread { return value; } - - public void SetResetOnInactive(GameObject go) - { - goToCheckActive = go; - } } @@ -83,9 +67,6 @@ public class TweenThreadVec3 private Vector3 value = Vector3.Zero; public Vector3 startValue = Vector3.Zero; public Vector3 endValue = Vector3.Zero; - - private GameObject goToCheckActive = GameObject.Null; - public TweenThreadVec3(float duration, Vector3 startValue, Vector3 endValue, EASING_METHOD method) { this.duration = duration; @@ -95,16 +76,6 @@ public class TweenThreadVec3 } public void Update(float deltaTime) { - if(goToCheckActive != GameObject.Null) - { - if(goToCheckActive.IsActiveInHierarchy == false) - { - Reset(); - - return; - } - } - if (timer >= duration) return; @@ -140,11 +111,6 @@ public class TweenThreadVec3 { return value; } - - public void SetResetOnInactive(GameObject go) - { - this.goToCheckActive = go; - } } diff --git a/Assets/Shaders/ParticleEmit_CS.glsl b/Assets/Shaders/ParticleEmit_CS.glsl index 45cea313..b2f81a05 100644 --- a/Assets/Shaders/ParticleEmit_CS.glsl +++ b/Assets/Shaders/ParticleEmit_CS.glsl @@ -7,11 +7,13 @@ layout(local_size_x = 128) in; struct EmitterParameters { vec4 angularRangesAndOffsets; + vec4 acceleration; float minSpeed; float maxSpeed; float rotationSpeed; float rotationDecay; vec4 lifeAndSizeRange; // min life, max life, min size, max size + vec4 colorTint; float sizeDecay; uint textureIndex; float padding[2]; @@ -24,6 +26,7 @@ struct ParticleData vec4 velocity; vec4 acceleration; vec4 scaleAndDecay; + vec4 colorTint; float life; uint textureIndex; }; @@ -166,11 +169,14 @@ void main() float particleSize = map (rand(seed), 0.0f, 1.0f, emitterParams.data.lifeAndSizeRange.z, emitterParams.data.lifeAndSizeRange.w); - // Set size of particle + // Set size of and size decay of particle particle.scaleAndDecay.x = particleSize; particle.scaleAndDecay.y = particleSize; particle.scaleAndDecay.z = emitterParams.data.sizeDecay; particle.scaleAndDecay.w = emitterParams.data.sizeDecay; + + // Set particle color tint + particle.colorTint = emitterParams.data.colorTint; // Set the texture for the particle particle.textureIndex = emitterParams.data.textureIndex; @@ -182,7 +188,7 @@ void main() particle.orientationSpeedDecay = vec4 (0.0f); - particle.acceleration = vec4 (0.0f, -0.058f, 0.0f, 0.0f); + particle.acceleration = emitterParams.data.acceleration; inputParticles.data[index] = particle; diff --git a/Assets/Shaders/ParticleEmit_CS.shshaderb b/Assets/Shaders/ParticleEmit_CS.shshaderb index b003ba77..08972d9d 100644 Binary files a/Assets/Shaders/ParticleEmit_CS.shshaderb and b/Assets/Shaders/ParticleEmit_CS.shshaderb differ diff --git a/Assets/Shaders/ParticleUpdate_CS.glsl b/Assets/Shaders/ParticleUpdate_CS.glsl index 43d4893d..1f5384ec 100644 --- a/Assets/Shaders/ParticleUpdate_CS.glsl +++ b/Assets/Shaders/ParticleUpdate_CS.glsl @@ -17,6 +17,7 @@ struct ParticleData vec4 velocity; vec4 acceleration; vec4 scaleAndDecay; + vec4 colorTint; float life; uint textureIndex; }; diff --git a/Assets/Shaders/ParticleUpdate_CS.shshaderb b/Assets/Shaders/ParticleUpdate_CS.shshaderb index 63a79d5a..e7a3ec64 100644 Binary files a/Assets/Shaders/ParticleUpdate_CS.shshaderb and b/Assets/Shaders/ParticleUpdate_CS.shshaderb differ diff --git a/Assets/Shaders/Particle_FS.glsl b/Assets/Shaders/Particle_FS.glsl index 243baa2e..69bc224b 100644 --- a/Assets/Shaders/Particle_FS.glsl +++ b/Assets/Shaders/Particle_FS.glsl @@ -15,12 +15,13 @@ layout(location = 0) in struct layout(location = 1) flat in struct { uint textureIndex; + vec4 color; } InFlat; void main () { - fragColor = vec4 (texture(textures [nonuniformEXT(InFlat.textureIndex)], In.uv)); + fragColor = vec4 (texture(textures [nonuniformEXT(InFlat.textureIndex)], In.uv)) * InFlat.color; if (fragColor.a < 0.01f) discard; } diff --git a/Assets/Shaders/Particle_FS.shshaderb b/Assets/Shaders/Particle_FS.shshaderb index edd2dd6b..59049d0c 100644 Binary files a/Assets/Shaders/Particle_FS.shshaderb and b/Assets/Shaders/Particle_FS.shshaderb differ diff --git a/Assets/Shaders/Particle_VS.glsl b/Assets/Shaders/Particle_VS.glsl index 5004cea1..b5b6f13e 100644 --- a/Assets/Shaders/Particle_VS.glsl +++ b/Assets/Shaders/Particle_VS.glsl @@ -23,6 +23,7 @@ struct ParticleData vec4 velocity; vec4 acceleration; vec4 scaleAndDecay; + vec4 colorTint; float life; uint textureIndex; }; @@ -62,6 +63,7 @@ layout(location = 0) out struct layout(location = 1) out struct { uint textureIndex; // location = 1 + vec4 color; // location = 2 } OutFlat; vec2 CreateQuad (in uint vertexID) @@ -96,6 +98,7 @@ void main() particlePos = particle.position.xyz + (viewRight * particlePos.x * particleScaleData.x) + (viewUp * particlePos.y * particleScaleData.y); OutFlat.textureIndex = particle.textureIndex; + OutFlat.color = particle.colorTint; gl_Position = cameraData.vpMat * vec4(particlePos, 1.0f); } \ No newline at end of file diff --git a/Assets/Shaders/Particle_VS.shshaderb b/Assets/Shaders/Particle_VS.shshaderb index 0a9be96d..2ba7a729 100644 Binary files a/Assets/Shaders/Particle_VS.shshaderb and b/Assets/Shaders/Particle_VS.shshaderb differ diff --git a/Assets/Texture/Buttons/TX_Button_Back.dds b/Assets/Texture/Buttons/TX_Button_Back.dds deleted file mode 100644 index af03a8c2..00000000 Binary files a/Assets/Texture/Buttons/TX_Button_Back.dds and /dev/null differ diff --git a/Assets/Texture/Buttons/TX_Button_Back.shtex b/Assets/Texture/Buttons/TX_Button_Back.shtex deleted file mode 100644 index ad36e203..00000000 Binary files a/Assets/Texture/Buttons/TX_Button_Back.shtex and /dev/null differ diff --git a/Assets/Texture/Buttons/TX_Button_Back.shtex.shmeta b/Assets/Texture/Buttons/TX_Button_Back.shtex.shmeta deleted file mode 100644 index 5dbaff1d..00000000 --- a/Assets/Texture/Buttons/TX_Button_Back.shtex.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: TX_Button_Back -ID: 59813125 -Type: 3 diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level1.dds b/Assets/Texture/UI/Level Select/TX_Button_Level1.dds deleted file mode 100644 index b135829e..00000000 Binary files a/Assets/Texture/UI/Level Select/TX_Button_Level1.dds and /dev/null differ diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level1.shtex b/Assets/Texture/UI/Level Select/TX_Button_Level1.shtex deleted file mode 100644 index da2080f1..00000000 Binary files a/Assets/Texture/UI/Level Select/TX_Button_Level1.shtex and /dev/null differ diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level1.shtex.shmeta b/Assets/Texture/UI/Level Select/TX_Button_Level1.shtex.shmeta deleted file mode 100644 index 84ca0573..00000000 --- a/Assets/Texture/UI/Level Select/TX_Button_Level1.shtex.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: TX_Button_Level1 -ID: 52916516 -Type: 3 diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level2_1.dds b/Assets/Texture/UI/Level Select/TX_Button_Level2_1.dds deleted file mode 100644 index c2b1549f..00000000 Binary files a/Assets/Texture/UI/Level Select/TX_Button_Level2_1.dds and /dev/null differ diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level2_1.shtex b/Assets/Texture/UI/Level Select/TX_Button_Level2_1.shtex deleted file mode 100644 index 16cc8698..00000000 Binary files a/Assets/Texture/UI/Level Select/TX_Button_Level2_1.shtex and /dev/null differ diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level2_1.shtex.shmeta b/Assets/Texture/UI/Level Select/TX_Button_Level2_1.shtex.shmeta deleted file mode 100644 index fca5293e..00000000 --- a/Assets/Texture/UI/Level Select/TX_Button_Level2_1.shtex.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: TX_Button_Level2_1 -ID: 55380564 -Type: 3 diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level3_1.dds b/Assets/Texture/UI/Level Select/TX_Button_Level3_1.dds deleted file mode 100644 index 0ed94f6a..00000000 Binary files a/Assets/Texture/UI/Level Select/TX_Button_Level3_1.dds and /dev/null differ diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level3_1.shtex b/Assets/Texture/UI/Level Select/TX_Button_Level3_1.shtex deleted file mode 100644 index 2ea0a7ac..00000000 Binary files a/Assets/Texture/UI/Level Select/TX_Button_Level3_1.shtex and /dev/null differ diff --git a/Assets/Texture/UI/Level Select/TX_Button_Level3_1.shtex.shmeta b/Assets/Texture/UI/Level Select/TX_Button_Level3_1.shtex.shmeta deleted file mode 100644 index 9f33e955..00000000 --- a/Assets/Texture/UI/Level Select/TX_Button_Level3_1.shtex.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: TX_Button_Level3_1 -ID: 53392159 -Type: 3 diff --git a/Assets/Texture/UI/TX_BG_MainMenu.dds b/Assets/Texture/UI/TX_BG_MainMenu.dds deleted file mode 100644 index 8f43516d..00000000 Binary files a/Assets/Texture/UI/TX_BG_MainMenu.dds and /dev/null differ diff --git a/Assets/Texture/UI/TX_BG_MainMenu.shtex b/Assets/Texture/UI/TX_BG_MainMenu.shtex deleted file mode 100644 index e9089789..00000000 Binary files a/Assets/Texture/UI/TX_BG_MainMenu.shtex and /dev/null differ diff --git a/Assets/Texture/UI/TX_BG_MainMenu.shtex.shmeta b/Assets/Texture/UI/TX_BG_MainMenu.shtex.shmeta deleted file mode 100644 index 52edc85d..00000000 --- a/Assets/Texture/UI/TX_BG_MainMenu.shtex.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: TX_BG_MainMenu -ID: 56004904 -Type: 3 diff --git a/Assets/Texture/UI/TX_BG_SubMenus.dds b/Assets/Texture/UI/TX_BG_SubMenus.dds deleted file mode 100644 index 4c348e41..00000000 Binary files a/Assets/Texture/UI/TX_BG_SubMenus.dds and /dev/null differ diff --git a/Assets/Texture/UI/TX_BG_SubMenus.shtex b/Assets/Texture/UI/TX_BG_SubMenus.shtex deleted file mode 100644 index a6bf7c38..00000000 Binary files a/Assets/Texture/UI/TX_BG_SubMenus.shtex and /dev/null differ diff --git a/Assets/Texture/UI/TX_BG_SubMenus.shtex.shmeta b/Assets/Texture/UI/TX_BG_SubMenus.shtex.shmeta deleted file mode 100644 index 62c2504f..00000000 --- a/Assets/Texture/UI/TX_BG_SubMenus.shtex.shmeta +++ /dev/null @@ -1,3 +0,0 @@ -Name: TX_BG_SubMenus -ID: 60776650 -Type: 3 diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index 2edadbbc..208134bf 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -883,6 +883,27 @@ namespace SHADE comp->SetRotationDecay(val); }); + SHEditorWidgets::DragVec3("Acceleration", {"x", "y", "z"}, + [comp = component]() + { + return comp->GetAcceleration(); + }, + [comp = component](SHVec3 const& val) + { + comp->SetAcceleration(val); + }); + + SHEditorWidgets::ColorPicker("Color Tint", + [comp = component]() + { + return comp->GetColorTint(); + }, + [comp = component](SHVec4 const& val) + { + comp->SetColorTint(val); + }); + + SHEditorWidgets::DragInt("Texture Index", [comp = component]() { @@ -892,6 +913,13 @@ namespace SHADE { comp->SetTextureAssetID(val); }); + ImGui::SameLine(); + if (ImGui::Button("Reset")) + { + component->SetTextureAssetID(0); + component->SetTextureIndex(0); + } + if (SHDragDrop::BeginTarget()) { if (AssetID* payload = SHDragDrop::AcceptPayload(SHDragDrop::DRAG_RESOURCE)) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp index 5454cf31..d6f1e115 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.cpp @@ -52,6 +52,25 @@ namespace SHADE } + void SHParticleEmitterComponent::SetAcceleration(SHVec3 const& accel) noexcept + { + cpuEmitterData.accleration.x = accel.x; + cpuEmitterData.accleration.y = accel.y; + cpuEmitterData.accleration.z = accel.z; + } + + void SHParticleEmitterComponent::SetAngularRanges(SHVec2 const& ranges) noexcept + { + cpuEmitterData.angularRangesAndOffsets.x = ranges.x; + cpuEmitterData.angularRangesAndOffsets.y = ranges.y; + } + + void SHParticleEmitterComponent::SetAngularOffsets(SHVec2 const& offsets) noexcept + { + cpuEmitterData.angularRangesAndOffsets.z = offsets.x; + cpuEmitterData.angularRangesAndOffsets.w = offsets.y; + } + void SHParticleEmitterComponent::SetMinSpeed(float speed) noexcept { cpuEmitterData.minSpeed = speed; @@ -107,6 +126,23 @@ namespace SHADE customUpdateShader = shaderModule; } + void SHParticleEmitterComponent::SetColorTint(SHVec4 tint) noexcept + { + cpuEmitterData.colorTint = tint; + } + + void SHParticleEmitterComponent::SetColorTintRGB(SHVec3 tint) noexcept + { + cpuEmitterData.colorTint.x = tint.x; + cpuEmitterData.colorTint.y = tint.y; + cpuEmitterData.colorTint.z = tint.z; + } + + void SHParticleEmitterComponent::SetColorTintAlpha(float alpha) noexcept + { + cpuEmitterData.colorTint.w = alpha; + } + uint32_t SHParticleEmitterComponent::GetEmissionCount(void) const noexcept { return emissionCount; @@ -138,6 +174,21 @@ namespace SHADE return cpuEmitterData.angularRangesAndOffsets; } + SHVec2 SHParticleEmitterComponent::GetAngularRanges(void) const noexcept + { + return SHVec2{cpuEmitterData.angularRangesAndOffsets.x, cpuEmitterData.angularRangesAndOffsets.y}; + } + + SHVec2 SHParticleEmitterComponent::GetAngularOffsets(void) const noexcept + { + return {cpuEmitterData.angularRangesAndOffsets.z, cpuEmitterData.angularRangesAndOffsets.w }; + } + + SHVec3 SHParticleEmitterComponent::GetAcceleration(void) const noexcept + { + return SHVec3{cpuEmitterData.accleration.x, cpuEmitterData.accleration.y, cpuEmitterData.accleration.z }; + } + float SHParticleEmitterComponent::GetMinSpeed(void) const noexcept { return cpuEmitterData.minSpeed; @@ -194,4 +245,19 @@ namespace SHADE return customUpdateShader; } + SHVec4 const& SHParticleEmitterComponent::GetColorTint(void) const noexcept + { + return cpuEmitterData.colorTint; + } + + SHVec3 SHParticleEmitterComponent::GetColorTintRGB(void) const noexcept + { + return SHVec3 (cpuEmitterData.colorTint.x, cpuEmitterData.colorTint.y, cpuEmitterData.colorTint.z); + } + + float SHParticleEmitterComponent::GetColorTintAlpha(void) const noexcept + { + return cpuEmitterData.colorTint.w; + } + } \ No newline at end of file diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h index d9c26666..47791c44 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h @@ -1,5 +1,6 @@ #pragma once +#include "SH_API.h" #include "Resource/SHHandle.h" #include "Math/Vector/SHVec2.h" #include "Math/Vector/SHVec4.h" @@ -15,7 +16,7 @@ namespace SHADE class SHVkShaderModule; class SHVkPipeline; - class SHParticleEmitterComponent : public SHComponent + class SH_API SHParticleEmitterComponent : public SHComponent { private: @@ -24,7 +25,10 @@ namespace SHADE //! Angular ranges of emission SHVec4 angularRangesAndOffsets; - //! minimum starting velocity + //! Acceleration + SHVec4 accleration; + + //! minimum starting velocity float minSpeed; //! Maximum starting velocity @@ -39,6 +43,9 @@ namespace SHADE //! Spawn lifetime and size range (min and max) SHVec4 lifeAndSizeRange; + //! Color tint to assign to particles + SHVec4 colorTint; + //! Size decay for particles float sizeDecayMult; @@ -67,6 +74,9 @@ namespace SHADE //! x scale, x scale decay, y scale and y scale decay SHVec4 scaleAndDecay; + //! Color tinting for particle + SHVec4 colorTint; + //! Life of the particle float life; @@ -147,6 +157,9 @@ namespace SHADE void SetMinLife (float val) noexcept; void SetMaxLife (float val) noexcept; void SetAngularRangesAndOffsets (SHVec4 const& ranges) noexcept; + void SetAcceleration (SHVec3 const& accel) noexcept; + void SetAngularRanges (SHVec2 const& ranges) noexcept; + void SetAngularOffsets (SHVec2 const& offsets) noexcept; void SetMinSpeed (float speed) noexcept; void SetMaxSpeed (float speed) noexcept; void SetRotationSpeed (float speed) noexcept; @@ -156,6 +169,9 @@ namespace SHADE void SetMaxSize (float size) noexcept; void SetSizeDecayMult (float decay) noexcept; void SetCustomUpdateShader (Handle shaderModule) noexcept; + void SetColorTint (SHVec4 tint) noexcept; + void SetColorTintRGB (SHVec3 tint) noexcept; + void SetColorTintAlpha (float alpha) noexcept; uint32_t GetEmissionCount (void) const noexcept; bool GetPassive (void) const noexcept; @@ -163,6 +179,9 @@ namespace SHADE float GetMinLife (void) const noexcept; float GetMaxLife (void) const noexcept; SHVec4 const& GetAngularRangesAndOffsets (void) const noexcept; + SHVec2 GetAngularRanges (void) const noexcept; + SHVec2 GetAngularOffsets (void) const noexcept; + SHVec3 GetAcceleration (void) const noexcept; float GetMinSpeed (void) const noexcept; float GetMaxSpeed (void) const noexcept; float GetRotationSpeed (void) const noexcept; @@ -172,6 +191,9 @@ namespace SHADE float GetMaxSize (void) const noexcept; float GetSizeDecayMult (void) const noexcept; Handle GetCustomUpdateShader (void) const noexcept; + SHVec4 const& GetColorTint (void) const noexcept; + SHVec3 GetColorTintRGB (void) const noexcept; + float GetColorTintAlpha (void) const noexcept; /*-----------------------------------------------------------------------*/ /* NON-INTERFACE FUNCTIONS */ diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index 2550388e..8805ed41 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -519,6 +519,8 @@ namespace YAML static constexpr std::string_view ROTATION_DECAY_TAG = "Rotation Decay"; static constexpr std::string_view TEXTURE_ASSET_ID_TAG = "Texture Asset ID"; static constexpr std::string_view CUSTOM_UPDATE_SHADER_ASSET_ID_TAG = "Custom Update Shader Asset ID"; + static constexpr std::string_view COLOR_TINT_TAG = "Color Tint"; + static constexpr std::string_view ACCELERATION_TAG = "Acceleration"; static YAML::Node encode(SHParticleEmitterComponent const& rhs) { @@ -538,6 +540,8 @@ namespace YAML node[ROTATION_DECAY_TAG.data()] = rhs.GetRotationDecay(); node[TEXTURE_ASSET_ID_TAG.data()] = rhs.GetTextureAssetID(); node[CUSTOM_UPDATE_SHADER_ASSET_ID_TAG.data()] = rhs.GetCustomUpdateShaderAssetID(); + node[COLOR_TINT_TAG.data()] = rhs.GetColorTint(); + node[ACCELERATION_TAG.data()] = rhs.GetAcceleration(); return node; } @@ -581,6 +585,11 @@ namespace YAML if (node[ROTATION_DECAY_TAG.data()].IsDefined()) rhs.SetRotationDecay(node[ROTATION_DECAY_TAG.data()].as()); + if (node[COLOR_TINT_TAG.data()].IsDefined()) + rhs.SetColorTint(node[COLOR_TINT_TAG.data()].as()); + + if (node[ACCELERATION_TAG.data()].IsDefined()) + rhs.SetAcceleration(node[ACCELERATION_TAG.data()].as()); if (node[TEXTURE_ASSET_ID_TAG.data()].IsDefined()) { diff --git a/SHADE_Managed/src/Components/ParticleEmitter.cxx b/SHADE_Managed/src/Components/ParticleEmitter.cxx new file mode 100644 index 00000000..a5bbf350 --- /dev/null +++ b/SHADE_Managed/src/Components/ParticleEmitter.cxx @@ -0,0 +1,170 @@ +#include "SHpch.h" + +#include "ParticleEmitter.hxx" + + +namespace SHADE +{ + ParticleEmitter::ParticleEmitter(Entity entity) + :Component(entity) + { + + } + + void ParticleEmitter::Emit() + { + GetNativeComponent()->Emit(); + } + + + float ParticleEmitter::EmissionInterval::get() + { + return (GetNativeComponent()->GetEmissionInterval()); + } + + void ParticleEmitter::EmissionInterval::set(float val) + { + GetNativeComponent()->SetEmissionInterval(val); + } + + bool ParticleEmitter::IsPassive::get() + { + return (GetNativeComponent()->GetPassive()); + } + + void ParticleEmitter::IsPassive::set(bool val) + { + GetNativeComponent()->SetPassive(val); + } + + float ParticleEmitter::MinLife::get() + { + return (GetNativeComponent()->GetMinLife()); + } + + void ParticleEmitter::MinLife::set(float val) + { + GetNativeComponent()->SetMinLife(val); + } + + float ParticleEmitter::MaxLife::get() + { + return (GetNativeComponent()->GetMaxLife()); + } + + void ParticleEmitter::MaxLife::set(float val) + { + GetNativeComponent()->SetMaxLife(val); + } + + Vector2 ParticleEmitter::AngularRanges::get() + { + return Convert::ToCLI(GetNativeComponent()->GetAngularRanges()); + } + + void ParticleEmitter::AngularRanges::set(Vector2 val) + { + GetNativeComponent()->SetAngularRanges(Convert::ToNative(val)); + } + + Vector2 ParticleEmitter::AngularOffsets::get() + { + return Convert::ToCLI(GetNativeComponent()->GetAngularOffsets()); + } + + void ParticleEmitter::AngularOffsets::set(Vector2 val) + { + GetNativeComponent()->SetAngularOffsets(Convert::ToNative(val)); + } + + float ParticleEmitter::MinSpeed::get() + { + return GetNativeComponent()->GetMinSpeed(); + } + + void ParticleEmitter::MinSpeed::set(float val) + { + GetNativeComponent()->SetMinSpeed(val); + } + + float ParticleEmitter::MaxSpeed::get() + { + return GetNativeComponent()->GetMinSpeed(); + } + + void ParticleEmitter::MaxSpeed::set(float val) + { + GetNativeComponent()->SetMaxSpeed(val); + } + + float ParticleEmitter::RotationSpeed::get() + { + return GetNativeComponent()->GetRotationSpeed(); + } + + void ParticleEmitter::RotationSpeed::set(float val) + { + GetNativeComponent()->SetRotationSpeed(val); + } + + float ParticleEmitter::RotationDecay::get() + { + return GetNativeComponent()->GetRotationDecay(); + } + + void ParticleEmitter::RotationDecay::set(float val) + { + GetNativeComponent()->SetRotationDecay(val); + } + + float ParticleEmitter::MinSize::get() + { + return GetNativeComponent()->GetMinSize(); + } + + void ParticleEmitter::MinSize::set(float val) + { + GetNativeComponent()->SetMinSize(val); + } + + float ParticleEmitter::MaxSize::get() + { + return GetNativeComponent()->GetMaxSize(); + } + + void ParticleEmitter::MaxSize::set(float val) + { + GetNativeComponent()->SetMaxSize(val); + } + + float ParticleEmitter::SizeDecayMult::get() + { + return GetNativeComponent()->GetSizeDecayMult(); + } + + void ParticleEmitter::SizeDecayMult::set(float val) + { + GetNativeComponent()->SetSizeDecayMult(val); + } + + Vector3 ParticleEmitter::ColorTintRGB::get() + { + return Convert::ToCLI(GetNativeComponent()->GetColorTintRGB()); + } + + void ParticleEmitter::ColorTintRGB::set(Vector3 val) + { + GetNativeComponent()->SetColorTintRGB (Convert::ToNative (val)); + } + + float ParticleEmitter::ColorTintAlpha::get() + { + return GetNativeComponent()->GetColorTintAlpha(); + } + + void ParticleEmitter::ColorTintAlpha::set(float val) + { + GetNativeComponent()->SetColorTintAlpha(val); + } + +} \ No newline at end of file diff --git a/SHADE_Managed/src/Components/ParticleEmitter.hxx b/SHADE_Managed/src/Components/ParticleEmitter.hxx new file mode 100644 index 00000000..686d0a83 --- /dev/null +++ b/SHADE_Managed/src/Components/ParticleEmitter.hxx @@ -0,0 +1,115 @@ +#pragma once + +// Project Includes +#include "Components/Component.hxx" +#include "Math/Vector2.hxx" +#include "Math/Vector3.hxx" +#include "Math/Quaternion.hxx" +// External Dependencies +#include "Camera/SHCameraComponent.h" +#include "Graphics/MiddleEnd/Particles/SHParticleEmitterComponent.h" + +namespace SHADE +{ + public ref class ParticleEmitter : public Component + { + internal: + ParticleEmitter(Entity entity); + + public: + + property bool IsPassive + { + bool get(); + void set(bool val); + } + + property float EmissionInterval + { + float get(); + void set(float val); + } + + property float MinLife + { + float get(); + void set(float val); + } + + property float MaxLife + { + float get(); + void set(float val); + } + + property Vector2 AngularRanges + { + Vector2 get(); + void set(Vector2 val); + } + + property Vector2 AngularOffsets + { + Vector2 get(); + void set(Vector2 val); + } + + property float MinSpeed + { + float get(); + void set(float val); + } + + property float MaxSpeed + { + float get(); + void set(float val); + } + + property float RotationSpeed + { + float get(); + void set(float val); + } + + property float RotationDecay + { + float get(); + void set(float val); + } + + property float MinSize + { + float get(); + void set(float val); + } + + property float MaxSize + { + float get(); + void set(float val); + } + + property float SizeDecayMult + { + float get(); + void set(float val); + } + + property Vector3 ColorTintRGB + { + Vector3 get(); + void set(Vector3 val); + } + + property float ColorTintAlpha + { + float get(); + void set (float val); + } + + void Emit(); + + + }; +} \ No newline at end of file diff --git a/SHADE_Managed/src/Engine/ECS.cxx b/SHADE_Managed/src/Engine/ECS.cxx index c79175bf..38138be6 100644 --- a/SHADE_Managed/src/Engine/ECS.cxx +++ b/SHADE_Managed/src/Engine/ECS.cxx @@ -34,6 +34,7 @@ of DigiPen Institute of Technology is prohibited. #include "UI\SHCanvasComponent.h" #include "Animation\SHAnimatorComponent.h" #include "Graphics\MiddleEnd\TrajectoryRendering\SHTrajectoryRenderableComponent.h" +#include "Graphics\MiddleEnd/Particles/SHParticleEmitterComponent.h" // Project Headers #include "Utility/Convert.hxx" #include "Utility/Debug.hxx" @@ -50,6 +51,7 @@ of DigiPen Institute of Technology is prohibited. #include "Components\Slider.hxx" #include "Components\TrajectoryRenderable.hxx" #include "Components\Animator.hxx" +#include "Components\ParticleEmitter.hxx" @@ -341,6 +343,7 @@ namespace SHADE componentMap.Add(createComponentSet()); componentMap.Add(createComponentSet()); componentMap.Add(createComponentSet()); + componentMap.Add(createComponentSet()); } /*---------------------------------------------------------------------------------*/