... | ... | @@ -5,6 +5,7 @@ title: Night of Horror |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Toc]
|
|
|
# Game Design Document
|
|
|
|
... | ... | @@ -205,7 +206,6 @@ private void Move() |
|
|
* State switching logic
|
|
|
+ During the patrol, the monster will constantly detect whether the player has entered its detection range (determined by distance and angle). If the player enters the range, the current monster will switch to the pursuit state. Under certain conditions (the player obtains the crystal), all monsters switch to the pursuit state.
|
|
|
+ Keycode
|
|
|
* Monster generation and patrol target initialization
|
|
|
```csharp
|
|
|
private void InitialiseSpawnPoints()
|
|
|
{
|
... | ... | @@ -239,7 +239,6 @@ public Vector3 GetRandomSpawnLocation() |
|
|
return spawnTransform.position;
|
|
|
}
|
|
|
```
|
|
|
* Patrol logic implementation
|
|
|
```csharp
|
|
|
private void Patrol()
|
|
|
{
|
... | ... | @@ -267,7 +266,6 @@ private void SetNewPatrolTarget() |
|
|
}
|
|
|
}
|
|
|
```
|
|
|
* State switching
|
|
|
```csharp
|
|
|
private bool DetectPlayer()
|
|
|
{
|
... | ... | @@ -314,7 +312,6 @@ public void ActivateGlobalChase() |
|
|
* When the monster approaches the player and reaches the capture distance, the capture logic is triggered.
|
|
|
* The game ends after the player is captured.
|
|
|
* Keycode
|
|
|
+ Normal pursuit
|
|
|
```csharp
|
|
|
private void Pursuit()
|
|
|
{
|
... | ... | @@ -389,8 +386,6 @@ private bool PlayerInChaseRange() |
|
|
return false;
|
|
|
}
|
|
|
```
|
|
|
|
|
|
+ Global pursuit
|
|
|
```csharp
|
|
|
private void Pursuit()
|
|
|
{
|
... | ... | |