Browse Source

build: 🚧 adjust the time of LockingOrOpening the Door

tags/0.1.0
shangfengh 2 years ago
parent
commit
fcfcd2042e
4 changed files with 10 additions and 11 deletions
  1. +1
    -1
      logic/GameClass/GameObj/Character/Character.Skill.cs
  2. +1
    -1
      logic/GameClass/GameObj/Map/Generator.cs
  3. +6
    -7
      logic/Gaming/ActionManager.cs
  4. +2
    -2
      logic/Preparation/Utility/GameData.cs

+ 1
- 1
logic/GameClass/GameObj/Character/Character.Skill.cs View File

@@ -76,7 +76,7 @@ namespace GameClass.GameObj
foreach (var activeSkill in this.Occupation.ListOfIActiveSkill)
{
this.IActiveSkillDictionary.Add(activeSkill, SkillFactory.FindIActiveSkill(activeSkill));
this.TimeUntilActiveSkillAvailable.Add(activeSkill, 0);
this.TimeUntilActiveSkillAvailable.Add(activeSkill, IActiveSkillDictionary[activeSkill].SkillCD);
}

// UsePassiveSkill(); //创建player时开始被动技能,这一过程也可以放到gamestart时进行


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

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

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


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

@@ -68,20 +68,19 @@ namespace Gaming
() =>
{
new FrameRateTaskExecutor<int>(
loopCondition: () => player.PlayerState == PlayerStateType.Fixing && gameMap.Timer.IsGaming && generatorForFix.DegreeOfRepair < GameData.degreeOfFixedGenerator,
loopCondition: () => gameMap.Timer.IsGaming && player.PlayerState == PlayerStateType.Fixing,
loopToDo: () =>
{
generatorForFix.Repair(player.FixSpeed * GameData.frameDuration, player);
if (generatorForFix.Repair(player.FixSpeed * GameData.frameDuration, player))
{
player.PlayerState = PlayerStateType.Null;
gameMap.NumOfRepairedGenerators++;
}
},
timeInterval: GameData.frameDuration,
finallyReturn: () => 0
)
.Start();
if (generatorForFix.DegreeOfRepair >= GameData.degreeOfFixedGenerator)
{
gameMap.NumOfRepairedGenerators++;
if (player.PlayerState == PlayerStateType.Fixing) player.PlayerState = PlayerStateType.Null;
}
}

)


+ 2
- 2
logic/Preparation/Utility/GameData.cs View File

@@ -84,7 +84,7 @@ namespace Preparation.Utility

public const int basicTreatSpeed = 100;
public const int basicFixSpeed = 100;
public const int basicSpeedOfOpeningOrLocking = 30;
public const int basicSpeedOfOpeningOrLocking = 40;
public const int basicStudentSpeedOfClimbingThroughWindows = 611;
public const int basicGhostSpeedOfClimbingThroughWindows = 1270;
public const int basicSpeedOfOpenChest = 1000;
@@ -229,7 +229,7 @@ namespace Preparation.Utility
#endregion
#region 物体相关
public const int degreeOfFixedGenerator = 10300000;
public const int degreeOfLockingOrOpeningTheDoor = 10000;
public const int degreeOfLockingOrOpeningTheDoor = 100000;
public const int degreeOfOpenedChest = 10000;
public const int degreeOfOpenedDoorway = 18000;
public const int maxNumOfPropInChest = 2;


Loading…
Cancel
Save