Browse Source

fix: 📝 fix something wrong about docs

tags/v0.1.0
shangfengh 2 years ago
parent
commit
d9fe7b54dd
4 changed files with 22 additions and 18 deletions
  1. +1
    -0
      docs/游戏机制与平衡性调整更新草案.md
  2. +2
    -1
      docs/版本更新说明.md
  3. +3
    -17
      logic/GameClass/GameObj/GameObj.cs
  4. +16
    -0
      logic/GameClass/GameObj/Moveable.cs

+ 1
- 0
docs/游戏机制与平衡性调整更新草案.md View File

@@ -69,6 +69,7 @@ v1.0
- CD:0s,持续时间:0s
- TechOtaku的Robot的PlayerId = TechOtaku的PlayerId + n*5(一局游戏理论人数),其中1<=n<=3
修改后:

| 学生职业 | 教师Teacher | 健身狂Athlete |学霸StraightAStudent | 开心果Sunshine | 机器人Robot | TechOtaku |
| :------------ | :------------------ | :------------------ | :------------------ | :------------------ | :------------------ | :------------------ |
| 移动速度/s | 2700 | 3150 | 2880 | 3000 | 2700 | 2880 |


+ 2
- 1
docs/版本更新说明.md View File

@@ -6,4 +6,5 @@
# 等待更新的更改
- docs:添加了 游戏机制与平衡性调整更新草案.pdf
- docs:添加了 版本更新说明.pdf
- docs&hotfix: 修正了GameRules.pdf中学生翻窗速度的错误
- docs&hotfix: 修正了GameRules.pdf中学生翻窗速度的错误
- remove: 删除了Place属性

+ 3
- 17
logic/GameClass/GameObj/GameObj.cs View File

@@ -21,22 +21,8 @@ namespace GameClass.GameObj
public const long invalidID = long.MaxValue; // 无效的ID
public long ID { get; }

private XY position;
public XY Position
{
get
{
lock (gameObjLock)
return position;
}
set
{
lock (gameObjLock)
{
position = value;
}
}
}
protected XY position;
public virtual XY Position { get; set; }

private XY facingDirection = new(1, 0);
public XY FacingDirection
@@ -88,7 +74,7 @@ namespace GameClass.GameObj
public virtual bool IgnoreCollideExecutor(IGameObj targetObj) => false;
public GameObj(XY initPos, int initRadius, GameObjType initType)
{
this.Position = this.birthPos = initPos;
this.position = this.birthPos = initPos;
this.Radius = initRadius;
this.type = initType;
ID = Interlocked.Increment(ref currentMaxID);


+ 16
- 0
logic/GameClass/GameObj/Moveable.cs View File

@@ -12,6 +12,22 @@ namespace GameClass.GameObj
protected readonly object moveObjLock = new();
public object MoveLock => moveObjLock;

public override XY Position
{
get
{
lock (gameObjLock)
return position;
}
set
{
lock (gameObjLock)
{
position = value;
}
}
}

private bool isMoving;
public bool IsMoving
{


Loading…
Cancel
Save