Update Night of Horror authored by Hong, Xin's avatar Hong, Xin
...@@ -3,6 +3,7 @@ title: Night of Horror ...@@ -3,6 +3,7 @@ title: Night of Horror
--- ---
[Toc] [Toc]
# Game Design Document # Game Design Document
...@@ -149,48 +150,6 @@ public class PlayerInput : MonoBehaviour ...@@ -149,48 +150,6 @@ public class PlayerInput : MonoBehaviour
} }
``` ```
```csharp ```csharp
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovingState : PlayerState
{
protected Vector2 movementInput;
protected float movementSpeed = 3f;
public PlayerMovingState(PlayerStateMachine playerStateMachine) : base(playerStateMachine)
{
}
public override void Enter()
{
base.Enter();
ResetCameraRotation();
}
public override void Update()
{
base.Update();
MovementInput();
}
public override void PhysicsUpdate()
{
base.PhysicsUpdate();
Move();
}
public override void Exit()
{
base.Exit();
}
private void ResetCameraRotation() private void ResetCameraRotation()
{ {
Vector3 cameraForward = stateMachine.Player.cameraTransform.forward; Vector3 cameraForward = stateMachine.Player.cameraTransform.forward;
...@@ -232,7 +191,6 @@ public class PlayerMovingState : PlayerState ...@@ -232,7 +191,6 @@ public class PlayerMovingState : PlayerState
stateMachine.Player.playerRigidbody.velocity = Vector3.zero; stateMachine.Player.playerRigidbody.velocity = Vector3.zero;
} }
} }
}
``` ```
* Monster spawning and patrol logic * Monster spawning and patrol logic
... ...
......