Merge branch 'main' into SP3-1-Rendering

This commit is contained in:
Brandon Mak 2023-03-01 08:56:45 +08:00
commit 2e7bfd8b28
229 changed files with 20544 additions and 2545 deletions

View File

@ -1,4 +0,0 @@
Start Maximized: true
Working Scene ID: 97158628
Window Size: {x: 1920, y: 1013}
Style: 0

Binary file not shown.

View File

@ -0,0 +1,3 @@
Name: Dangrek-Regular
ID: 174412429
Type: 10

Binary file not shown.

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_01a
ID: 120028153
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_01b
ID: 130271494
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_01c
ID: 118957569
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_02a
ID: 120947645
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_02b
ID: 129923341
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_02c
ID: 133191310
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_03a
ID: 129620984
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_03b
ID: 119078830
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_03c
ID: 133041695
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_03d
ID: 117751129
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_03e
ID: 131504451
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: CutScene_bg
ID: 117531460
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: MT_HousePaletteLevel3
ID: 126223465
Type: 7

View File

@ -1,6 +1,6 @@
- VertexShader: 37048829 - VertexShader: 37048829
FragmentShader: 45685219 FragmentShader: 45685219
SubPass: G-Buffer Write SubPass: G-Buffer Write With VFX
Properties: Properties:
data.color: {x: 1, y: 1, z: 1, w: 1} data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 57342922 data.textureIndex: 57342922

View File

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

View File

@ -0,0 +1,3 @@
Name: GameIcon
ID: 126117259
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: Instruction_01
ID: 124926341
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: Instruction_02
ID: 128721520
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: Instruction_03
ID: 124482180
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: Instruction_04
ID: 129768803
Type: 7

View File

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

View File

@ -0,0 +1,3 @@
Name: Steal_Food
ID: 127459277
Type: 7

View File

@ -4,5 +4,5 @@
Properties: Properties:
data.color: {x: 1, y: 1, z: 1, w: 1} data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 54324293 data.textureIndex: 54324293
data.alpha: 0 data.alpha: 1
data.beta: {x: 1, y: 1, z: 1} data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,12 @@
- VertexShader: 46580970
FragmentShader: 48832081
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 64651793
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}
data.sliderThreshold: 1
data.sliderStartColor: {x: 0, y: 1, z: 0, w: 1}
data.sliderEndColor: {x: 1, y: 0, z: 0, w: 1}
data.sliderBarColor: {x: 1, y: 1, z: 1, w: 1}

View File

@ -0,0 +1,3 @@
Name: UIMat_Slider
ID: 128676209
Type: 7

View File

@ -4,5 +4,5 @@
Properties: Properties:
data.color: {x: 1, y: 1, z: 1, w: 1} data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 57302694 data.textureIndex: 57302694
data.alpha: 0 data.alpha: 1
data.beta: {x: 1, y: 1, z: 1} data.beta: {x: 1, y: 1, z: 1}

View File

@ -0,0 +1,9 @@
- VertexShader: 46580970
FragmentShader: 43211183
SubPass: UI
Properties:
data.color: {x: 1, y: 1, z: 1, w: 1}
data.textureIndex: 51995224
data.alpha: 1
data.beta: {x: 1, y: 1, z: 1}
data.sliderThreshold: 1

View File

@ -0,0 +1,3 @@
Name: UIMat_Slider_Textured
ID: 127128823
Type: 7

170
Assets/Models/MD_Box.gltf Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,7 @@
Name: MD_Box
ID: 70818427
Type: 4
Sub Assets:
Name: Box
ID: 140639624
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,64 @@
Name: MD_Level3Furnitures
ID: 81985261
Type: 4
Sub Assets:
Name: DrawerSmall01.001
ID: 149702955
Type: 8
Name: CupboardEmpty
ID: 144058424
Type: 8
Name: DoorDoubleRight
ID: 140394654
Type: 8
Name: DoorDoubleLeft
ID: 149432297
Type: 8
Name: TV_Screen
ID: 139805143
Type: 8
Name: CupboardSolidBlock
ID: 143365399
Type: 8
Name: MetalShelf02
ID: 140244884
Type: 8
Name: Speaker
ID: 150497074
Type: 8
Name: Table02
ID: 142652392
Type: 8
Name: CupboardSinkPiece
ID: 144544365
Type: 8
Name: Couch_Cushion_Bouncy
ID: 135719689
Type: 8
Name: Couch_Right
ID: 138531188
Type: 8
Name: Couch_Left
ID: 137589234
Type: 8
Name: Couch_Mid
ID: 147766199
Type: 8
Name: Couch_Cushion_Reg
ID: 143809811
Type: 8
Name: Chair03
ID: 137183283
Type: 8
Name: Couch_Cushion_Casting
ID: 148097428
Type: 8
Name: Couch_Right_Casting
ID: 136550658
Type: 8
Name: Couch_Left_Casting
ID: 137021820
Type: 8
Name: Couch_Mid_Casting
ID: 141205478
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_LightBeam
ID: 82341473
Type: 4
Sub Assets:
Name: Cylinder
ID: 143485560
Type: 8

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,115 @@
Name: MD_ModularWallsLevel3
ID: 72946969
Type: 4
Sub Assets:
Name: Pillar_GroundLevel
ID: 142355539
Type: 8
Name: WallEnd_GroundLevel
ID: 135098906
Type: 8
Name: Pillar_UpperLevel
ID: 140176723
Type: 8
Name: WallEnd_UpperLevel
ID: 135608625
Type: 8
Name: Railings_Single
ID: 143247134
Type: 8
Name: Stairs_Nine
ID: 150659431
Type: 8
Name: Stairs_Single
ID: 149660801
Type: 8
Name: WallDoorHole_GroundLevel
ID: 143660070
Type: 8
Name: Door
ID: 140827566
Type: 8
Name: DoorFrame
ID: 148230390
Type: 8
Name: WallDoorHole_UpperLevel
ID: 148075107
Type: 8
Name: FloorLarge
ID: 142686872
Type: 8
Name: FloorSmall
ID: 146483541
Type: 8
Name: FloorLongV2
ID: 142103206
Type: 8
Name: FloorLongV1
ID: 137355351
Type: 8
Name: WallCorner_GroundLevel
ID: 135381806
Type: 8
Name: WallCorner_UpperLevel
ID: 142118787
Type: 8
Name: WallDefault_GroundLevel
ID: 140523061
Type: 8
Name: WallDefault_UpperLevel
ID: 148065788
Type: 8
Name: WallLarge_GroundLevel
ID: 138571126
Type: 8
Name: WallLarge_UpperLevel
ID: 141321653
Type: 8
Name: WallTBlock_GroundLevel
ID: 144033065
Type: 8
Name: WallTBlock_UpperLevel
ID: 143422750
Type: 8
Name: WindowLargeClosedV1_GroundLevel
ID: 144185196
Type: 8
Name: WindowLargeClosedV1_UpperLevel
ID: 139481766
Type: 8
Name: WindowLargeClosedV2_UpperLevel
ID: 148869790
Type: 8
Name: WindowSmallOpenedV1_GroundLevel
ID: 139767865
Type: 8
Name: WindowSmallOpenedV1_UpperLevel
ID: 149358260
Type: 8
Name: WindowSmallClosedV1_GroundLevel
ID: 142546138
Type: 8
Name: WindowSmallClosedV1_UpperLevel
ID: 145491414
Type: 8
Name: WindowSmallClosedV2_UpperLevel
ID: 135806521
Type: 8
Name: WindowLargeOpenV1_GroundLevel
ID: 141867906
Type: 8
Name: WindowLargeOpenV1_UpperLevel
ID: 146405629
Type: 8
Name: Beam_Bar
ID: 146273456
Type: 8
Name: Beam_Lights
ID: 150210189
Type: 8
Name: Railings_Three
ID: 137150602
Type: 8
Name: FloorMassive
ID: 147993277
Type: 8

View File

@ -0,0 +1,147 @@
- EID: 0
PrefabID: 117058283
Name: ====Raccoon====
IsActive: true
NumberOfChildren: 2
Components: ~
Scripts: ~
- EID: 1
Name: Player
IsActive: true
NumberOfChildren: 3
Components:
Transform Component:
Translate: {x: 2.35245037, y: 0.38365531, z: 7.10571432}
Rotate: {x: -0, y: 0, z: -0}
Scale: {x: 0.999999881, y: 1, z: 0.999999881}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126974645
IsActive: true
RigidBody Component:
Type: Dynamic
Drag: 0.00999999978
Angular Drag: 0.100000001
Use Gravity: false
Interpolate: false
Sleeping Enabled: true
Freeze Position X: false
Freeze Position Y: true
Freeze Position Z: false
Freeze Rotation X: true
Freeze Rotation Y: true
Freeze Rotation Z: true
IsActive: true
Collider Component:
Colliders:
- Is Trigger: false
Collision Tag: 0
Type: Box
Half Extents: {x: 0.400000006, y: 0.5, z: 0.300000012}
Friction: 0.400000006
Bounciness: 0
Density: 1
Position Offset: {x: 0, y: 0.25, z: 0}
Rotation Offset: {x: 0, y: 0, z: 0}
IsActive: true
Scripts:
- Type: PlayerController
Enabled: true
respawnPoint: 239
currentState: 0
maxMoveVel: 3
moveForce: 50
sprintMultiplier: 1.5
rotationFactorPerFrame: 5
maxJumpHeight: 2
maxJumpTime: 0.75
fallMultipler: 3
lightMultiper: 0.899999976
mediumMultiper: 0.699999988
heavyMultiper: 0.5
- Type: PickAndThrow
Enabled: true
throwForce: [10, 8, 10]
cameraArmOffSet: [0.25, 0.600000024, 0.200000003]
delayTimer: 1
aimingLength: 1
throwItem: false
rayDistance: 0.75
rayHeight: 0.100000001
- EID: 2
Name: HoldingPoint
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0.899999976, z: 0.200000286}
Rotate: {x: 0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 3
Name: PlayerCamera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -5.96046448e-08, z: 0}
Rotate: {x: 0, y: 6.28318548, z: 2.23517329e-08}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 2.12735963, y: 0.362327784, z: 7.98933029}
Pitch: 0
Yaw: 360
Roll: 1.28065994e-06
Width: 2560
Near: 0.00999999978
Far: 10000
Perspective: true
FOV: 45
IsActive: true
Camera Arm Component:
Arm Pitch: 0
Arm Yaw: 0
Arm Length: 3
Look At Camera Origin: true
Target Offset: {x: 0, y: 0.75, z: 0}
Camera Collision: true
IsActive: true
Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true
armLength: 3
turnSpeedPitch: 0.200000003
turnSpeedYaw: 0.400000006
pitchClamp: 45
inverseXControls: false
inverseYControls: false
lowerClamp: 5
- EID: 4
Name: PlayerBag
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -2.98023224e-08, z: 4.76837158e-07}
Rotate: {x: 0, y: 0, z: -0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Renderable Component:
Mesh: 144838771
Material: 123745521
IsActive: true
Scripts: ~
- EID: 5
Name: RespawnPoint
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 2.5, y: 0.660660267, z: 7}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: ====Raccoon====
ID: 117058283
Type: 6

View File

@ -0,0 +1,585 @@
- EID: 1
Name: Canvas1
IsActive: true
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 10
Name: CutScene1
IsActive: true
NumberOfChildren: 3
Components:
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 2
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -550, y: -1200, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 675, y: 1009, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 120028153
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 65542
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 1200, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1000, y: 1032, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 130271494
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 5
Name: pic3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 550, y: -1200, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 756, y: 984, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 118957569
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 11
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 12
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
IsActive: true
UI Component:
Canvas ID: 1
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 3
Name: Camera
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Camera Component:
Position: {x: 0, y: 0, z: 0}
Pitch: 0
Yaw: 0
Roll: 0
Width: 1175
Near: 0.00999999978
Far: 10000
Perspective: true
FOV: 90
IsActive: true
Scripts: ~
- EID: 7
Name: CutsceneManager
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: Cutscene
Enabled: true
duration: 2
cutscene1Points: 4
cutscene1Pics: 10
cutscene2Points: 20
cutscene2Pics: 14
cutscene3Points: 31
cutscene3Pics: 25
canvas1: 1
canvas2: 13
canvas3: 24
- EID: 4
Name: CutScene1Points
IsActive: true
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 0
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -550, y: 0, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 8
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 9
Name: Pic3Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 550, y: 0, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 13
Name: Canvas2
IsActive: false
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: false
Scripts: ~
- EID: 14
Name: CutScene2
IsActive: true
NumberOfChildren: 3
Components:
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 15
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1050, y: 250, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1768, y: 545, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 120947645
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 16
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -300, y: -1200, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1258, y: 596, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129923341
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 17
Name: pic3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1550, y: 0, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 712, y: 1028, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 133191310
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 18
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 19
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
IsActive: true
UI Component:
Canvas ID: 13
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 20
Name: CutScene2Points
IsActive: true
NumberOfChildren: 3
Components: ~
Scripts: ~
- EID: 21
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -50, y: 250, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 22
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -300, y: -200, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 23
Name: Pic3Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 550, y: 0, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 24
Name: Canvas3
IsActive: true
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 25
Name: CutScene3
IsActive: true
NumberOfChildren: 5
Components:
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 26
Name: pic1
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1375, y: 250, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 982, y: 527, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129620984
IsActive: true
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 27
Name: pic2
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 200, y: 1200, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 625, y: 579, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 119078830
IsActive: true
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 28
Name: pic3
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 1700, y: 200, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 529, y: 670, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 133041695
IsActive: true
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 35
Name: pic4
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -1425, y: -200, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1299, y: 575, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117751129
IsActive: true
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 36
Name: pic5
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 500, y: -1275, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 866, y: 483, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 131504451
IsActive: true
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 29
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0.699999988}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1920, y: 1080, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 117531460
IsActive: true
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 30
Name: Text
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 250, y: -500, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 50, y: 50, z: 50}
IsActive: true
Text Renderer Component:
Text: Press Space to contiune
Font: 176667660
IsActive: false
UI Component:
Canvas ID: 24
Hovered: false
Clicked: false
IsActive: true
Scripts: ~
- EID: 31
Name: CutScene3Points
IsActive: true
NumberOfChildren: 5
Components: ~
Scripts: ~
- EID: 32
Name: Pic1Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -375, y: 250, z: 0.5}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 33
Name: Pic2Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 200, y: 200, z: 0.400000006}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 34
Name: Pic3Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 700, y: 200, z: 0.300000012}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 65573
Name: Pic4Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: -225, y: -200, z: 0.200000003}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~
- EID: 38
Name: Pic5Point
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 500, y: -275, z: 0.100000001}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1, y: 1, z: 1}
IsActive: true
Scripts: ~

View File

@ -0,0 +1,3 @@
Name: CutSceneIntro
ID: 91947920
Type: 5

View File

@ -4472,7 +4472,7 @@
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 136892700 Mesh: 136892700
Material: 131956078 Material: 122370915
IsActive: true IsActive: true
RigidBody Component: RigidBody Component:
Type: Dynamic Type: Dynamic
@ -4507,6 +4507,10 @@
currCategory: 1 currCategory: 1
density: 1 density: 1
dontReturn: false dontReturn: false
soundDistance: 10
highlightSpeed: 200
highlightThickness: 600
highlightLowerClamp: 0.25
- EID: 227 - EID: 227
Name: Mesh_Cheese Name: Mesh_Cheese
IsActive: true IsActive: true
@ -4519,7 +4523,7 @@
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 141841143 Mesh: 141841143
Material: 131956078 Material: 122370915
IsActive: true IsActive: true
RigidBody Component: RigidBody Component:
Type: Dynamic Type: Dynamic
@ -4554,6 +4558,10 @@
currCategory: 2 currCategory: 2
density: 1 density: 1
dontReturn: false dontReturn: false
soundDistance: 10
highlightSpeed: 200
highlightThickness: 600
highlightLowerClamp: 0.25
- EID: 65778 - EID: 65778
Name: Mesh_Apple Name: Mesh_Apple
IsActive: true IsActive: true
@ -4566,7 +4574,7 @@
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 144128170 Mesh: 144128170
Material: 131956078 Material: 122370915
IsActive: true IsActive: true
RigidBody Component: RigidBody Component:
Type: Dynamic Type: Dynamic
@ -4601,6 +4609,10 @@
currCategory: 0 currCategory: 0
density: 1 density: 1
dontReturn: false dontReturn: false
soundDistance: 10
highlightSpeed: 200
highlightThickness: 600
highlightLowerClamp: 0.25
- EID: 216 - EID: 216
Name: Mesh_Apple Name: Mesh_Apple
IsActive: true IsActive: true
@ -4613,7 +4625,7 @@
IsActive: true IsActive: true
Renderable Component: Renderable Component:
Mesh: 144128170 Mesh: 144128170
Material: 131956078 Material: 122370915
IsActive: true IsActive: true
RigidBody Component: RigidBody Component:
Type: Dynamic Type: Dynamic
@ -4648,6 +4660,10 @@
currCategory: 0 currCategory: 0
density: 1 density: 1
dontReturn: false dontReturn: false
soundDistance: 10
highlightSpeed: 200
highlightThickness: 600
highlightLowerClamp: 0.25
- EID: 229 - EID: 229
Name: ====ScoreZonePool==== Name: ====ScoreZonePool====
IsActive: true IsActive: true
@ -4967,7 +4983,7 @@
- EID: 217 - EID: 217
Name: ===Anims=== Name: ===Anims===
IsActive: true IsActive: true
NumberOfChildren: 5 NumberOfChildren: 4
Components: ~ Components: ~
Scripts: ~ Scripts: ~
- EID: 221 - EID: 221
@ -5055,7 +5071,7 @@
- EID: 65775 - EID: 65775
Name: Player Name: Player
IsActive: true IsActive: true
NumberOfChildren: 3 NumberOfChildren: 5
Components: Components:
Transform Component: Transform Component:
Translate: {x: -8, y: 1.142977, z: -4} Translate: {x: -8, y: 1.142977, z: -4}
@ -5104,6 +5120,7 @@
maxJumpHeight: 2 maxJumpHeight: 2
maxJumpTime: 0.75 maxJumpTime: 0.75
fallMultipler: 3 fallMultipler: 3
jumpPadMultiplayer: 2
lightMultiper: 0.75 lightMultiper: 0.75
mediumMultiper: 0.5 mediumMultiper: 0.5
heavyMultiper: 0.25 heavyMultiper: 0.25
@ -5114,7 +5131,12 @@
delayTimer: 1 delayTimer: 1
aimingLength: 0.899999976 aimingLength: 0.899999976
throwItem: false throwItem: false
silhouettePlayer: 462
silhouetteBag: 465
rayDistance: 0.5 rayDistance: 0.5
rayHeight: 0.100000001
aimingFOV: 50
defaultFOV: 45
- EID: 65733 - EID: 65733
Name: HoldingPoint Name: HoldingPoint
IsActive: true IsActive: true
@ -5142,10 +5164,10 @@
Yaw: 360 Yaw: 360
Roll: 1.28065994e-06 Roll: 1.28065994e-06
Width: 1920 Width: 1920
Height: 1080
Near: 0.00999999978 Near: 0.00999999978
Far: 10000 Far: 10000
Perspective: true Perspective: true
FOV: 90
IsActive: true IsActive: true
Camera Arm Component: Camera Arm Component:
Arm Pitch: 0 Arm Pitch: 0
@ -5161,10 +5183,10 @@
armLength: 2 armLength: 2
turnSpeedPitch: 0.300000012 turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5 turnSpeedYaw: 0.5
pitchClamp: 45
inverseXControls: true inverseXControls: true
inverseYControls: true inverseYControls: true
lowerClamp: 5 pitchUpperClamp: 45
pitchLowerClamp: 5
- EID: 65731 - EID: 65731
Name: PlayerBag Name: PlayerBag
IsActive: true IsActive: true
@ -5180,6 +5202,36 @@
Material: 123745521 Material: 123745521
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 462
Name: SilouettePlayer
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1.00000012, y: 1, z: 1.00000012}
IsActive: true
Renderable Component:
Mesh: 149697411
Material: 126391182
IsActive: true
Scripts: ~
- EID: 465
Name: SilouetteBag
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 1.00000012, y: 1, z: 1.00000012}
IsActive: true
Renderable Component:
Mesh: 144838771
Material: 126391182
IsActive: true
Scripts: ~
- EID: 65732 - EID: 65732
Name: RespawnPoint Name: RespawnPoint
IsActive: true IsActive: true
@ -5191,3 +5243,50 @@
Scale: {x: 1, y: 1, z: 1} Scale: {x: 1, y: 1, z: 1}
IsActive: true IsActive: true
Scripts: ~ Scripts: ~
- EID: 464
Name: Canvas
IsActive: true
NumberOfChildren: 1
Components:
Canvas Component:
Canvas Width: 1920
Canvas Height: 1080
Scale by canvas width: false
IsActive: true
Scripts: ~
- EID: 460
Name: StealFoodLogo
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 0, y: 0, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 127459277
IsActive: true
UI Component:
Canvas ID: 464
Hovered: false
Clicked: false
IsActive: true
Scripts:
- Type: SHADE_Scripting.UI.StealFoodPopUp
Enabled: true
popInDuration: 0.5
popOutDuration: 0.5
stayDuration: 1
rotationAmt: 1800
scaleAmtX: 538
scaleAmtY: 377
- EID: 463
Name: TweenManager
IsActive: true
NumberOfChildren: 0
Components: ~
Scripts:
- Type: SHADE_Scripting.UI.TweenManager
Enabled: true

View File

@ -1,3 +1,3 @@
Name: Level1Scene Name: Level1
ID: 96668835 ID: 96668835
Type: 5 Type: 5

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
Name: MainGame Name: Level2
ID: 86098106 ID: 86098106
Type: 5 Type: 5

5329
Assets/Scenes/Level3.shade Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
Name: Level3
ID: 88928066
Type: 5

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,10 @@ public class Breakable : Script
{ {
isBreak = true; isBreak = true;
if (GameObject.GetScript<Item>()) if (GameObject.GetScript<Item>())
{
GameManager.Instance.totalItemCount -= 1; GameManager.Instance.totalItemCount -= 1;
GameManager.Instance.itemShatter = true;
}
} }
} }
protected override void onTriggerEnter(CollisionInfo info) protected override void onTriggerEnter(CollisionInfo info)
@ -71,6 +74,7 @@ public class Breakable : Script
gO.Parent = GameObject.Null; gO.Parent = GameObject.Null;
} }
GameManager.Instance.itemShatter = false;
isBreak = false; isBreak = false;
AudioHandler.audioClipHandlers["SFXBreak"].Play(); AudioHandler.audioClipHandlers["SFXBreak"].Play();
GameObject.SetActive(false); GameObject.SetActive(false);

View File

@ -27,6 +27,12 @@ public class Item : Script
private bool checkSound = false; private bool checkSound = false;
public float soundDistance = 10; public float soundDistance = 10;
private float highlightPos = 0.0f;
private Renderable rend;
public float highlightSpeed = 200.0f;
public float highlightThickness = 600.0f;
public float highlightLowerClamp = 0.25f;
protected override void awake() protected override void awake()
{ {
@ -36,6 +42,10 @@ public class Item : Script
if(collider) if(collider)
collider.GetCollisionShape(0).Density = density; collider.GetCollisionShape(0).Density = density;
rend = GetComponent<Renderable>();
if (!rend)
Debug.Log("NO RENDERABLE");
returnBack = false; returnBack = false;
AudioHandler.audioClipHandlers["SFXImpactElastic"] = Audio.CreateAudioClip("event:/Props/impact_elastic"); AudioHandler.audioClipHandlers["SFXImpactElastic"] = Audio.CreateAudioClip("event:/Props/impact_elastic");
@ -45,10 +55,35 @@ public class Item : Script
protected override void start() protected override void start()
{ {
GameManager.Instance.totalItemCount += 1; GameManager.Instance.totalItemCount += 1;
if (rend)
{
if (currCategory == ItemCategory.LIGHT)
{
highlightThickness /= 10;
}
if (currCategory == ItemCategory.MEDIUM)
{
highlightThickness /= 5;
}
rend.Material.SetProperty<float>("data.thickness", highlightThickness);
}
} }
protected override void update() protected override void update()
{ {
if (rend)
{
Vector3 dis = Camera.GetMainCamera().Position - transform.LocalPosition;
float disSqr = dis.GetSqrMagnitude();
float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), highlightLowerClamp, 1.0f);
highlightPos += highlightSpeed * Time.DeltaTimeF * ratio;
rend.Material.SetProperty<float>("data.highlightPosition", highlightPos);
}
if (returnBack && !dontReturn) if (returnBack && !dontReturn)
{ {
if(transform) if(transform)

View File

@ -28,13 +28,20 @@ public class PickAndThrow : Script
public bool throwItem = false; public bool throwItem = false;
private Vector3 prevTargetOffSet; private Vector3 prevTargetOffSet;
public GameObject silhouettePlayer;
public Renderable silhouettePlayerRend;
public GameObject silhouetteBag;
public Renderable silhouetteBagRend;
[Tooltip("Lenght of ray")] [Tooltip("Lenght of ray")]
public float rayDistance = 1; public float rayDistance = 1;
[Tooltip("Height of ray")] [Tooltip("Height of ray")]
public float rayHeight = 0.1f; public float rayHeight = 0.1f;
[Tooltip("FOV when you aim")]
public float aimingFOV = 50; public float aimingFOV = 50;
[Tooltip("Default FOV")]
public float defaultFOV = 45; public float defaultFOV = 45;
protected override void awake() protected override void awake()
@ -51,6 +58,16 @@ public class PickAndThrow : Script
if(!tpc) if(!tpc)
Debug.LogError("TPC EMPTY"); Debug.LogError("TPC EMPTY");
if(!silhouettePlayer)
Debug.LogError("silhouettePlayer EMPTY");
else
silhouettePlayerRend = silhouettePlayer.GetComponent<Renderable>();
if (!silhouetteBag)
Debug.LogError("silhouetteBag EMPTY");
else
silhouetteBagRend = silhouetteBag.GetComponent<Renderable>();
AudioHandler.audioClipHandlers["SFXThrow"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_throw"); AudioHandler.audioClipHandlers["SFXThrow"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_throw");
timer = delayTimer; timer = delayTimer;
@ -62,6 +79,20 @@ public class PickAndThrow : Script
return; return;
} }
if (silhouettePlayerRend && silhouetteBagRend)
{
//wait for daniel
//0.00075f;
Vector3 dis = Camera.GetMainCamera().Position - GameObject.GetComponent<Transform>().LocalPosition;
float disSqr = dis.GetSqrMagnitude();
float ratio = System.Math.Clamp(1 - (disSqr / (1 + disSqr)), 0, 1.0f);
float temp = (1 - ratio) * 0.00075f;
if (temp <= 0.0006f)
temp = 0.1f;
silhouettePlayerRend.Material.SetProperty<float>("data.offset", temp);
silhouetteBagRend.Material.SetProperty<float>("data.offset", temp);
}
if (timer <= delayTimer) if (timer <= delayTimer)
timer += Time.DeltaTimeF; timer += Time.DeltaTimeF;

View File

@ -56,9 +56,9 @@ namespace SHADE_Scripting
arm.Pitch += vel.y * turnSpeedPitch * Time.DeltaTimeF; arm.Pitch += vel.y * turnSpeedPitch * Time.DeltaTimeF;
if (inverseXControls) if (inverseXControls)
arm.Yaw += vel.x * turnSpeedYaw * Time.DeltaTimeF;
else
arm.Yaw -= vel.x * turnSpeedYaw * Time.DeltaTimeF; arm.Yaw -= vel.x * turnSpeedYaw * Time.DeltaTimeF;
else
arm.Yaw += vel.x * turnSpeedYaw * Time.DeltaTimeF;
if (arm.Pitch > pitchUpperClamp) if (arm.Pitch > pitchUpperClamp)
{ {

View File

@ -41,6 +41,28 @@ public class GameManager : Script
public bool GamePause { get; set; } public bool GamePause { get; set; }
public bool itemShatter { get; set; }
protected override void awake()
{
if (Instance != null && Instance != this)
RemoveScript<GameManager>();
else
Instance = this;
totalItemCount = 0;
Score = 0;
currGameState = GameState.START;
itemScored = false;
currMultiplierCombo = 1;
currMultiplierDuration = 0;
fontScalar = new Vector3(multiplierFont / maxMultiplierDuration, multiplierFont / maxMultiplierDuration , multiplierFont / maxMultiplierDuration);
itemShatter = false;
AudioHandler.audioClipHandlers["BGMWin"] = Audio.CreateAudioClip("event:/Music/stingers/game_win");
AudioHandler.audioClipHandlers["BGMLose"] = Audio.CreateAudioClip("event:/Music/stingers/game_lose");
}
protected override void start() protected override void start()
{ {
@ -57,31 +79,6 @@ public class GameManager : Script
AudioHandler.audioClipHandlers["SFXHumming"].Play(); AudioHandler.audioClipHandlers["SFXHumming"].Play();
} }
protected override void awake()
{
if (Instance != null && Instance != this)
RemoveScript<GameManager>();
else
Instance = this;
//AudioHandler.audioClipHandlers["BGMAdaptive"].SetParameter("Detected", 0.0f);
//Audio.PlayBGMOnce2D("event:/Music/player_undetected");
//Audio.PlayBGMOnce2D("event:/Ambience/roomtone_kitchen");
totalItemCount = 0;
Score = 0;
currGameState = GameState.START;
itemScored = false;
currMultiplierCombo = 1;
currMultiplierDuration = 0;
fontScalar = new Vector3(multiplierFont / maxMultiplierDuration, multiplierFont / maxMultiplierDuration , multiplierFont / maxMultiplierDuration);
AudioHandler.audioClipHandlers["BGMWin"] = Audio.CreateAudioClip("event:/Music/stingers/game_win");
AudioHandler.audioClipHandlers["BGMLose"] = Audio.CreateAudioClip("event:/Music/stingers/game_lose");
}
protected override void update() protected override void update()
{ {
if (GamePause) if (GamePause)
@ -100,7 +97,7 @@ public class GameManager : Script
if (itemScored) if (itemScored)
{ {
multiplierText.GetComponent<TextRenderable>().Text = $"X {currMultiplierCombo}"; multiplierText.GetComponent<TextRenderable>().Text = $"X {currMultiplierCombo}";
multiplierText.GetComponent<Transform>().LocalScale -= fontScalar * Time.DeltaTimeF; //multiplierText.GetComponent<Transform>().LocalScale -= fontScalar * Time.DeltaTimeF;
currMultiplierDuration += Time.DeltaTimeF; currMultiplierDuration += Time.DeltaTimeF;
if (currMultiplierDuration >= maxMultiplierDuration) if (currMultiplierDuration >= maxMultiplierDuration)
@ -113,27 +110,23 @@ public class GameManager : Script
} }
else else
{ {
multiplierText.GetComponent<Transform>().LocalScale = Vector3.Zero; //multiplierText.GetComponent<Transform>().LocalScale = Vector3.Zero;
} }
if ((timer > 0 && totalItemCount <= 0) || Input.GetKeyDown(Input.KeyCode.F1)) if ((timer > 0 && totalItemCount <= 0 && !itemShatter) || Input.GetKeyDown(Input.KeyCode.F1))
{ {
currGameState = GameState.WIN; currGameState = GameState.WIN;
//Audio.StopAllSounds(); //Calling this outright breaks audio clip handlers
AudioHandler.stopAllSounds(false); AudioHandler.stopAllSounds(false);
AudioHandler.audioClipHandlers["BGMWin"].Play(); AudioHandler.audioClipHandlers["BGMWin"].Play();
SceneManager.ChangeScene(winScene); SceneManager.ChangeScene(winScene);
//Audio.PlaySFXOnce2D("event:/Music/stingers/game_win");
} }
else if(timer < 0 || Input.GetKeyDown(Input.KeyCode.F2)) else if(timer < 0 || Input.GetKeyDown(Input.KeyCode.F2))
{ {
currGameState = GameState.LOSE; currGameState = GameState.LOSE;
//Audio.StopAllSounds();
AudioHandler.stopAllSounds(false); AudioHandler.stopAllSounds(false);
AudioHandler.audioClipHandlers["BGMLose"].Play(); AudioHandler.audioClipHandlers["BGMLose"].Play();
SceneManager.ChangeScene(loseScene); SceneManager.ChangeScene(loseScene);
//Audio.PlaySFXOnce2D("event:/Music/stingers/game_lose");
} }
} }

View File

@ -0,0 +1,96 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public enum EASING_METHOD
{
EASE_IN_SINE,
EASE_OUT_SINE,
EASE_OUT_BOUNCE,
EASE_IN_BOUNCE,
EASE_INOUT_BOUNCE
}
public static class EasingHelper
{
public static float EaseHelp(float value, EASING_METHOD method)
{
switch (method)
{
case EASING_METHOD.EASE_IN_SINE:
{
return EaseInSine(value);
}break;
case EASING_METHOD.EASE_OUT_SINE:
{
return EaseOutSine(value);
}break;
case EASING_METHOD.EASE_OUT_BOUNCE:
{
return EaseOutBounce(value);
}break;
case EASING_METHOD.EASE_IN_BOUNCE:
{
return EaseInBounce(value);
}
break;
case EASING_METHOD.EASE_INOUT_BOUNCE:
{
return EaseInOutBounce(value);
}
break;
default:
return 0.0f;
}
}
private static float EaseInSine(float value)
{
return (float)(1.0f - Math.Cos((value * Math.PI) / 2.0f));
}
private static float EaseOutSine(float value)
{
return (float)(1.0f - Math.Sin(value * Math.PI) / 2.0f);
}
private static float EaseOutBounce(float value)
{
const float n1 = 7.5625f;
const float d1 = 2.75f;
if (value < 1.0f / d1)
{
return n1 * value * value;
} else if (value < 2.0f / d1)
{
return n1 * (value -= 2.25f / d1) * value + 0.9375f;
}
else
{
return n1 * (value -= 2.625f / d1) * value + 0.984375f;
}
}
private static float EaseInBounce(float value)
{
return 1 - EaseOutBounce(1 - value);
}
private static float EaseInOutBounce(float value)
{
return (value < 0.5f)
?(1.0f - EaseOutBounce(1.0f - 2.0f * value)) / 2.0f
: (1.0f + EaseOutBounce(2.0f * value - 1.0f)) / 2.0f;
}
}
}

View File

@ -0,0 +1,3 @@
Name: EasingHelper
ID: 161000975
Type: 9

View File

@ -0,0 +1,123 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class ButtonFX:Script
{
public string onHoverEnterSound = "event:/Music/player_undetected";
public string onHoverExitSound = "event:/Music/player_undetected";
public string onClickSound = "event:/Music/player_undetected";
public string onReleaseSound = "event:/Music/player_undetected";
[NonSerialized]
private AudioClipHandler onHoverEnterACHandler;
[NonSerialized]
private AudioClipHandler onHoverExitACHandler;
[NonSerialized]
private AudioClipHandler onClickACHandler;
[NonSerialized]
private AudioClipHandler onReleaseACHandler;
[NonSerialized]
private Vector3 defaultScale;
public float hoverScale = 1.1f;
public float clickScale = 0.9f;
[NonSerialized]
private TweenThread thread;
[NonSerialized]
private bool tweening = false;
[NonSerialized]
private float currentScale = 1.0f;
protected override void awake()
{
onHoverEnterACHandler = SHADE.Audio.CreateAudioClip(onHoverEnterSound);
onHoverExitACHandler = SHADE.Audio.CreateAudioClip(onHoverExitSound);
onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound);
onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound);
}
protected override void start()
{
thread = TweenManager.CreateTweenThread(0.1f, 0.9f, 1.0f, EASING_METHOD.EASE_IN_SINE);
Transform transform = GetComponent<Transform>();
if (transform == null)
return;
defaultScale = transform.LocalScale;
UIElement ui = GetComponent<UIElement>();
if (ui == null)
return;
ui.OnClick.RegisterAction(() =>
{
if (onClickSound != "")
onClickACHandler.Play();
tweening = true;
if(thread != null)
thread.Reset(currentScale,clickScale);
});
ui.OnRelease.RegisterAction(() =>
{
if (onReleaseSound != "")
onReleaseACHandler.Play();
tweening = true;
if (thread != null)
thread.Reset(currentScale, 1.0f);
});
ui.OnHoverEnter.RegisterAction(() =>
{
if (onHoverEnterSound != "")
onHoverEnterACHandler.Play();
tweening = true;
if (thread != null)
thread.Reset(currentScale, hoverScale);
});
ui.OnHoverExit.RegisterAction(() =>
{
if (onHoverExitSound != "")
onHoverExitACHandler.Play();
tweening = true;
if (thread != null)
thread.Reset(currentScale, 1.0f);
});
}
protected override void update()
{
Transform transform = GetComponent<Transform>();
if (transform == null)
return;
if (tweening == true && thread != null)
{
Debug.Log("Tweening value " + thread.GetValue());
transform.LocalScale = defaultScale * thread.GetValue();
currentScale = thread.GetValue();
if (thread.IsCompleted())
tweening = false;
}
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_ButtonFX
ID: 163796084
Type: 9

View File

@ -0,0 +1,42 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class ChangeCanvasButton:Script
{
public GameObject canvasToActivate;
protected override void awake()
{
//if (canvasToActivate.GetComponent<Canvas>() == null)
// return;
UIElement ui = GetComponent<UIElement>();
ui.OnRelease.RegisterAction(() =>
{
Canvas.DeactivateAllCanvas();
canvasToActivate.SetActive(true);
});
}
protected override void start()
{
}
protected override void update()
{
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_ChangeCanvasButton
ID: 154633292
Type: 9

View File

@ -25,6 +25,7 @@ public class ChangeSceneButton : Script
else else
{ {
Debug.LogError("Failed to register button action for ChangeSceneButton."); Debug.LogError("Failed to register button action for ChangeSceneButton.");
} }
} }
protected override void update() protected override void update()

View File

@ -0,0 +1,570 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SHADE;
public class Cutscene : Script
{
public float duration = 3.0f;
private float oldDuration = 0.0f;
private Renderable pic1aRenderable;
private Renderable pic1bRenderable;
private Renderable pic1cRenderable;
private Renderable pic2aRenderable;
private Renderable pic2bRenderable;
private Renderable pic2cRenderable;
private Renderable pic3aRenderable;
private Renderable pic3bRenderable;
private Renderable pic3cRenderable;
private Renderable pic3dRenderable;
private Renderable pic3eRenderable;
private Transform pic1aTran;
private Transform pic1bTran;
private Transform pic1cTran;
private Transform pic2aTran;
private Transform pic2bTran;
private Transform pic2cTran;
private Transform pic3aTran;
private Transform pic3bTran;
private Transform pic3cTran;
private Transform pic3dTran;
private Transform pic3eTran;
private float alphaIn = 0.0f;
private float time = 0.0f;
private bool showPic1a = true;
private bool showPic1b = false;
private bool showPic1c = false;
private bool showPic2a = true;
private bool showPic2b = false;
private bool showPic2c = false;
private bool showPic3a = true;
private bool showPic3b = false;
private bool showPic3c = false;
private bool showPic3e = false;
private bool showPic3d = false;
private bool skip = false;
public GameObject cutscene1Points;
private List<Transform> listOfCutscene1Points;
public GameObject cutscene1Pics;
private List<Renderable> listOfCutscene1Pics;
public GameObject cutscene2Points;
private List<Transform> listOfCutscene2Points;
public GameObject cutscene2Pics;
private List<Renderable> listOfCutscene2Pics;
public GameObject cutscene3Points;
private List<Transform> listOfCutscene3Points;
public GameObject cutscene3Pics;
private List<Renderable> listOfCutscene3Pics;
private TextRenderable text1;
private TextRenderable text2;
private TextRenderable text3;
public GameObject canvas1;
public GameObject canvas2;
public GameObject canvas3;
private bool cutscene1Done = false;
private bool cutscene2Done = false;
private bool cutscene3Done = false;
protected override void awake()
{
initCutscene1();
initCutscene2();
initCutscene3();
}
protected override void update()
{
Canvas1();
Canvas2();
Canvas3();
if (Input.GetKeyDown(Input.KeyCode.Space) && !skip && (!cutscene1Done || !cutscene2Done || !cutscene3Done))
{
skip = true;
oldDuration = duration;
duration = 0.1f;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene1Done && canvas1.IsActiveSelf)
{
canvas1.SetActive(false);
canvas2.SetActive(true);
duration = oldDuration;
skip = false;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene2Done && canvas2.IsActiveSelf)
{
canvas2.SetActive(false);
canvas3.SetActive(true);
duration = oldDuration;
skip = false;
}
if (Input.GetKeyDown(Input.KeyCode.Space) && cutscene3Done && canvas3.IsActiveSelf)
{
//change scene
}
}
private void Canvas1()
{
if (canvas1.IsActiveSelf)
{
if (showPic1a)
{
if (time < duration)
{
pic1aTran.LocalPosition = Vector3.Lerp(pic1aTran.LocalPosition, listOfCutscene1Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic1aTran.LocalPosition = listOfCutscene1Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic1aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic1a = false;
showPic1b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic1b)
{
if (time < duration)
{
pic1bTran.LocalPosition = Vector3.Lerp(pic1bTran.LocalPosition, listOfCutscene1Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic1bTran.LocalPosition = listOfCutscene1Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic1bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic1b = false;
showPic1c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic1c)
{
if (time < duration)
{
pic1cTran.LocalPosition = Vector3.Lerp(pic1cTran.LocalPosition, listOfCutscene1Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic1cTran.LocalPosition = listOfCutscene1Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic1cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic1c = false;
cutscene1Done = true;
text1.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void Canvas2()
{
if (canvas2.IsActiveSelf)
{
if (showPic2a)
{
if (time < duration)
{
pic2aTran.LocalPosition = Vector3.Lerp(pic2aTran.LocalPosition, listOfCutscene2Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic2aTran.LocalPosition = listOfCutscene2Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic2aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic2a = false;
showPic2b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic2b)
{
if (time < duration)
{
pic2bTran.LocalPosition = Vector3.Lerp(pic2bTran.LocalPosition, listOfCutscene2Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic2bTran.LocalPosition = listOfCutscene2Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic2bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic2b = false;
showPic2c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic2c)
{
if (time < duration)
{
pic2cTran.LocalPosition = Vector3.Lerp(pic2cTran.LocalPosition, listOfCutscene2Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic2cTran.LocalPosition = listOfCutscene2Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic2cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic2c = false;
cutscene2Done = true;
text2.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void Canvas3()
{
if (canvas3.IsActiveSelf)
{
if (showPic3a)
{
if (time < duration)
{
pic3aTran.LocalPosition = Vector3.Lerp(pic3aTran.LocalPosition, listOfCutscene3Points[0].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3aTran.LocalPosition = listOfCutscene3Points[0].LocalPosition;
alphaIn = 1.0f;
}
pic3aRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3a = false;
showPic3b = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3b)
{
if (time < duration)
{
pic3bTran.LocalPosition = Vector3.Lerp(pic3bTran.LocalPosition, listOfCutscene3Points[1].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3bTran.LocalPosition = listOfCutscene3Points[1].LocalPosition;
alphaIn = 1.0f;
}
pic3bRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3b = false;
showPic3c = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3c)
{
if (time < duration)
{
pic3cTran.LocalPosition = Vector3.Lerp(pic3cTran.LocalPosition, listOfCutscene3Points[2].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3cTran.LocalPosition = listOfCutscene3Points[2].LocalPosition;
alphaIn = 1.0f;
}
pic3cRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3c = false;
showPic3d = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3d)
{
if (time < duration)
{
pic3dTran.LocalPosition = Vector3.Lerp(pic3dTran.LocalPosition, listOfCutscene3Points[3].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3dTran.LocalPosition = listOfCutscene3Points[3].LocalPosition;
alphaIn = 1.0f;
}
pic3dRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3d = false;
showPic3e = true;
time = 0;
alphaIn = 0;
}
}
if (showPic3e)
{
if (time < duration)
{
pic3eTran.LocalPosition = Vector3.Lerp(pic3eTran.LocalPosition, listOfCutscene3Points[4].LocalPosition, time / duration);
alphaIn = SHADE.Math.Lerp(0.0f, 1.0f, time / duration);
time += Time.DeltaTimeF;
}
else
{
pic3eTran.LocalPosition = listOfCutscene3Points[4].LocalPosition;
alphaIn = 1.0f;
}
pic3eRenderable.Material.SetProperty<float>("data.alpha", alphaIn);
if (alphaIn >= 1.0f)
{
showPic3e = false;
cutscene3Done = true;
text3.Enabled = true;
time = 0;
alphaIn = 0;
}
}
}
}
private void initCutscene1()
{
listOfCutscene1Points = cutscene1Points.GetComponentsInChildren<Transform>().ToList();
if (listOfCutscene1Points.Count == 0)
Debug.LogError("Cutscene1Points Empty");
listOfCutscene1Pics = cutscene1Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene1Pics.Count == 0)
Debug.LogError("Cutscene1Pics Empty");
if (listOfCutscene1Pics[0])
{
pic1aRenderable = listOfCutscene1Pics[0].GetComponent<Renderable>();
pic1aTran = listOfCutscene1Pics[0].GetComponent<Transform>();
pic1aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 1 PIC1 MISSING");
if (listOfCutscene1Pics[1])
{
pic1bRenderable = listOfCutscene1Pics[1].GetComponent<Renderable>();
pic1bTran = listOfCutscene1Pics[1].GetComponent<Transform>();
pic1bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 1 PIC2 MISSING");
if (listOfCutscene1Pics[2])
{
pic1cRenderable = listOfCutscene1Pics[2].GetComponent<Renderable>();
pic1cTran = listOfCutscene1Pics[2].GetComponent<Transform>();
pic1cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 1 PIC3 MISSING");
if (canvas1)
{
text1 = canvas1.GetComponentInChildren<TextRenderable>();
text1.Enabled = false;
}
else
Debug.LogError("Canvas 1 missing");
}
private void initCutscene2()
{
listOfCutscene2Points = cutscene2Points.GetComponentsInChildren<Transform>().ToList();
if (listOfCutscene2Points.Count == 0)
Debug.LogError("Cutscene2Points Empty");
listOfCutscene2Pics = cutscene2Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene2Pics.Count == 0)
Debug.LogError("Cutscene2Pics Empty");
if (listOfCutscene2Pics[0])
{
pic2aRenderable = listOfCutscene2Pics[0].GetComponent<Renderable>();
pic2aTran = listOfCutscene2Pics[0].GetComponent<Transform>();
pic2aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC1 MISSING");
if (listOfCutscene2Pics[1])
{
pic2bRenderable = listOfCutscene2Pics[1].GetComponent<Renderable>();
pic2bTran = listOfCutscene2Pics[1].GetComponent<Transform>();
pic2bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC2 MISSING");
if (listOfCutscene2Pics[2])
{
pic2cRenderable = listOfCutscene2Pics[2].GetComponent<Renderable>();
pic2cTran = listOfCutscene2Pics[2].GetComponent<Transform>();
pic2cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC3 MISSING");
if (canvas2)
{
text2 = canvas2.GetComponentInChildren<TextRenderable>();
text2.Enabled = false;
canvas2.SetActive(false);
}
else
Debug.LogError("Canvas 2 missing");
}
private void initCutscene3()
{
listOfCutscene3Points = cutscene3Points.GetComponentsInChildren<Transform>().ToList();
if (listOfCutscene3Points.Count == 0)
Debug.LogError("Cutscene3Points Empty");
listOfCutscene3Pics = cutscene3Pics.GetComponentsInChildren<Renderable>().ToList();
if (listOfCutscene3Pics.Count == 0)
Debug.LogError("Cutscene3Pics Empty");
if (listOfCutscene3Pics[0])
{
pic3aRenderable = listOfCutscene3Pics[0].GetComponent<Renderable>();
pic3aTran = listOfCutscene3Pics[0].GetComponent<Transform>();
pic3aRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC1 MISSING");
if (listOfCutscene3Pics[1])
{
pic3bRenderable = listOfCutscene3Pics[1].GetComponent<Renderable>();
pic3bTran = listOfCutscene3Pics[1].GetComponent<Transform>();
pic3bRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC2 MISSING");
if (listOfCutscene3Pics[2])
{
pic3cRenderable = listOfCutscene3Pics[2].GetComponent<Renderable>();
pic3cTran = listOfCutscene3Pics[2].GetComponent<Transform>();
pic3cRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC3 MISSING");
if (listOfCutscene3Pics[3])
{
pic3dRenderable = listOfCutscene3Pics[3].GetComponent<Renderable>();
pic3dTran = listOfCutscene3Pics[3].GetComponent<Transform>();
pic3dRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 3 PIC4 MISSING");
if (listOfCutscene3Pics[4])
{
pic3eRenderable = listOfCutscene3Pics[4].GetComponent<Renderable>();
pic3eTran = listOfCutscene3Pics[4].GetComponent<Transform>();
pic3eRenderable.Material.SetProperty<float>("data.alpha", 0.0f);
}
else
Debug.LogError("SCENE 2 PIC5 MISSING");
if (canvas3)
{
text3 = canvas3.GetComponentInChildren<TextRenderable>();
text3.Enabled = false;
canvas3.SetActive(false);
}
else
Debug.LogError("Canvas 3 missing");
}
}

View File

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

View File

@ -18,6 +18,7 @@ public class MainMenu : Script
AudioHandler.audioClipHandlers["BGMMainMenu"].Play(); AudioHandler.audioClipHandlers["BGMMainMenu"].Play();
renderable = obj.GetComponent<Renderable>(); renderable = obj.GetComponent<Renderable>();
} }
protected override void start() protected override void start()
@ -25,21 +26,17 @@ public class MainMenu : Script
} }
protected override void update() protected override void update()
{ {
if (Input.GetKeyDown(Input.KeyCode.K) && obj) /* if (Input.GetKeyDown(Input.KeyCode.K) && obj)
{ {
if (renderable.Material.GetProperty<float>("data.alpha") == 1) if (testRenderable.Material.GetProperty<float>("data.alpha") == 1)
{ {
Debug.Log("ALPHA ZERO"); testRenderable.Material.SetProperty<float>("data.alpha", 0);
Debug.Log($"{obj.EntityId}");
obj.GetComponent<Renderable>().Material.SetProperty<float>("data.alpha", 0);
} }
else if (renderable.Material.GetProperty<float>("data.alpha") == 0) else if (testRenderable.Material.GetProperty<float>("data.alpha") == 0)
{ {
Debug.Log("ALPHA ONE"); testRenderable.Material.SetProperty<float>("data.alpha", 1);
Debug.Log($"{obj.EntityId}");
obj.GetComponent<Renderable>().Material.SetProperty<float>("data.alpha", 1);
}
} }
}*/
if (Input.GetKeyDown(Input.KeyCode.Space)) if (Input.GetKeyDown(Input.KeyCode.Space))
{ {

View File

@ -0,0 +1,51 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class MultiImageList:Script
{
public List<MaterialAsset> imageAssetList = new List<MaterialAsset>();
[NonSerialized]
private int index = 0;
protected override void awake()
{
}
protected override void start()
{
}
public void NextImage()
{
++index;
if(index >= imageAssetList.Count())
{
index = 0;
}
Renderable rend = GetComponent<Renderable>();
rend.SetMaterial(imageAssetList[index]);
}
public void PrevImage()
{
if (index == 0)
index = imageAssetList.Count();
--index;
Renderable rend = GetComponent<Renderable>();
rend.SetMaterial(imageAssetList[index]);
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_MultiImageList
ID: 166320642
Type: 9

View File

@ -0,0 +1,40 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class MultiImageListControlButton: Script
{
public bool isNext = true;
public GameObject multiImageList;
protected override void awake()
{
UIElement ui = GetComponent<UIElement>();
if (ui != null)
{
ui.OnRelease.RegisterAction(() =>
{
MultiImageList imageList = multiImageList.GetScript<MultiImageList>();
if(imageList != null)
{
if (isNext)
imageList.NextImage();
else
imageList.PrevImage();
}
});
}
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_MultiImageListControlButton
ID: 164209885
Type: 9

View File

@ -0,0 +1,47 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class ScaleBounce:Script
{
[NonSerialized]
private TweenThread thread;
public float minScale = 1.0f;
public float maxScale = 1.2f;
public float duration = 1.0f;
private Vector3 defaultScale;
protected override void start()
{
thread = TweenManager.CreateTweenThread(duration, minScale, maxScale, EASING_METHOD.EASE_IN_SINE);
Transform trans = GetComponent<Transform>();
if(trans != null)
{
defaultScale = trans.LocalScale;
}
}
protected override void update()
{
Transform trans = GetComponent<Transform>();
if(trans != null)
{
trans.LocalScale = defaultScale * thread.GetValue();
}
if(thread.IsCompleted())
{
thread.ResetInvert();
}
}
}
}

View File

@ -0,0 +1,3 @@
Name: SC_ScaleBounce
ID: 152015842
Type: 9

View File

@ -0,0 +1,41 @@
using SHADE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHADE_Scripting.UI
{
public class SliderText:Script
{
public GameObject sliderObj;
public int minValue = 0;
public int maxValue = 0;
protected override void start()
{
Slider slider = sliderObj.GetComponent<Slider>();
TextRenderable text = GetComponent<TextRenderable>();
if (slider != null && text != null)
{
text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString();
}
}
protected override void update()
{
Slider slider = sliderObj.GetComponent<Slider>();
TextRenderable text = GetComponent<TextRenderable>();
if(slider != null && text != null)
{
text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString();
}
}
}
}

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