Updated Audio and Scene along with bug fixes #285

Merged
glencelow merged 4 commits from PlayerController into main 2022-11-25 23:11:02 +08:00
5 changed files with 16 additions and 7 deletions
Showing only changes of commit 1302a7e58d - Show all commits

View File

@ -8526,8 +8526,8 @@
moveForce: 50
sprintMultiplier: 1.5
rotationFactorPerFrame: 5
maxJumpHeight: 1
maxJumpTime: 0.5
maxJumpHeight: 2
maxJumpTime: 0.75
fallMultipler: 3
lightMultiper: 0.75
mediumMultiper: 0.5
@ -8633,7 +8633,7 @@
IsActive: true
Renderable Component:
Mesh: 140964851
Material: 126974645
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic
@ -8837,7 +8837,7 @@
IsActive: true
Renderable Component:
Mesh: 140964851
Material: 126974645
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic
@ -9041,7 +9041,7 @@
IsActive: true
Renderable Component:
Mesh: 140964851
Material: 126974645
Material: 124370424
IsActive: true
RigidBody Component:
Type: Dynamic

View File

@ -240,6 +240,8 @@ public partial class LeafPatrol : BehaviourTreeNode
{
//Debug.Log("Unalert");
Audio.PlaySFXOnce2D("event:/Homeowner/humming");
Audio.StopAllSounds();
Audio.PlayBGMOnce2D("event:/Music/player_undetected");
}
SetNodeData("isAlert", false);
}

View File

@ -186,12 +186,18 @@ public partial class LeafSearch : BehaviourTreeNode
{
SetNodeData("isAlert", true);
Audio.PlaySFXOnce2D("event:/Homeowner/homeowner_detect_raccoon");
Audio.PlaySFXOnce2D("event:/Music/stingers/player_detected");
Audio.StopAllSounds();
Audio.PlayBGMOnce2D("event:/Music/player_detected");
}
else
{
if (GetNodeData("isAlert") != null && (bool)GetNodeData("isAlert") == false)
{
Audio.PlaySFXOnce2D("event:/Homeowner/homeowner_detect_raccoon");
Audio.PlaySFXOnce2D("event:/Music/stingers/player_detected");
Audio.StopAllSounds();
Audio.PlayBGMOnce2D("event:/Music/player_detected");
}
SetNodeData("isAlert", true);
}

View File

@ -119,7 +119,6 @@ public class PlayerController : Script
protected override void lateUpdate()
{
//rb.FreezePositionY = false;
}
protected override void update()
{
@ -152,6 +151,7 @@ public class PlayerController : Script
camArm = GetComponentInChildren<CameraArm>();
Rotation();
Jump();
GotCaught();
//Debug.Log($"{currentState}");
//Debug.Log($" axisX: {axisMove.x} axisY:{axisMove.y}");
@ -165,7 +165,6 @@ public class PlayerController : Script
MoveKey();
Move();
Sprint();
Jump();
Gravity();
//Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}");
}

View File

@ -14,12 +14,14 @@ public class EndScene : Script
if (Input.GetKey(Input.KeyCode.R))
{
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
Audio.StopAllSounds();
SceneManager.ChangeScene(mainGameScene);
}
if (Input.GetKey(Input.KeyCode.M))
{
Audio.PlaySFXOnce2D("event:/UI/mouse_down_element");
Audio.StopAllSounds();
SceneManager.ChangeScene(mainMainScene);
}