Implemented such that AI gets sent to a waypoint of choice (in editor) after capture #391
|
@ -277,7 +277,12 @@
|
|||
Position Offset: {x: 0, y: 0.5, z: 0}
|
||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.Audio.SoundLoopEmitter
|
||||
Enabled: true
|
||||
clipHandlerName: "SFXWash65"
|
||||
clipPath: "event:/Props/washing_machine_loop"
|
||||
volume: 0.300000012
|
||||
- EID: 66
|
||||
Name: washingMachineDoor
|
||||
IsActive: true
|
||||
|
@ -418,7 +423,12 @@
|
|||
Position Offset: {x: 0, y: 0.5, z: 0}
|
||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.Audio.SoundLoopEmitter
|
||||
Enabled: true
|
||||
clipHandlerName: "SFXWash43"
|
||||
clipPath: "event:/Props/washing_machine_loop"
|
||||
volume: 0.300000012
|
||||
- EID: 44
|
||||
Name: washingMachineDoor
|
||||
IsActive: true
|
||||
|
@ -460,7 +470,12 @@
|
|||
Position Offset: {x: 0, y: 0.5, z: 0}
|
||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.Audio.SoundLoopEmitter
|
||||
Enabled: true
|
||||
clipHandlerName: "SFXWash42"
|
||||
clipPath: "event:/Props/washing_machine_loop"
|
||||
volume: 0.300000012
|
||||
- EID: 131081
|
||||
Name: washingMachineDoor
|
||||
IsActive: true
|
||||
|
|
|
@ -464,6 +464,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak144
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -1652,6 +1654,8 @@
|
|||
Enabled: true
|
||||
threshHold: 4
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXWatermelonBreak464
|
||||
breakClipPath: event:/Props/impact_watermelon_break
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 500
|
||||
|
@ -2064,6 +2068,8 @@
|
|||
Enabled: true
|
||||
threshHold: 4
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXWatermelonBreak522
|
||||
breakClipPath: event:/Props/impact_watermelon_break
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 500
|
||||
|
@ -2085,8 +2091,8 @@
|
|||
Scale: {x: 1, y: 1, z: 1}
|
||||
IsActive: false
|
||||
Renderable Component:
|
||||
Mesh: 0
|
||||
Material: 0
|
||||
Mesh: 144023586
|
||||
Material: 122370915
|
||||
IsActive: false
|
||||
RigidBody Component:
|
||||
Type: Dynamic
|
||||
|
@ -2182,8 +2188,8 @@
|
|||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -0.230162144, y: -0.0580062866, z: -0.00789308548}
|
||||
Rotate: {x: 0, y: 3.6088712e-09, z: 1.97286229e-16}
|
||||
Translate: {x: 0, y: 0, z: 0}
|
||||
Rotate: {x: 0, y: 0, z: 0}
|
||||
Scale: {x: 1, y: 1, z: 1}
|
||||
IsActive: false
|
||||
Renderable Component:
|
||||
|
@ -2195,8 +2201,8 @@
|
|||
Drag: 0.00999999978
|
||||
Angular Drag: 0.100000001
|
||||
Use Gravity: true
|
||||
Interpolate: false
|
||||
Sleeping Enabled: true
|
||||
Interpolate: true
|
||||
Sleeping Enabled: false
|
||||
Freeze Position X: false
|
||||
Freeze Position Y: false
|
||||
Freeze Position Z: false
|
||||
|
@ -2374,6 +2380,8 @@
|
|||
Enabled: true
|
||||
threshHold: 4
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXWatermelonBreak156
|
||||
breakClipPath: event:/Props/impact_watermelon_break
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 500
|
||||
|
@ -2684,6 +2692,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak533
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -2903,6 +2913,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak538
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -3122,6 +3134,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak543
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -3506,18 +3520,18 @@
|
|||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 206
|
||||
Name: Timer
|
||||
Name: Timer Text
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
NumberOfChildren: 1
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: 500, y: 400, z: 0.100000001}
|
||||
Translate: {x: 700, y: 400, z: 0.100000001}
|
||||
Rotate: {x: 0, y: 0, z: 0}
|
||||
Scale: {x: 60, y: 60, z: 60}
|
||||
IsActive: true
|
||||
Text Renderer Component:
|
||||
Text: My name is Brandon.
|
||||
Font: 176667660
|
||||
Font: 174412429
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
|
@ -3527,6 +3541,26 @@
|
|||
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: 199
|
||||
Hovered: false
|
||||
Clicked: false
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 139
|
||||
Name: Multiplier Text
|
||||
IsActive: true
|
||||
|
@ -3554,7 +3588,7 @@
|
|||
maxSize: 1
|
||||
minSize: 0.300000012
|
||||
minAlpha: 0.300000012
|
||||
- EID: 520
|
||||
- EID: 519
|
||||
Name: Multiplier BG
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -3806,6 +3840,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak1
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 196
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4015,6 +4051,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak171
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 65703
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4224,6 +4262,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak150
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 149
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4433,6 +4473,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak145
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 488
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4642,6 +4684,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak492
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 493
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4851,6 +4895,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak497
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 498
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5060,6 +5106,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak502
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 503
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5269,6 +5317,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak507
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 508
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5478,6 +5528,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak512
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 513
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5687,6 +5739,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak517
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 518
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5728,7 +5782,7 @@
|
|||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: false
|
||||
Scripts: ~
|
||||
- EID: 519
|
||||
- EID: 461
|
||||
Name: Piece2
|
||||
IsActive: false
|
||||
NumberOfChildren: 0
|
||||
|
@ -5769,7 +5823,7 @@
|
|||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: false
|
||||
Scripts: ~
|
||||
- EID: 461
|
||||
- EID: 460
|
||||
Name: Piece3
|
||||
IsActive: false
|
||||
NumberOfChildren: 0
|
||||
|
@ -5810,7 +5864,7 @@
|
|||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: false
|
||||
Scripts: ~
|
||||
- EID: 460
|
||||
- EID: 459
|
||||
Name: Piece4
|
||||
IsActive: false
|
||||
NumberOfChildren: 0
|
||||
|
@ -6065,14 +6119,14 @@
|
|||
Enabled: true
|
||||
- EID: 10
|
||||
Name: Pause Canvas
|
||||
IsActive: true
|
||||
IsActive: false
|
||||
NumberOfChildren: 4
|
||||
Components:
|
||||
Canvas Component:
|
||||
Canvas Width: 1920
|
||||
Canvas Height: 1080
|
||||
Scale by canvas width: false
|
||||
IsActive: true
|
||||
IsActive: false
|
||||
Scripts: ~
|
||||
- EID: 8
|
||||
Name: ResumeButton
|
||||
|
@ -6140,7 +6194,7 @@
|
|||
onReleaseSound: event:/Music/player_undetected
|
||||
hoverScale: 1.10000002
|
||||
clickScale: 0.899999976
|
||||
- EID: 459
|
||||
- EID: 458
|
||||
Name: RetryButton
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -11917,7 +11971,7 @@
|
|||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 458
|
||||
- EID: 457
|
||||
Name: Exterior
|
||||
IsActive: true
|
||||
NumberOfChildren: 5
|
||||
|
@ -14581,7 +14635,7 @@
|
|||
Material: 131956078
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 457
|
||||
- EID: 174
|
||||
Name: Exterior_Bush02
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14596,7 +14650,7 @@
|
|||
Material: 131956078
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 174
|
||||
- EID: 173
|
||||
Name: Exterior_Bush01
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14611,7 +14665,7 @@
|
|||
Material: 131956078
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 173
|
||||
- EID: 172
|
||||
Name: Exterior_Bush02
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14626,7 +14680,7 @@
|
|||
Material: 131956078
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 172
|
||||
- EID: 548
|
||||
Name: TweenManager
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14634,7 +14688,7 @@
|
|||
Scripts:
|
||||
- Type: SHADE_Scripting.UI.TweenManager
|
||||
Enabled: true
|
||||
- EID: 548
|
||||
- EID: 549
|
||||
Name: StealFoodCanvas
|
||||
IsActive: true
|
||||
NumberOfChildren: 1
|
||||
|
@ -14645,7 +14699,7 @@
|
|||
Scale by canvas width: false
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 549
|
||||
- EID: 550
|
||||
Name: StealFoodLogo
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14660,7 +14714,7 @@
|
|||
Material: 127459277
|
||||
IsActive: true
|
||||
UI Component:
|
||||
Canvas ID: 548
|
||||
Canvas ID: 549
|
||||
Hovered: false
|
||||
Clicked: false
|
||||
IsActive: true
|
||||
|
@ -14673,7 +14727,7 @@
|
|||
rotationAmt: 1800
|
||||
scaleAmtX: 538
|
||||
scaleAmtY: 377
|
||||
- EID: 550
|
||||
- EID: 551
|
||||
Name: TransitionCanvas
|
||||
IsActive: true
|
||||
NumberOfChildren: 1
|
||||
|
@ -14684,7 +14738,7 @@
|
|||
Scale by canvas width: false
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 551
|
||||
- EID: 552
|
||||
Name: Transition
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14699,7 +14753,7 @@
|
|||
Material: 120016136
|
||||
IsActive: true
|
||||
UI Component:
|
||||
Canvas ID: 550
|
||||
Canvas ID: 551
|
||||
Hovered: false
|
||||
Clicked: false
|
||||
IsActive: true
|
||||
|
@ -14709,7 +14763,7 @@
|
|||
alphaValue: 1
|
||||
fadeInTime: 0.5
|
||||
fadeOutTime: 0.5
|
||||
- EID: 552
|
||||
- EID: 553
|
||||
Name: TweenManager
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14717,7 +14771,7 @@
|
|||
Scripts:
|
||||
- Type: SHADE_Scripting.UI.TweenManager
|
||||
Enabled: true
|
||||
- EID: 553
|
||||
- EID: 554
|
||||
Name: CameraPoints
|
||||
IsActive: true
|
||||
NumberOfChildren: 3
|
||||
|
@ -14730,7 +14784,7 @@
|
|||
endPoint3: [1.14999998, 2.20000005, 2]
|
||||
playerCamera: 4
|
||||
duration: 3
|
||||
- EID: 554
|
||||
- EID: 555
|
||||
Name: PreviewLevel1
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14752,7 +14806,7 @@
|
|||
FOV: 90
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 555
|
||||
- EID: 556
|
||||
Name: PreviewLevel2
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
@ -14774,7 +14828,7 @@
|
|||
FOV: 90
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 556
|
||||
- EID: 557
|
||||
Name: PreviewLevel3
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
|
|
|
@ -1100,7 +1100,11 @@
|
|||
Hovered: false
|
||||
Clicked: false
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.UI.ScrollingCredits
|
||||
Enabled: true
|
||||
endY: 4000
|
||||
duration: 20
|
||||
- EID: 48
|
||||
Name: BackButton
|
||||
IsActive: true
|
||||
|
@ -1131,23 +1135,23 @@
|
|||
canvasToActivate: 0
|
||||
- EID: 49
|
||||
Name: Credits Title Text
|
||||
IsActive: true
|
||||
IsActive: false
|
||||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -150, y: 400, z: 0.100000001}
|
||||
Rotate: {x: 0, y: 0, z: 0}
|
||||
Scale: {x: 100, y: 100, z: 1}
|
||||
IsActive: true
|
||||
IsActive: false
|
||||
Text Renderer Component:
|
||||
Text: Credits
|
||||
Font: 174412429
|
||||
IsActive: true
|
||||
IsActive: false
|
||||
UI Component:
|
||||
Canvas ID: 46
|
||||
Hovered: false
|
||||
Clicked: false
|
||||
IsActive: true
|
||||
IsActive: false
|
||||
Scripts: ~
|
||||
- EID: 50
|
||||
Name: Level Select Canvas
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
using SHADE;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SHADE_Scripting.Audio
|
||||
{
|
||||
public class SoundLoopEmitter : Script
|
||||
{
|
||||
[SerializeField]
|
||||
private string clipHandlerName;
|
||||
|
||||
[SerializeField]
|
||||
private string clipPath;
|
||||
|
||||
public float volume;
|
||||
|
||||
protected override void awake()
|
||||
{
|
||||
AudioHandler.audioClipHandlers[clipHandlerName] = SHADE.Audio.CreateAudioClip(clipPath);
|
||||
}
|
||||
|
||||
protected override void start()
|
||||
{
|
||||
SHADE.Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers[clipHandlerName], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers[clipHandlerName].SetVolume(volume);
|
||||
AudioHandler.audioClipHandlers[clipHandlerName].Play();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
Name: CS_SoundLoopEmitter
|
||||
ID: 154714630
|
||||
Type: 9
|
|
@ -115,8 +115,14 @@ public partial class Homeowner1 : BehaviourTree
|
|||
AudioHandler.audioClipHandlers["BGMAdaptive"] = Audio.CreateAudioClip("event:/Music/bgm_adaptive");
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXFootstep"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_footsteps");
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXFootstep"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXDetectAh"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_detect_raccoon");
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXDetectAh"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXDetectSting"] = Audio.CreateAudioClip("event:/Music/stingers/player_detected");
|
||||
AudioHandler.audioClipHandlers["SFXHumming"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_humming");
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXHumming"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].SetVolume(0.15f);
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].Play();
|
||||
|
||||
if (aiInstance != null && aiInstance != this)
|
||||
RemoveScript<Homeowner1>();
|
||||
|
|
|
@ -14,6 +14,12 @@ public class Breakable : Script
|
|||
public bool isBreak { get; set; }
|
||||
private List<GameObject> itemPieces = new List<GameObject>();
|
||||
|
||||
[SerializeField]
|
||||
private string breakClipHandlerName;
|
||||
|
||||
[SerializeField]
|
||||
private string breakClipPath;
|
||||
|
||||
protected override void awake()
|
||||
{
|
||||
rb = GetComponent<RigidBody>();
|
||||
|
@ -32,7 +38,7 @@ public class Breakable : Script
|
|||
|
||||
isBreak = false;
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXBreak"] = Audio.CreateAudioClip("event:/Props/impact_break");
|
||||
AudioHandler.audioClipHandlers[breakClipHandlerName] = Audio.CreateAudioClip(breakClipPath);
|
||||
}
|
||||
|
||||
protected override void update()
|
||||
|
@ -76,7 +82,9 @@ public class Breakable : Script
|
|||
|
||||
GameManager.Instance.itemShatter = false;
|
||||
isBreak = false;
|
||||
AudioHandler.audioClipHandlers["SFXBreak"].Play();
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers[breakClipHandlerName], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers[breakClipHandlerName].Play();
|
||||
//Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers[breakClipHandlerName]);
|
||||
GameObject.SetActive(false);
|
||||
}
|
||||
}
|
|
@ -121,11 +121,15 @@ public class Item : Script
|
|||
|
||||
if (playSound)
|
||||
{
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXImpactElastic"], GameObject.EntityId);
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXImpactHard"], GameObject.EntityId);
|
||||
if (currCategory == ItemCategory.LIGHT)
|
||||
AudioHandler.audioClipHandlers["SFXImpactElastic"].Play();
|
||||
else if (currCategory == ItemCategory.MEDIUM || currCategory == ItemCategory.HEAVY)
|
||||
AudioHandler.audioClipHandlers["SFXImpactHard"].Play();
|
||||
playSound = false;
|
||||
Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers["SFXImpactElastic"]);
|
||||
Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers["SFXImpactHard"]);
|
||||
}
|
||||
|
||||
if (info.GameObject.GetScript<Homeowner1>() && !returnBack)
|
||||
|
|
|
@ -76,9 +76,9 @@ public class GameManager : Script
|
|||
goingToLose = false;
|
||||
|
||||
if (scoreText)
|
||||
scoreText.GetComponent<TextRenderable>().Text = $"Score: {Score}";
|
||||
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
|
||||
if (timeText)
|
||||
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0")}";
|
||||
timeText.GetComponent<TextRenderable>().Text = $"{timer.ToString("0")}";
|
||||
}
|
||||
|
||||
protected override void start()
|
||||
|
@ -91,10 +91,6 @@ public class GameManager : Script
|
|||
AudioHandler.audioClipHandlers["KitchenAmbience"] = Audio.CreateAudioClip("event:/Ambience/roomtone_kitchen");
|
||||
AudioHandler.audioClipHandlers["KitchenAmbience"].Play();
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXHumming"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_humming");
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].SetVolume(0.15f);
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].Play();
|
||||
|
||||
if (SceneFadeInOut.Instance != null)
|
||||
SceneFadeInOut.Instance.CallFadeOut();
|
||||
Application.IsCursorVisible = false;
|
||||
|
@ -105,7 +101,7 @@ public class GameManager : Script
|
|||
if (GamePause || !stealFoodPopUpDone)
|
||||
{
|
||||
Input.SetMouseCentering(false);
|
||||
//Application.IsCursorVisible = true;
|
||||
Application.IsCursorVisible = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -117,12 +113,10 @@ public class GameManager : Script
|
|||
if(scoreText)
|
||||
scoreText.GetComponent<TextRenderable>().Text = $"{Score}";
|
||||
if(timeText)
|
||||
timeText.GetComponent<TextRenderable>().Text = $"Time Left: {timer.ToString("0")}";
|
||||
timeText.GetComponent<TextRenderable>().Text = $"{timer.ToString("0.00")}";
|
||||
|
||||
if (itemScored)
|
||||
{
|
||||
//multiplierText.GetComponent<TextRenderable>().Text = $"X {currMultiplierCombo}";
|
||||
//multiplierText.GetComponent<Transform>().LocalScale -= fontScalar * Time.DeltaTimeF;
|
||||
currMultiplierDuration += Time.DeltaTimeF;
|
||||
|
||||
if (currMultiplierDuration >= maxMultiplierDuration)
|
||||
|
@ -197,7 +191,6 @@ public class GameManager : Script
|
|||
totalItemCount -= 1;
|
||||
itemScored = true;
|
||||
currMultiplierDuration = 0;
|
||||
//multiplierText.GetComponent<Transform>().LocalScale = new Vector3(multiplierFont, multiplierFont, multiplierFont);
|
||||
|
||||
if (currMultiplierCombo < maxMultiplierCombo)
|
||||
currMultiplierCombo += 1;
|
||||
|
@ -205,9 +198,9 @@ public class GameManager : Script
|
|||
MultiplierTextFx fx = multiplierText.GetScript<MultiplierTextFx>();
|
||||
if (fx)
|
||||
{
|
||||
fx.ShowMultiplier(currMultiplierCombo, maxMultiplierDuration);
|
||||
fx.ShowMultiplier(currMultiplierCombo, maxMultiplierDuration);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
using SHADE;
|
||||
using SHADE_Scripting.Audio;
|
||||
using System;
|
||||
|
||||
public class JumpPad : Script
|
||||
{
|
||||
protected override void awake()
|
||||
{
|
||||
AudioHandler.audioClipHandlers["SFXJumpPad"] = Audio.CreateAudioClip("event:/Props/jumppad_boing");
|
||||
}
|
||||
|
||||
protected override void update()
|
||||
|
@ -15,6 +17,8 @@ public class JumpPad : Script
|
|||
{
|
||||
if (info.GameObject.GetScript<PlayerController>() && info.GameObject.GetScript<PlayerController>().currentState == PlayerController.RaccoonStates.FALLING)
|
||||
{
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXJumpPad"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXJumpPad"].Play();
|
||||
info.GameObject.GetScript<PlayerController>().landedOnJumpPad = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,12 +52,15 @@ namespace SHADE_Scripting.UI
|
|||
|
||||
private static float EaseInSine(float value)
|
||||
{
|
||||
return (float)(1.0f - Math.Cos((value * Math.PI / 2.0f)));
|
||||
|
||||
return (float)(1.0f - Math.Cos((value * Math.PI / 2.0f) ));
|
||||
|
||||
}
|
||||
|
||||
private static float EaseOutSine(float value)
|
||||
{
|
||||
return (float)(Math.Sin(value * Math.PI / 2.0f));
|
||||
return (float)(Math.Sin(value * Math.PI / 2.0f) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ public class EndScene : Script
|
|||
|
||||
protected override void start()
|
||||
{
|
||||
Input.SetMouseCentering(false);
|
||||
Debug.Log("EndScene::Start():");
|
||||
Application.IsCursorVisible = true;
|
||||
//Input.SetMouseCentering(false);
|
||||
//Application.IsCursorVisible = true;
|
||||
SceneFadeInOut.Instance.CallFadeOut();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ public class MainMenu : Script
|
|||
|
||||
protected override void start()
|
||||
{
|
||||
Input.SetMouseCentering(false);
|
||||
Application.IsCursorVisible = true;
|
||||
//Input.SetMouseCentering(false);
|
||||
//Application.IsCursorVisible = true;
|
||||
SceneFadeInOut.Instance.CallFadeOut();
|
||||
}
|
||||
protected override void update()
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace SHADE_Scripting.UI
|
|||
{
|
||||
[NonSerialized]
|
||||
private TweenThread sizeThread;
|
||||
private TweenThread sizeInvertThread;
|
||||
private TweenThread alphaThread;
|
||||
|
||||
|
||||
|
@ -20,6 +21,7 @@ namespace SHADE_Scripting.UI
|
|||
|
||||
|
||||
private bool showMultiplier = false;
|
||||
const float sizeUpDuration = 0.1f;
|
||||
|
||||
[NonSerialized]
|
||||
private Vector3 defaultScale;
|
||||
|
@ -27,6 +29,7 @@ namespace SHADE_Scripting.UI
|
|||
protected override void start()
|
||||
{
|
||||
sizeThread = TweenManager.CreateTweenThread(0.0f, maxSize, minSize, EASING_METHOD.EASE_IN_SINE);
|
||||
sizeInvertThread = TweenManager.CreateTweenThread(sizeUpDuration, minSize, maxSize, EASING_METHOD.EASE_IN_SINE);
|
||||
alphaThread = TweenManager.CreateTweenThread(0.0f, 1.0f, minAlpha, EASING_METHOD.EASE_OUT_SINE);
|
||||
Transform transform = GetComponent<Transform>();
|
||||
if (transform != null)
|
||||
|
@ -43,8 +46,29 @@ namespace SHADE_Scripting.UI
|
|||
protected override void update()
|
||||
{
|
||||
Transform transform = GetComponent<Transform>();
|
||||
|
||||
|
||||
if (transform != null && showMultiplier == true)
|
||||
{
|
||||
if(!sizeInvertThread.IsCompleted())
|
||||
{
|
||||
transform.LocalScale = defaultScale * sizeInvertThread.GetValue();
|
||||
|
||||
Renderable rend = GetComponentInChildren<Renderable>();
|
||||
if(rend)
|
||||
{
|
||||
rend.Material.SetProperty<float>("data.alpha", 1.0f);
|
||||
}
|
||||
|
||||
TextRenderable text = GetComponent<TextRenderable>();
|
||||
if (text)
|
||||
{
|
||||
Color clr = text.TextColor;
|
||||
text.TextColor = new Color(clr.r, clr.g, clr.b, 1.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(sizeThread.IsCompleted())
|
||||
{
|
||||
transform.LocalScale = Vector3.Zero;
|
||||
|
@ -53,7 +77,18 @@ namespace SHADE_Scripting.UI
|
|||
else
|
||||
{
|
||||
transform.LocalScale = defaultScale * sizeThread.GetValue();
|
||||
GetComponentInChildren<Renderable>().Material.SetProperty<float>("data.alpha",alphaThread.GetValue());
|
||||
|
||||
Renderable rend = GetComponentInChildren<Renderable>();
|
||||
if (rend)
|
||||
{
|
||||
rend.Material.SetProperty<float>("data.alpha", alphaThread.GetValue());
|
||||
}
|
||||
TextRenderable text = GetComponent<TextRenderable>();
|
||||
if(text)
|
||||
{
|
||||
Color clr = text.TextColor;
|
||||
text.TextColor = new Color(clr.r,clr.g,clr.b,alphaThread.GetValue() * 1.3f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,9 +97,10 @@ namespace SHADE_Scripting.UI
|
|||
public void ShowMultiplier(int multiplier, float duration)
|
||||
{
|
||||
GetComponent<TextRenderable>().Text = $"X {multiplier}";
|
||||
sizeThread.duration = duration;
|
||||
alphaThread.duration = duration;
|
||||
sizeThread.duration = duration + sizeUpDuration;
|
||||
alphaThread.duration = duration + sizeUpDuration;
|
||||
|
||||
sizeInvertThread.Reset();
|
||||
sizeThread.Reset();
|
||||
alphaThread.Reset();
|
||||
showMultiplier = true;
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using SHADE;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SHADE_Scripting.UI
|
||||
{
|
||||
public class ScrollingCredits: Script
|
||||
{
|
||||
|
||||
public float endY = 4000.0f;
|
||||
public float duration = 30.0f;
|
||||
|
||||
|
||||
[NonSerialized]
|
||||
TweenThread thread;
|
||||
|
||||
protected override void awake()
|
||||
{
|
||||
base.awake();
|
||||
|
||||
}
|
||||
|
||||
protected override void start()
|
||||
{
|
||||
base.start();
|
||||
|
||||
Transform transform = GetComponent<Transform>();
|
||||
if(transform != null)
|
||||
{
|
||||
thread = TweenManager.CreateTweenThread(duration, transform.LocalPosition.y, endY, EASING_METHOD.EASE_IN_SINE);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void update()
|
||||
{
|
||||
base.update();
|
||||
|
||||
Transform transform = GetComponent<Transform>();
|
||||
|
||||
if(thread != null && transform != null)
|
||||
{
|
||||
transform.LocalPosition = new Vector3( transform.LocalPosition.x ,thread.GetValue() , transform.LocalPosition.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
Name: SC_ScrollingCredits
|
||||
ID: 159139676
|
||||
Type: 9
|
|
@ -19,6 +19,7 @@ of DigiPen Institute of Technology is prohibited.
|
|||
#include "Assets/NativeAsset.hxx"
|
||||
#include "Utility/Convert.hxx"
|
||||
|
||||
|
||||
namespace SHADE
|
||||
{
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
|
@ -55,4 +56,16 @@ namespace SHADE
|
|||
GetNativeComponent()->SetFont(value.NativeObject);
|
||||
}
|
||||
}
|
||||
|
||||
Color TextRenderable::TextColor::get()
|
||||
{
|
||||
return Convert::ToCLI(GetNativeComponent()->GetColor());
|
||||
}
|
||||
|
||||
void TextRenderable::TextColor::set(Color value)
|
||||
{
|
||||
GetNativeComponent()->SetColor(Convert::ToNative(value));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -60,6 +60,13 @@ namespace SHADE
|
|||
FontAsset get();
|
||||
void set(FontAsset value);
|
||||
}
|
||||
|
||||
property Color TextColor
|
||||
{
|
||||
Color get();
|
||||
void set(Color value);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace SHADE
|
|||
: Component(entity)
|
||||
{}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Properties */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace SHADE
|
|||
}
|
||||
void Application::IsCursorVisible::set(bool value)
|
||||
{
|
||||
SHWindow::SetMouseVisible(value);
|
||||
//SHWindow::SetMouseVisible(value);
|
||||
}
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Usage Functions */
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace SHADE
|
|||
|
||||
void Input::SetMouseCentering(bool state)
|
||||
{
|
||||
SHInputManager::SetMouseCentering(state);
|
||||
//SHInputManager::SetMouseCentering(state);
|
||||
}
|
||||
|
||||
bool Input::GetMouseCentering()
|
||||
|
|
Loading…
Reference in New Issue