Browse Source

fix: 🐛 fix the bug about NumOfRepairedGenerators

tags/0.1.0
shangfengh 2 years ago
parent
commit
05a251d881
3 changed files with 5 additions and 4 deletions
  1. +1
    -1
      logic/GameClass/GameObj/Map/Generator.cs
  2. +2
    -3
      logic/Gaming/ActionManager.cs
  3. +2
    -0
      logic/Gaming/CharacterManager .cs

+ 1
- 1
logic/GameClass/GameObj/Map/Generator.cs View File

@@ -46,7 +46,7 @@ namespace GameClass.GameObj

public bool Repair(int addDegree, Character character)
{
if (DegreeOfRepair == GameData.degreeOfFixedGenerator) return true;
if (DegreeOfRepair == GameData.degreeOfFixedGenerator) return false;
int orgDegreeOfRepair = degreeOfRepair;
DegreeOfRepair += addDegree;
if (DegreeOfRepair > orgDegreeOfRepair)


+ 2
- 3
logic/Gaming/ActionManager.cs View File

@@ -79,10 +79,9 @@ namespace Gaming
loopToDo: () =>
{
if (generatorForFix.Repair(player.FixSpeed * GameData.frameDuration, player))
{
characterManager.SetPlayerState(player);
gameMap.NumOfRepairedGenerators++;
}
if (generatorForFix.DegreeOfRepair == GameData.degreeOfFixedGenerator)
characterManager.SetPlayerState(player);
},
timeInterval: GameData.frameDuration,
finallyReturn: () => 0


+ 2
- 0
logic/Gaming/CharacterManager .cs View File

@@ -397,8 +397,10 @@ namespace Gaming
((SummonGolem)(((Golem)player).Parent.FindIActiveSkill(ActiveSkillType.SummonGolem))).GolemSummoned = null;
player.FindIActiveSkill(ActiveSkillType.UseRobot).IsBeingUsed = false;
}
gameMap.Remove(player);
return;
}
gameMap.Remove(player);
++gameMap.NumOfDeceasedStudent;
}



Loading…
Cancel
Save