diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index 0a106f2..60c6fa3 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -11,7 +11,7 @@ [application] config/name="DungeonShooting" -run/main_scene="res://scene/Room.tscn" +run/main_scene="res://scene/Main.tscn" config/icon="res://icon.png" [autoload] diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index e4ae9a9..92a282a 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -13,8 +13,9 @@ [node name="Viewport" type="Viewport" parent="CanvasLayer/ViewportContainer"] size = Vector2( 480, 270 ) +own_world = true transparent_bg = true -handle_input_locally = false +debanding = true render_target_update_mode = 3 [node name="Room" parent="CanvasLayer/ViewportContainer/Viewport" instance=ExtResource( 1 )] diff --git a/DungeonShooting_Godot/scene/Room.tscn b/DungeonShooting_Godot/scene/Room.tscn index caddf6c..6cb8bc5 100644 --- a/DungeonShooting_Godot/scene/Room.tscn +++ b/DungeonShooting_Godot/scene/Room.tscn @@ -22,9 +22,7 @@ [node name="Camera2D" type="Camera2D" parent="."] position = Vector2( 253, 219 ) current = true -process_mode = 0 -smoothing_enabled = true -smoothing_speed = 8.0 +limit_smoothed = true editor_draw_drag_margin = true script = ExtResource( 5 ) diff --git a/DungeonShooting_Godot/src/game/camera/MainCamera.cs b/DungeonShooting_Godot/src/game/camera/MainCamera.cs index 8f97587..c68b933 100644 --- a/DungeonShooting_Godot/src/game/camera/MainCamera.cs +++ b/DungeonShooting_Godot/src/game/camera/MainCamera.cs @@ -36,7 +36,7 @@ /// 设置帧抖动, 结束后自动清零, 需要每一帧调用 /// /// 抖动的力度 - public void ProssesShake(Vector2 value) + public void ProcessShake(Vector2 value) { if (value.Length() > _prossesDistance.Length()) { @@ -44,7 +44,7 @@ } } - public void ProssesDirectionalShake(Vector2 value) + public void ProcessDirectionalShake(Vector2 value) { _prossesDirectiona += value; } diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs index 476990e..ced6bee 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Gun.cs @@ -104,7 +104,7 @@ var shell = new ShellCase(); shell.Throw(new Vector2(10, 5), startPos, startHeight, direction, xf, yf, rotate, true); //创建抖动 - MainCamera.Main.ProssesDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); + MainCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); } protected override void OnShoot() diff --git a/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs b/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs index 608704e..273ce39 100644 --- a/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs +++ b/DungeonShooting_Godot/src/game/item/weapon/gun/Shotgun.cs @@ -71,7 +71,7 @@ var shell = new ShellCase(); shell.Throw(new Vector2(5, 10), startPos, startHeight, direction, xf, yf, rotate, true); //创建抖动 - MainCamera.Main.ProssesDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); + MainCamera.Main.ProcessDirectionalShake(Vector2.Right.Rotated(GlobalRotation) * 1.5f); } protected override void OnShoot()