diff --git a/DungeonShooting_Godot/src/framework/map/RoomInfo.cs b/DungeonShooting_Godot/src/framework/map/RoomInfo.cs index 332de2d..195cfcb 100644 --- a/DungeonShooting_Godot/src/framework/map/RoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/RoomInfo.cs @@ -59,10 +59,10 @@ public AffiliationArea Affiliation; /// - /// 是否处于闭关状态, 也就是房间门没有打开 + /// 是否处于闭关状态, 也就是房间门没有主动打开 /// public bool IsSeclusion { get; private set; } = false; - + /// /// 获取房间的全局坐标, 单位: 像素 /// @@ -116,16 +116,25 @@ } /// - /// 房间准备好了, 准备刷敌人, 并且关闭所有门 + /// 房间准备好了, 准备刷敌人, 并且关闭所有门, + /// 当清完每一波刷新的敌人后即可开门 /// public void BeReady() { IsSeclusion = true; + + //按照 WaveNumber 排序 + ActivityMarks.Sort((x, y) => + { + return x.WaveNumber - y.WaveNumber; + }); + //关门 foreach (var doorInfo in Doors) { doorInfo.Door.CloseDoor(); } + //根据标记生成对象 foreach (var mark in ActivityMarks) { @@ -133,6 +142,11 @@ } } + public void NextWave() + { + + } + /// /// 当前房间所有敌人都被清除了 /// diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs index 939d33c..e9837ca 100644 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs +++ b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs @@ -26,6 +26,13 @@ public RoomLayerEnum Layer = RoomLayerEnum.NormalLayer; /// + /// 该标记在第几波调用 BeReady, + /// 一个房间内所以敌人清完即可进入下一波 + /// + [Export] + public int WaveNumber = 1; + + /// /// 绘制的颜色 /// protected Color DrawColor = new Color(0.4F, 0.56078434F, 0.8784314F); @@ -33,14 +40,13 @@ /// /// 获取物体Id /// - /// public string GetItemId() { return ActivityIdPrefix.GetNameByPrefixType(Type) + ItemId; } /// - /// 调用该函数表示房间已经准备好了 + /// 调用该函数表示该标记可以生成物体了 /// public virtual void BeReady(RoomInfo roomInfo) {