mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
0d3c1790af
实现鼠标位置影响相机偏移的功能,使相机能够根据鼠标在屏幕上的位置进行轻微偏移,提升游戏交互体验
128 lines
4.1 KiB
Plaintext
128 lines
4.1 KiB
Plaintext
[gd_scene format=3 uid="uid://dmxi1ikn6avig"]
|
|
|
|
[ext_resource type="Script" uid="uid://d2oyyyg0b4qqd" path="res://scripts/Tools/Managers/WorldManager.gd" id="1_lxsxj"]
|
|
[ext_resource type="PackedScene" uid="uid://dfwg750a47ggx" path="res://components/Scenes/UI.tscn" id="2_04cdd"]
|
|
[ext_resource type="Texture2D" uid="uid://c33c8mtm4x3e3" path="res://resources/maps/Galaxy.png" id="4_oy4jj"]
|
|
[ext_resource type="Script" uid="uid://bs45p8w83d4b4" path="res://scripts/Tools/Managers/CameraManager.gd" id="5_mk7bv"]
|
|
|
|
[sub_resource type="Animation" id="Animation_ykpvi"]
|
|
length = 0.001
|
|
tracks/0/type = "bezier"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath(".:zoom:x")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"handle_modes": PackedInt32Array(0),
|
|
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
|
"times": PackedFloat32Array(0)
|
|
}
|
|
tracks/1/type = "bezier"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath(".:zoom:y")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"handle_modes": PackedInt32Array(0),
|
|
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
|
|
"times": PackedFloat32Array(0)
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_kii8h"]
|
|
resource_name = "bigLaser"
|
|
length = 5.0
|
|
step = 0.1
|
|
tracks/0/type = "bezier"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath(".:zoom:x")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"handle_modes": PackedInt32Array(0, 0, 0),
|
|
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 2, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0),
|
|
"times": PackedFloat32Array(0, 0.5, 2)
|
|
}
|
|
tracks/1/type = "bezier"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath(".:zoom:y")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"handle_modes": PackedInt32Array(0, 0, 0),
|
|
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 2, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0),
|
|
"times": PackedFloat32Array(0, 0.5, 2)
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_44ixa"]
|
|
_data = {
|
|
&"RESET": SubResource("Animation_ykpvi"),
|
|
&"bigLaser": SubResource("Animation_kii8h")
|
|
}
|
|
|
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_lu72f"]
|
|
normal = Vector2(0, 1)
|
|
|
|
[node name="world" type="Node2D" unique_id=1992792389]
|
|
y_sort_enabled = true
|
|
texture_filter = 1
|
|
script = ExtResource("1_lxsxj")
|
|
metadata/_edit_vertical_guides_ = [-1.0, 57.0]
|
|
|
|
[node name="spawner" type="MultiplayerSpawner" parent="." unique_id=1891214291]
|
|
unique_name_in_owner = true
|
|
spawn_path = NodePath("..")
|
|
|
|
[node name="UI" parent="." unique_id=1312059514 instance=ExtResource("2_04cdd")]
|
|
|
|
[node name="camera" type="Camera2D" parent="." unique_id=996511427]
|
|
process_mode = 3
|
|
process_callback = 0
|
|
limit_left = -2400
|
|
limit_top = -1800
|
|
limit_right = 2400
|
|
limit_bottom = 1800
|
|
position_smoothing_enabled = true
|
|
drag_horizontal_enabled = true
|
|
drag_vertical_enabled = true
|
|
editor_draw_limits = true
|
|
script = ExtResource("5_mk7bv")
|
|
constantOffset = Vector2(0, -80)
|
|
|
|
[node name="animator" type="AnimationPlayer" parent="camera" unique_id=619200978]
|
|
unique_name_in_owner = true
|
|
libraries/ = SubResource("AnimationLibrary_44ixa")
|
|
|
|
[node name="map" type="StaticBody2D" parent="." unique_id=385091617 groups=["map"]]
|
|
collision_layer = 6
|
|
collision_mask = 6
|
|
metadata/_edit_lock_ = true
|
|
|
|
[node name="background" type="Sprite2D" parent="map" unique_id=792319336]
|
|
z_index = -100
|
|
scale = Vector2(5, 5)
|
|
texture = ExtResource("4_oy4jj")
|
|
metadata/_edit_lock_ = true
|
|
|
|
[node name="borderTop" type="CollisionShape2D" parent="map" unique_id=320842136]
|
|
position = Vector2(0, -1800)
|
|
shape = SubResource("WorldBoundaryShape2D_lu72f")
|
|
|
|
[node name="borderTop2" type="CollisionShape2D" parent="map" unique_id=1208131017]
|
|
position = Vector2(0, 1800)
|
|
rotation = 3.1415927
|
|
shape = SubResource("WorldBoundaryShape2D_lu72f")
|
|
|
|
[node name="borderTop3" type="CollisionShape2D" parent="map" unique_id=585247179]
|
|
position = Vector2(2400, 0)
|
|
rotation = 1.5707964
|
|
shape = SubResource("WorldBoundaryShape2D_lu72f")
|
|
|
|
[node name="borderTop4" type="CollisionShape2D" parent="map" unique_id=320391894]
|
|
position = Vector2(-2400, 0)
|
|
rotation = -1.5707964
|
|
shape = SubResource("WorldBoundaryShape2D_lu72f")
|