From fcfcd2042e62843950a8729912a867f3b9b63aa8 Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Tue, 4 Apr 2023 10:20:11 +0800 Subject: [PATCH] build: :construction: adjust the time of LockingOrOpening the Door --- .../GameClass/GameObj/Character/Character.Skill.cs | 2 +- logic/GameClass/GameObj/Map/Generator.cs | 2 +- logic/Gaming/ActionManager.cs | 13 ++++++------- logic/Preparation/Utility/GameData.cs | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/logic/GameClass/GameObj/Character/Character.Skill.cs b/logic/GameClass/GameObj/Character/Character.Skill.cs index a1dc379..61b0c96 100644 --- a/logic/GameClass/GameObj/Character/Character.Skill.cs +++ b/logic/GameClass/GameObj/Character/Character.Skill.cs @@ -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时进行 diff --git a/logic/GameClass/GameObj/Map/Generator.cs b/logic/GameClass/GameObj/Map/Generator.cs index 4c68df9..53d9d14 100644 --- a/logic/GameClass/GameObj/Map/Generator.cs +++ b/logic/GameClass/GameObj/Map/Generator.cs @@ -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) diff --git a/logic/Gaming/ActionManager.cs b/logic/Gaming/ActionManager.cs index 35f6c38..2cf1f00 100644 --- a/logic/Gaming/ActionManager.cs +++ b/logic/Gaming/ActionManager.cs @@ -68,20 +68,19 @@ namespace Gaming () => { new FrameRateTaskExecutor( - 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; - } } ) diff --git a/logic/Preparation/Utility/GameData.cs b/logic/Preparation/Utility/GameData.cs index 7ef90e5..46cc842 100644 --- a/logic/Preparation/Utility/GameData.cs +++ b/logic/Preparation/Utility/GameData.cs @@ -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;