Raccoon animation and scene changes #415

Merged
glencelow merged 16 commits from PlayerController into main 2023-03-10 17:28:16 +08:00
3 changed files with 9 additions and 4 deletions
Showing only changes of commit a3318d500d - Show all commits

View File

@ -1,4 +1,5 @@
using SHADE; using SHADE;
using SHADE_Scripting.Audio;
using System; using System;
public class PlayerRunState : BaseState public class PlayerRunState : BaseState
@ -26,7 +27,7 @@ public class PlayerRunState : BaseState
if (timer > delay) if (timer > delay)
{ {
Audio.PlaySFXOnce2D("event:/Raccoon/raccoon_footsteps"); AudioHandler.audioClipHandlers["footsteps"].Play();
timer = 0; timer = 0;
} }
} }

View File

@ -1,4 +1,5 @@
using SHADE; using SHADE;
using SHADE_Scripting.Audio;
using System; using System;
public class PlayerWalkState : BaseState public class PlayerWalkState : BaseState
@ -40,7 +41,7 @@ public class PlayerWalkState : BaseState
if (timer > delay) if (timer > delay)
{ {
Audio.PlaySFXOnce2D("event:/Raccoon/raccoon_footsteps"); AudioHandler.audioClipHandlers["footsteps"].Play();
timer = 0; timer = 0;
} }
} }

View File

@ -1,6 +1,7 @@
using SHADE; using SHADE;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using SHADE_Scripting.Audio;
using static Item; using static Item;
public class PlayerController : Script public class PlayerController : Script
@ -131,6 +132,8 @@ public class PlayerController : Script
silhouetteBagRend = silhouetteBag.GetComponent<Renderable>(); silhouetteBagRend = silhouetteBag.GetComponent<Renderable>();
silhouetteBagRend.Material.SetProperty<float>("data.offset", 0.1f); silhouetteBagRend.Material.SetProperty<float>("data.offset", 0.1f);
} }
AudioHandler.audioClipHandlers["footsteps"] = Audio.CreateAudioClip("event:/Raccoon/raccoon_footsteps");
} }
protected override void start() protected override void start()