diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room1.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room1.tscn
index 14d20aa..38f57cb 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room1.tscn
+++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room1.tscn
@@ -9,7 +9,6 @@
format = 2
layer_0/tile_data = PackedInt32Array(-65539, 131072, 2, 196605, 131072, 7, 262141, 0, 8, 327677, 0, 8, 393213, 0, 8, 458749, 131072, 2, -65538, 131072, 2, 196606, 131072, 7, 262142, 0, 8, 327678, 0, 8, 393214, 0, 8, 458750, 131072, 2, -65537, 131072, 2, 196607, 131072, 7, 262143, 0, 8, 327679, 0, 8, 393215, 0, 8, 458751, 131072, 2, -131072, 131072, 2, 131072, 131072, 7, 196608, 0, 8, 262144, 0, 8, 327680, 0, 8, 393216, 131072, 2, -131071, 131072, 2, 131073, 131072, 7, 196609, 0, 8, 262145, 0, 8, 327681, 0, 8, 393217, 131072, 2, -131070, 131072, 2, 131074, 131072, 7, 393218, 131072, 2, -131069, 131072, 2, 131075, 131072, 7, 393219, 131072, 2, -131068, 131072, 2, 131076, 131072, 7, 393220, 131072, 2, -131067, 196608, 2, -65531, 196608, 3, 5, 196608, 3, 65541, 196608, 3, 131077, 196608, 7, 393221, 131072, 2, -131066, 0, 8, -65530, 0, 8, 6, 0, 8, 65542, 0, 8, 131078, 0, 8, 393222, 131072, 2, -131065, 0, 8, -65529, 0, 8, 7, 0, 8, 65543, 0, 8, 131079, 0, 8, 393223, 131072, 2, -131064, 0, 8, -65528, 0, 8, 8, 0, 8, 65544, 0, 8, 131080, 0, 8, 393224, 131072, 2, -131063, 65536, 3, -65527, 65536, 3, 9, 65536, 3, 65545, 65536, 3, 131081, 65536, 3, 393225, 851968, 2, -327690, 196608, 4, -262154, 196608, 3, -196618, 196608, 3, -131082, 196608, 3, -65546, 196608, 3, -10, 196608, 3, 65526, 196608, 3, 131062, 196608, 3, 196598, 196608, 3, 262134, 196608, 3, 327670, 196608, 3, 393206, 196608, 3, 458742, 720896, 2, -327689, 131072, 7, -262153, 0, 8, -196617, 0, 8, -131081, 0, 8, -65545, 0, 8, -9, 0, 8, 65527, 0, 8, 131063, 0, 8, 196599, 0, 8, 262135, 0, 8, 327671, 0, 8, 393207, 0, 8, 458743, 131072, 2, -327688, 131072, 7, -262152, 0, 8, -196616, 0, 8, -131080, 0, 8, -65544, 0, 8, -8, 0, 8, 65528, 0, 8, 131064, 0, 8, 196600, 0, 8, 262136, 0, 8, 327672, 0, 8, 393208, 0, 8, 458744, 131072, 2, -327687, 131072, 7, -262151, 0, 8, -196615, 0, 8, -131079, 0, 8, -65543, 0, 8, -7, 0, 8, 65529, 0, 8, 131065, 0, 8, 196601, 0, 8, 262137, 0, 8, 327673, 0, 8, 393209, 0, 8, 458745, 131072, 2, -327686, 131072, 7, -262150, 0, 8, -196614, 0, 8, -131078, 0, 8, -65542, 65536, 2, -6, 65536, 3, 65530, 65536, 3, 131066, 65536, 3, 196602, 65536, 7, 262138, 0, 8, 327674, 0, 8, 393210, 0, 8, 458746, 131072, 2, -327685, 131072, 7, -262149, 0, 8, -196613, 0, 8, -131077, 0, 8, -65541, 131072, 2, 196603, 131072, 7, 262139, 0, 8, 327675, 0, 8, 393211, 0, 8, 458747, 131072, 2, -327684, 131072, 7, -262148, 0, 8, -196612, 0, 8, -131076, 0, 8, -65540, 131072, 2, 196604, 131072, 7, 262140, 0, 8, 327676, 0, 8, 393212, 0, 8, 458748, 131072, 2, -327683, 131072, 7, -262147, 0, 8, -196611, 0, 8, -131075, 0, 8, -327682, 131072, 7, -262146, 0, 8, -196610, 0, 8, -131074, 0, 8, -327681, 131072, 7, -262145, 0, 8, -196609, 0, 8, -131073, 0, 8, -393216, 131072, 7, -327680, 0, 8, -262144, 0, 8, -196608, 0, 8, -393215, 131072, 7, -327679, 0, 8, -262143, 0, 8, -196607, 0, 8, -393214, 131072, 7, -327678, 0, 8, -262142, 0, 8, -196606, 0, 8, 196610, 0, 8, 262146, 0, 8, 327682, 0, 8, -393213, 131072, 7, -327677, 0, 8, -262141, 0, 8, -196605, 0, 8, 196611, 0, 8, 262147, 0, 8, 327683, 0, 8, -393212, 131072, 7, -327676, 0, 8, -262140, 0, 8, -196604, 0, 8, 196612, 0, 8, 262148, 0, 8, 327684, 0, 8, -393211, 131072, 7, -327675, 0, 8, -262139, 0, 8, -196603, 0, 8, 196613, 0, 8, 262149, 0, 8, 327685, 0, 8, -393210, 131072, 7, -327674, 0, 8, -262138, 0, 8, -196602, 0, 8, 196614, 0, 8, 262150, 0, 8, 327686, 0, 8, -393209, 131072, 7, -327673, 0, 8, -262137, 0, 8, -196601, 0, 8, 196615, 0, 8, 262151, 0, 8, 327687, 0, 8, -393208, 131072, 7, -327672, 0, 8, -262136, 0, 8, -196600, 0, 8, 196616, 0, 8, 262152, 0, 8, 327688, 0, 8, -393207, 65536, 4, -327671, 65536, 3, -262135, 65536, 3, -196599, 65536, 3, 196617, 65536, 3, 262153, 65536, 3, 327689, 65536, 3)
script = ExtResource("1_wwejn")
-EnableEdit = true
[node name="EnemyMark" type="Node2D" parent="."]
position = Vector2(0, -56)
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room2.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room2.tscn
index 2d8bf86..10ab82e 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room2.tscn
+++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room2.tscn
@@ -37,3 +37,4 @@
Type = 4
ItemId = "0001"
WaveNumber = 2
+Altitude = 16
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room3.tscn b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room3.tscn
index 6b12ae3..c69f646 100644
--- a/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room3.tscn
+++ b/DungeonShooting_Godot/resource/map/tileMaps/testGroup/battle/Room3.tscn
@@ -31,6 +31,7 @@
ResidueAmmo = 12
Type = 4
ItemId = "0002"
+Altitude = 16
[node name="WeaponMark2" type="Node2D" parent="."]
position = Vector2(249, 268)
@@ -38,6 +39,7 @@
ResidueAmmo = 7
Type = 4
ItemId = "0003"
+Altitude = 16
[node name="EnemyMark3" type="Node2D" parent="."]
position = Vector2(246, 215)
diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs
index 398a07f..16cb2a9 100644
--- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs
+++ b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs
@@ -39,6 +39,19 @@
public float DelayTime = 0;
///
+ /// 物体初始海拔高度
+ ///
+ [ExportGroup("Vertical")]
+ [Export(PropertyHint.Range, "0, 36")]
+ public int Altitude = 0;
+
+ ///
+ /// 物体初始纵轴速度
+ ///
+ [Export(PropertyHint.Range, "-1000,1000,0.1")]
+ public float VerticalSpeed = 0;
+
+ ///
/// 当前标记所在Tile节点
///
public TileMap TileRoot;
@@ -126,8 +139,19 @@
///
public virtual void Doing(RoomInfo roomInfo)
{
+
+ CreateActivityObject().PutDown(GlobalPosition, Layer);
+ }
+
+ ///
+ /// 实例化ItemId指定的物体, 并返回对象实例
+ ///
+ protected ActivityObject CreateActivityObject()
+ {
var instance = ActivityObject.Create(GetItemId());
- instance.PutDown(GlobalPosition, Layer);
+ instance.VerticalSpeed = VerticalSpeed;
+ instance.Altitude = Altitude;
+ return instance;
}
#if TOOLS
diff --git a/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs b/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs
index cc5a0fd..4e977f5 100644
--- a/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs
+++ b/DungeonShooting_Godot/src/framework/map/mark/EnemyMark.cs
@@ -59,7 +59,7 @@
{
var pos = GlobalPosition;
//创建敌人
- var instance = ActivityObject.Create(GetItemId());
+ var instance = (Enemy)CreateActivityObject();
instance.PutDown(pos, Layer);
if (!string.IsNullOrWhiteSpace(Weapon1Id))
diff --git a/DungeonShooting_Godot/src/framework/map/mark/WeaponMark.cs b/DungeonShooting_Godot/src/framework/map/mark/WeaponMark.cs
index a4279a2..0c5fd94 100644
--- a/DungeonShooting_Godot/src/framework/map/mark/WeaponMark.cs
+++ b/DungeonShooting_Godot/src/framework/map/mark/WeaponMark.cs
@@ -29,7 +29,7 @@
public override void Doing(RoomInfo roomInfo)
{
//创建武器
- var instance = ActivityObject.Create(GetItemId());
+ var instance = (Weapon)CreateActivityObject();
if (CurrAmmon >= 0)
{
instance.SetCurrAmmo(CurrAmmon);
@@ -39,6 +39,8 @@
{
instance.SetResidueAmmo(ResidueAmmo);
}
+
+
instance.PutDown(GlobalPosition, Layer);
}
}
\ No newline at end of file