Browse Source

build: 🚧 add the CopyInfo of Gate

tags/0.1.0
shangfengh 2 years ago
parent
commit
1fd4b679c0
3 changed files with 13 additions and 4 deletions
  1. +1
    -1
      logic/GameClass/GameObj/Character/Character.cs
  2. +1
    -1
      logic/Gaming/ActionManager.cs
  3. +11
    -2
      logic/Server/CopyInfo.cs

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

@@ -242,7 +242,7 @@ namespace GameClass.GameObj
{
lock (gameObjLock)
{
viewRange = value;
viewRange = (value > 0) ? value : 0;
}
}
}


+ 1
- 1
logic/Gaming/ActionManager.cs View File

@@ -177,7 +177,7 @@ namespace Gaming
}


if (doorwayForEscape != null && doorwayForEscape.IsOpen)
if (doorwayForEscape != null && doorwayForEscape.IsOpen())
{
player.Die(PlayerStateType.IsEscaped);
return true;


+ 11
- 2
logic/Server/CopyInfo.cs View File

@@ -169,7 +169,8 @@ namespace Server
case Preparation.Utility.GameObjType.Generator:
return Classroom((Generator)gameObj);
// case Preparation.Utility.GameObjType.Chest:

case Preparation.Utility.GameObjType.Doorway:
return Gate((Doorway)gameObj);
default: return null;
}
}
@@ -321,7 +322,15 @@ namespace Server
msg.ClassroomMessage.Progress = generator.DegreeOfFRepair;
return msg;
}

private static MessageOfObj Gate(Doorway doorway)
{
MessageOfObj msg = new MessageOfObj();
msg.GateMessage = new();
msg.GateMessage.X = doorway.Position.x;
msg.GateMessage.Y = doorway.Position.y;
msg.GateMessage.Progress = doorway.OpenDegree;
return msg;
}
/* private static MessageOfObj Chest(Chest chest)
{
MessageOfObj msg = new MessageOfObj();


Loading…
Cancel
Save