diff --git a/logic/GameClass/GameObj/Character/Character.cs b/logic/GameClass/GameObj/Character/Character.cs index 6ab6ba1..95788f8 100644 --- a/logic/GameClass/GameObj/Character/Character.cs +++ b/logic/GameClass/GameObj/Character/Character.cs @@ -65,7 +65,7 @@ namespace GameClass.GameObj } set { - if (!(value == PlayerStateType.IsMoving || value == PlayerStateType.Null)) + if (!(value == PlayerStateType.IsMoving)) lock (gameObjLock) IsMoving = false; @@ -477,6 +477,7 @@ namespace GameClass.GameObj playerState = playerStateType; CanMove = false; IsResetting = true; + Position = GameData.PosWhoDie; } } diff --git a/logic/GameClass/Skill/ActiveSkill.cs b/logic/GameClass/Skill/ActiveSkill.cs index 87ff08c..c67e969 100644 --- a/logic/GameClass/Skill/ActiveSkill.cs +++ b/logic/GameClass/Skill/ActiveSkill.cs @@ -214,6 +214,10 @@ namespace GameClass.Skill { case BecomeInvisible: return ActiveSkillType.BecomeInvisible; + case UseKnife: + return ActiveSkillType.UseKnife; + case BeginToCharge: + return ActiveSkillType.BeginToCharge; default: return ActiveSkillType.Null; } diff --git a/logic/Gaming/ActionManager.cs b/logic/Gaming/ActionManager.cs index 16df5fc..20c00d8 100644 --- a/logic/Gaming/ActionManager.cs +++ b/logic/Gaming/ActionManager.cs @@ -22,6 +22,20 @@ namespace Gaming return true; } + public bool Stop(Character player) + { + if (player.PlayerState == PlayerStateType.IsRescuing || player.PlayerState == PlayerStateType.IsRescued + || player.PlayerState == PlayerStateType.IsFixing || player.PlayerState == PlayerStateType.IsMoving + || player.PlayerState == PlayerStateType.IsTreated || player.PlayerState == PlayerStateType.IsTreating + || player.PlayerState == PlayerStateType.IsClosingDoor || player.PlayerState == PlayerStateType.IsOpeningDoor + || player.PlayerState == PlayerStateType.IsClimbingThtoughWindows) + { + player.PlayerState = PlayerStateType.Null; + return true; + } + return false; + } + public bool Fix(Student player)// 自动检查有无发电机可修 { if (player.PlayerState != PlayerStateType.Null || player.IsGhost()) diff --git a/logic/Gaming/Game.cs b/logic/Gaming/Game.cs index b63ecd0..c9f5f4d 100644 --- a/logic/Gaming/Game.cs +++ b/logic/Gaming/Game.cs @@ -243,6 +243,18 @@ namespace Gaming } return false; } + public bool Stop(long playerID) + { + if (!gameMap.Timer.IsGaming) + return false; + Character player = gameMap.FindPlayer(playerID); + if (player != null) + { + return actionManager.Stop(player); + } + return false; + } + public void Attack(long playerID, double angle) { if (!gameMap.Timer.IsGaming) diff --git a/logic/Preparation/Utility/EnumType.cs b/logic/Preparation/Utility/EnumType.cs index 19d3a04..37fffbe 100644 --- a/logic/Preparation/Utility/EnumType.cs +++ b/logic/Preparation/Utility/EnumType.cs @@ -19,6 +19,9 @@ namespace Preparation.Utility IsRescued = 10, IsStunned = 11, IsTryingToAttack = 12,//指前摇 + IsOpeningDoor = 13, + IsClosingDoor = 14, + IsClimbingThtoughWindows = 15, } public enum GameObjType { @@ -79,7 +82,7 @@ namespace Preparation.Utility NuclearWeapon = 3, SuperFast = 4, UseKnife = 5, - ASkill5 = 6 + BeginToCharge = 6 } public enum PassiveSkillType { diff --git a/logic/Preparation/Utility/GameData.cs b/logic/Preparation/Utility/GameData.cs index 813cb0a..51b3875 100644 --- a/logic/Preparation/Utility/GameData.cs +++ b/logic/Preparation/Utility/GameData.cs @@ -7,7 +7,7 @@ namespace Preparation.Utility { #region 基本常数与常方法 public const int numOfPosGridPerCell = 1000; // 每格的【坐标单位】数 - public const int numOfStepPerSecond = 100; // 每秒行走的步数 + public const int numOfStepPerSecond = 20; // 每秒行走的步数 public const int frameDuration = 50; // 每帧时长 public const int lengthOfMap = 50000; // 地图长度