diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index d515189..7e4b0e7 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -31,6 +31,10 @@ { "ErrorType": 0, "Path": "resource/map/tileMaps/TestGroup1/inlet/Start2" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/inlet/Start3" } ], "OutletList": [ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preinstall.json new file mode 100644 index 0000000..6ca625d --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-14,"Y":-16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":22,"Y":-24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":-66,"Y":45},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png new file mode 100644 index 0000000..ef0a8a1 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png.import new file mode 100644 index 0000000..59dce7f --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hrny6himu2o8" +path="res://.godot/imported/Preview.png-36e30cc056284bf63e359cca99f69e15.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/TestGroup1/inlet/Start3/Preview.png" +dest_files=["res://.godot/imported/Preview.png-36e30cc056284bf63e359cca99f69e15.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/RoomInfo.json new file mode 100644 index 0000000..b98bd6e --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-8,"Y":-7},"Size":{"X":15,"Y":14},"DoorAreaInfos":[],"GroupName":"TestGroup1","RoomType":1,"RoomName":"Start3","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/TileInfo.json new file mode 100644 index 0000000..ea81c00 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start3/TileInfo.json @@ -0,0 +1 @@ +{"NavigationList":[{"Type":0,"Points":[-104,-88,88,-88,88,96,-104,96]}],"Floor":[-7,-6,0,0,8,-7,-5,0,0,8,-7,-4,0,0,8,-7,-3,0,0,8,-7,-2,0,0,8,-7,-1,0,0,8,-7,0,0,0,8,-7,1,0,0,8,-7,2,0,0,8,-7,3,0,0,8,-7,4,0,0,8,-7,5,0,0,8,-6,-6,0,0,8,-6,-5,0,0,8,-6,-4,0,0,8,-6,-3,0,0,8,-6,-2,0,0,8,-6,-1,0,0,8,-6,0,0,0,8,-6,1,0,0,8,-6,2,0,0,8,-6,3,0,0,8,-6,4,0,0,8,-6,5,0,0,8,-5,-6,0,0,8,-5,-5,0,0,8,-5,-4,0,0,8,-5,-3,0,0,8,-5,-2,0,0,8,-5,-1,0,0,8,-5,0,0,0,8,-5,1,0,0,8,-5,2,0,0,8,-5,3,0,0,8,-5,4,0,0,8,-5,5,0,0,8,-4,-6,0,0,8,-4,-5,0,0,8,-4,-4,0,0,8,-4,-3,0,0,8,-4,-2,0,0,8,-4,-1,0,0,8,-4,0,0,0,8,-4,1,0,0,8,-4,2,0,0,8,-4,3,0,0,8,-4,4,0,0,8,-4,5,0,0,8,-3,-6,0,0,8,-3,-5,0,0,8,-3,-4,0,0,8,-3,-3,0,0,8,-3,-2,0,0,8,-3,-1,0,0,8,-3,0,0,0,8,-3,1,0,0,8,-3,2,0,0,8,-3,3,0,0,8,-3,4,0,0,8,-3,5,0,0,8,-2,-6,0,0,8,-2,-5,0,0,8,-2,-4,0,0,8,-2,-3,0,0,8,-2,-2,0,0,8,-2,-1,0,0,8,-2,0,0,0,8,-2,1,0,0,8,-2,2,0,0,8,-2,3,0,0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,0,2,7,2,-7,0,2,7,3,-7,0,2,7,4,-7,0,2,7,5,-7,0,2,7],"Top":[-8,-7,0,3,4,-8,-6,0,3,3,-8,-5,0,3,3,-8,-4,0,3,3,-8,-3,0,3,3,-8,-2,0,3,3,-8,-1,0,3,3,-8,0,0,3,3,-8,1,0,3,3,-8,2,0,3,3,-8,3,0,3,3,-8,4,0,3,3,-8,5,0,3,3,-8,6,0,11,2,-7,6,0,2,2,-6,6,0,2,2,-5,6,0,2,2,-4,6,0,2,2,-3,6,0,2,2,-2,6,0,2,2,-1,6,0,2,2,0,6,0,2,2,1,6,0,2,2,2,6,0,2,2,3,6,0,2,2,4,6,0,2,2,5,6,0,2,2,6,-7,0,1,4,6,-6,0,1,3,6,-5,0,1,3,6,-4,0,1,3,6,-3,0,1,3,6,-2,0,1,3,6,-1,0,1,3,6,0,0,1,3,6,1,0,1,3,6,2,0,1,3,6,3,0,1,3,6,4,0,1,3,6,5,0,1,3,6,6,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/Role.cs b/DungeonShooting_Godot/src/game/activity/role/Role.cs index 15541ef..1b9cd4c 100644 --- a/DungeonShooting_Godot/src/game/activity/role/Role.cs +++ b/DungeonShooting_Godot/src/game/activity/role/Role.cs @@ -310,6 +310,11 @@ /// public Vector2 LookPosition { get; protected set; } + /// + /// 是否可以在没有武器时发动攻击 + /// + public bool NoWeaponAttack { get; set; } + //初始缩放 private Vector2 _startScale; //当前可互动的物体 diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs index 5bae563..9dbfa80 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs @@ -11,6 +11,7 @@ public override void OnInit() { base.OnInit(); + NoWeaponAttack = true; AnimationPlayer.AnimationFinished += OnAnimationFinished; } diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs index bb0c5f3..cd8a3c4 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiFollowUpState.cs @@ -125,7 +125,7 @@ { ChangeState(AIStateEnum.AiSurround); } - else if (!Master.IsAttack) //可以攻击 + else if (!Master.IsAttack && Master.NoWeaponAttack) //可以在没有武器时发起攻击 { //攻击状态 ChangeState(AIStateEnum.AiAttack); diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs index 88aae7d..968ef0d 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/state/AiSurroundState.cs @@ -155,7 +155,7 @@ { ChangeState(AIStateEnum.AiFollowUp); } - else if (!Master.IsAttack) //可以攻击 + else if (!Master.IsAttack && Master.NoWeaponAttack) //可以在没有武器时发起攻击 { //攻击状态 ChangeState(AIStateEnum.AiAttack);