Compare commits
7 Commits
PlayerCont
...
main
Author | SHA1 | Date |
---|---|---|
Sri Sham Haran | 0f7d86543f | |
Glence | 8ffca03f16 | |
XiaoQiDigipen | 724f8ae2cf | |
maverickdgg | f495dfe4fd | |
Glence | e5c8f4c380 | |
Glence | f114a7f59a | |
XiaoQiDigipen | 273bdfcdcc |
|
@ -8832,7 +8832,7 @@
|
|||
- Type: SHADE_Scripting.UI.PreviewLevel
|
||||
Enabled: true
|
||||
levelTransistion: 619
|
||||
endPoint1: [-5.5, 1.5, -2]
|
||||
endPoint1: [-5.5, 1.20000005, -2]
|
||||
endPoint2: [1, 1.5, -7.5]
|
||||
endPoint3: [2.5, 1.5, -3]
|
||||
playerCamera: 65730
|
||||
|
@ -8844,7 +8844,7 @@
|
|||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -7.5, y: 1.5, z: -2}
|
||||
Translate: {x: -7.5, y: 1.20000005, z: -2}
|
||||
Rotate: {x: 0, y: 0, z: 0}
|
||||
Scale: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
|
|
|
@ -17095,7 +17095,7 @@
|
|||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -5, y: 1.5, z: -3}
|
||||
Translate: {x: -4.5, y: 1.5, z: -3.5}
|
||||
Rotate: {x: 0, y: -2.3561945, z: 0}
|
||||
Scale: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
|
|
|
@ -9383,7 +9383,7 @@
|
|||
levelTransistion: 229
|
||||
endPoint1: [-1.79999995, 1.5, 0.5]
|
||||
endPoint2: [5, 3.5, 0.5]
|
||||
endPoint3: [-0.5, 1.5, 3.5]
|
||||
endPoint3: [0.5, 1.5, 0.5]
|
||||
playerCamera: 66063
|
||||
gameplayCanvas: 66062
|
||||
duration: 3
|
||||
|
@ -9437,14 +9437,14 @@
|
|||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: 3.5, y: 1.5, z: 0}
|
||||
Rotate: {x: 0, y: 2.26892805, z: 0}
|
||||
Translate: {x: 5.5, y: 1.5, z: 0.5}
|
||||
Rotate: {x: 0, y: 1.57079637, z: 0}
|
||||
Scale: {x: 0.999999821, y: 1, z: 0.999999821}
|
||||
IsActive: true
|
||||
Camera Component:
|
||||
Position: {x: 2.5, y: 1.5, z: -7.5}
|
||||
Pitch: 0
|
||||
Yaw: 130
|
||||
Yaw: 90
|
||||
Roll: 0
|
||||
Width: 1920
|
||||
Near: 0.00999999978
|
||||
|
|
|
@ -50,11 +50,13 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework
|
|||
|
||||
protected override void onTriggerStay(CollisionInfo info)
|
||||
{
|
||||
if(info.GameObject.GetScript<PlayerController>())
|
||||
if (info.GameObject.GetScript<PlayerController>())
|
||||
{
|
||||
pc = info.GameObject.GetScript<PlayerController>();
|
||||
if (ai && ai.atk && pc)
|
||||
{
|
||||
raccoonFound = true;
|
||||
if (ai && ai.atk && pc)
|
||||
{
|
||||
raccoonFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework.States
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
SHADE.Audio.SetParameterWithLabel("PlayerDetection", "Detected");
|
||||
|
||||
}
|
||||
public override void OnExit()
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework.States
|
|||
|
||||
public override void update()
|
||||
{
|
||||
if (ai.hitboxScript.raccoonFound)
|
||||
if (ai.hitboxScript.raccoonFound && machine.GetScript<HomeOwnerAI>().atk)
|
||||
{
|
||||
raccoonCaught = true;
|
||||
Transform pcTransform = ai.player.GetComponent<Transform>();
|
||||
|
@ -128,7 +128,7 @@ namespace SHADE_Scripting.Gameplay.AIBehaviour.AIRework.States
|
|||
else if (seq)
|
||||
{
|
||||
|
||||
if (timer <= 1.0f / 30.0f)
|
||||
if (timer <= seqTime * 0.5f)
|
||||
{
|
||||
//ai.attackHitbox.SetActive(true);
|
||||
machine.GetScript<HomeOwnerAI>().atk = true;
|
||||
|
|
|
@ -471,6 +471,9 @@ public class PlayerController : Script
|
|||
|
||||
private void Gravity()
|
||||
{
|
||||
if (currentState == RaccoonStates.CAUGHT)
|
||||
return;
|
||||
|
||||
if (rb != null)
|
||||
{
|
||||
//check player vel.y if its close to zero its on the ground
|
||||
|
@ -554,6 +557,7 @@ public class PlayerController : Script
|
|||
rb.ClearTorque();
|
||||
rb.LinearVelocity = Vector3.Zero;
|
||||
rb.AngularVelocity = Vector3.Zero;
|
||||
collider.GetCollisionShape(0).IsTrigger = true;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
@ -565,6 +569,7 @@ public class PlayerController : Script
|
|||
if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState)))
|
||||
stateMachine.SetState(typeof(PlayerIdleState));
|
||||
|
||||
collider.GetCollisionShape(0).IsTrigger = false;
|
||||
tranform.GlobalPosition = respawnPoint.GetComponent<Transform>().GlobalPosition;
|
||||
|
||||
GameManager.Instance.RacoonCaught();
|
||||
|
|
Loading…
Reference in New Issue