diff --git a/logic/GameClass/GameObj/Character/Character.Student.cs b/logic/GameClass/GameObj/Character/Character.Student.cs index 1be3f9b..fc09937 100644 --- a/logic/GameClass/GameObj/Character/Character.Student.cs +++ b/logic/GameClass/GameObj/Character/Character.Student.cs @@ -6,8 +6,6 @@ namespace GameClass.GameObj { public class Student : Character { - - private readonly object beAttackedLock = new(); /// /// 遭受攻击 /// diff --git a/logic/GameClass/GameObj/Character/Character.cs b/logic/GameClass/GameObj/Character/Character.cs index 19a3487..78d3136 100644 --- a/logic/GameClass/GameObj/Character/Character.cs +++ b/logic/GameClass/GameObj/Character/Character.cs @@ -10,8 +10,10 @@ namespace GameClass.GameObj { public partial class Character : Moveable, ICharacter // 负责人LHR摆烂终了 { + #region 装弹、攻击相关的基本属性及方法 + + protected readonly object beAttackedLock = new(); - #region 装弹攻击相关的基本属性及方法 /// /// 装弹冷却 /// diff --git a/logic/Gaming/PropManager.cs b/logic/Gaming/PropManager.cs index fc786e9..fa64622 100644 --- a/logic/Gaming/PropManager.cs +++ b/logic/Gaming/PropManager.cs @@ -59,13 +59,10 @@ namespace Gaming if (indexing == GameData.maxNumOfPropInPropInventory) return false; - Prop? pickProp = new NullProp(); + Prop pickProp = new NullProp(); if (propType == PropType.Null) // 自动检查有无道具可捡 { - pickProp = (Prop?)gameMap.OneInTheSameCell(player.Position, GameObjType.Prop); - if (pickProp != null) - player.PropInventory[indexing] = pickProp; - else player.PropInventory[indexing] = pickProp = new NullProp(); + pickProp = player.PropInventory[indexing] = ((Prop?)gameMap.OneInTheSameCell(player.Position, GameObjType.Prop)) ?? new NullProp(); } else { diff --git a/logic/规则Logic.md b/logic/规则Logic.md index 74beaeb..21ecc27 100644 --- a/logic/规则Logic.md +++ b/logic/规则Logic.md @@ -253,11 +253,11 @@ - 窗必须在两个墙之间,另外两侧不能为墙 ### 箱子 -- *监管者和求生者都能与箱子交互,同一时刻只允许一人进行开启* +- 监管者和求生者都能与箱子交互,同一时刻只允许一人进行开启 - 开启箱子有不同概率获得不同道具。 -- *开启箱子的基础持续时间为10秒。* -- *未开启完成的箱子在下一次需要重新开始开启。* -- *箱子开启后其中道具才可以被观测和拿取* +- 开启箱子的基础持续时间为10秒。 +- 未开启完成的箱子在下一次需要重新开始开启。 +- 箱子开启后其中道具才可以被观测和拿取 - [箱子道具不刷新] - [箱子不可被关闭] - [箱子内道具最多两个] @@ -294,4 +294,4 @@ ### 救人 - 一般情况下,救人时间为1秒。 -- *不能两人同时救一个人* +- 不能两人同时救一个人