Browse Source

fix: 🚑 fix the bug about Graduating

tags/v0.1.0
shangfengh 2 years ago
parent
commit
64d4c3236f
4 changed files with 23 additions and 8 deletions
  1. +8
    -2
      docs/版本更新说明.md
  2. +5
    -5
      logic/GameClass/GameObj/Map/Map.cs
  3. +6
    -1
      logic/Gaming/ActionManager.cs
  4. +4
    -0
      logic/Preparation/Utility/GameData.cs

+ 8
- 2
docs/版本更新说明.md View File

@@ -70,9 +70,15 @@
# 5月22日11:00更新
- fix:修复了开校门的bug

# 5月25日21:00更新
# 5月25日20:00更新
- fix:修复了多线程的问题
- fix:修复了终局得分的问题
- fix:修复了唤醒卡死的问题

# 5月25日21:00更新
- fix:修复了可以学习完成作业的问题
- fix:修复了HaveTea越界的问题

# 5月25日更新
- fix:修复了可以学习完成作业的问题
- fix:修复了终局得分的问题
- fix:修复了开校门的问题

+ 5
- 5
logic/GameClass/GameObj/Map/Map.cs View File

@@ -73,6 +73,8 @@ namespace GameClass.GameObj

public void MapEscapeStudent()
{
if (Interlocked.Increment(ref numOfRemovedStudent) == GameData.numOfStudent - 1)
OpenEmergencyExit();
if (Interlocked.Increment(ref numOfNoHpStudent) == GameData.numOfStudent)
{
AddScoreFromAddict();
@@ -80,11 +82,11 @@ namespace GameClass.GameObj
return;
}
Interlocked.Increment(ref numOfEscapedStudent);
if (Interlocked.Increment(ref numOfRemovedStudent) == GameData.numOfStudent - 1)
OpenEmergencyExit();
}
public void MapDieStudent()
{
if (Interlocked.Increment(ref numOfRemovedStudent) == GameData.numOfStudent - 1)
OpenEmergencyExit();
uint noHp = Interlocked.Increment(ref numOfNoHpStudent);
ghost!.AddScore(GameData.TrickerScoreStudentDie);
if (noHp == GameData.numOfStudent)
@@ -94,8 +96,6 @@ namespace GameClass.GameObj
return;
}
Interlocked.Increment(ref numOfDeceasedStudent);
if (Interlocked.Increment(ref numOfRemovedStudent) == GameData.numOfStudent - 1)
OpenEmergencyExit();
}
public void MapAddictStudent()
{
@@ -130,7 +130,7 @@ namespace GameClass.GameObj
}
private void AddScoreFromAddict()
{
ghost.AddScore(GameData.TrickerScoreStudentDie * (GameData.numOfStudent - NumOfRemovedStudent));
ghost!.AddScore(GameData.TrickerScoreStudentDie * (GameData.numOfStudent - NumOfRemovedStudent));
}




+ 6
- 1
logic/Gaming/ActionManager.cs View File

@@ -148,12 +148,17 @@ namespace Gaming
() =>
{
player.ThreadNum.WaitOne();
if (!doorwayToOpen.TryToOpen())
{
player.ThreadNum.Release();
player.ResetPlayerState(stateNum);
return;
}
if (!player.StartThread(stateNum, RunningStateType.RunningSleepily))
{
player.ThreadNum.Release();
return;
}
doorwayToOpen.TryToOpen();
Thread.Sleep(GameData.degreeOfOpenedDoorway - doorwayToOpen.OpenDegree);

if (player.ResetPlayerState(stateNum))


+ 4
- 0
logic/Preparation/Utility/GameData.cs View File

@@ -91,7 +91,11 @@ namespace Preparation.Utility
public const int characterRadius = numOfPosGridPerCell * 4 / 10; // 人物半径

public const int basicTreatSpeed = 100;
#if DEBUG
public const int basicFixSpeed = 1800;
#else
public const int basicFixSpeed = 123;
#endif
public const int basicSpeedOfOpeningOrLocking = 5000;
public const int basicStudentSpeedOfClimbingThroughWindows = 1222;
public const int basicGhostSpeedOfClimbingThroughWindows = 2540;


Loading…
Cancel
Save