Compare commits

...

3 Commits

Author SHA1 Message Date
Sri Sham Haran 0f7d86543f Fix adaptive bgm not changing on alert 2023-04-02 18:16:25 +08:00
Glence 8ffca03f16 AI fix 2023-04-02 13:32:21 +08:00
XiaoQiDigipen 724f8ae2cf
Merge pull request #456 from SHADE-DP/Navigation
adjusted hitbox timing
2023-04-02 12:48:39 +08:00
3 changed files with 8 additions and 6 deletions

View File

@ -50,11 +50,13 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework
protected override void onTriggerStay(CollisionInfo info) protected override void onTriggerStay(CollisionInfo info)
{ {
if(info.GameObject.GetScript<PlayerController>()) if (info.GameObject.GetScript<PlayerController>())
{
pc = info.GameObject.GetScript<PlayerController>(); pc = info.GameObject.GetScript<PlayerController>();
if (ai && ai.atk && pc) if (ai && ai.atk && pc)
{ {
raccoonFound = true; raccoonFound = true;
}
} }
} }

View File

@ -52,7 +52,7 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework.States
} }
} }
SHADE.Audio.SetParameterWithLabel("PlayerDetection", "Detected");
} }
public override void OnExit() public override void OnExit()

View File

@ -88,7 +88,7 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework.States
public override void update() public override void update()
{ {
if (ai.hitboxScript.raccoonFound) if (ai.hitboxScript.raccoonFound && machine.GetScript<HomeOwnerAI>().atk)
{ {
raccoonCaught = true; raccoonCaught = true;
Transform pcTransform = ai.player.GetComponent<Transform>(); Transform pcTransform = ai.player.GetComponent<Transform>();