mirror of
https://github.com/Steffo99/nanogolf.git
synced 2024-11-25 01:24:18 +00:00
73 lines
2.7 KiB
Text
73 lines
2.7 KiB
Text
[gd_scene load_steps=11 format=3 uid="uid://ca06elq8io5wu"]
|
|
|
|
[ext_resource type="Script" path="res://scenes/golf_ball.gd" id="1_1uswk"]
|
|
[ext_resource type="Texture2D" uid="uid://bxyy3bwt7a5l2" path="res://sprites/circle.svg" id="2_mqlag"]
|
|
[ext_resource type="PackedScene" uid="uid://cu03w8wxnkffb" path="res://scenes/putt_controller.tscn" id="3_rx2v7"]
|
|
[ext_resource type="PackedScene" uid="uid://cj15ash4r3i4v" path="res://scenes/collision_sound.tscn" id="4_6m2yp"]
|
|
[ext_resource type="PackedScene" uid="uid://bf0a04t4b1wil" path="res://scenes/hole_controller.tscn" id="5_tdklt"]
|
|
[ext_resource type="AudioStream" uid="uid://crfybmbv6dbs4" path="res://sounds/hole.wav" id="6_08dpq"]
|
|
[ext_resource type="Theme" uid="uid://mau3moiintkp" path="res://themes/nanogolf_theme.tres" id="7_2tupu"]
|
|
|
|
[sub_resource type="Curve" id="Curve_v81ms"]
|
|
min_value = -20.0
|
|
max_value = 0.0
|
|
_data = [Vector2(0, -20), 0.0, 20.0, 0, 1, Vector2(1, 0), 20.0, 0.0, 1, 0]
|
|
point_count = 2
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_3vk3q"]
|
|
radius = 4.0
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_aigrf"]
|
|
radius = 1.0
|
|
|
|
[node name="GolfBall" type="CharacterBody2D" node_paths=PackedStringArray("putt_controller", "hole_controller", "hole_sound", "player_label")]
|
|
collision_layer = 2
|
|
collision_mask = 4
|
|
motion_mode = 1
|
|
wall_min_slide_angle = 0.0
|
|
script = ExtResource("1_1uswk")
|
|
putt_controller = NodePath("PuttController")
|
|
hole_controller = NodePath("HoleController")
|
|
hole_sound = NodePath("HoleSound")
|
|
player_label = NodePath("PlayerLabel")
|
|
physics_friction = 60.0
|
|
physics_max_bounces = 4.0
|
|
physics_bounce_coefficient = 0.65
|
|
collision_sound = ExtResource("4_6m2yp")
|
|
collision_volume_db = SubResource("Curve_v81ms")
|
|
collision_volume_max_velocity = 150.0
|
|
|
|
[node name="Sprite" type="Sprite2D" parent="."]
|
|
scale = Vector2(0.063, 0.063)
|
|
texture = ExtResource("2_mqlag")
|
|
|
|
[node name="Shape" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("CircleShape2D_3vk3q")
|
|
debug_color = Color(0, 0.6, 0.701961, 0.419608)
|
|
|
|
[node name="PuttController" parent="." instance=ExtResource("3_rx2v7")]
|
|
|
|
[node name="HoleController" parent="." instance=ExtResource("5_tdklt")]
|
|
|
|
[node name="Shape" type="CollisionShape2D" parent="HoleController"]
|
|
shape = SubResource("CircleShape2D_aigrf")
|
|
debug_color = Color(0, 0.701961, 0.141176, 0.419608)
|
|
|
|
[node name="HoleSound" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("6_08dpq")
|
|
|
|
[node name="PlayerLabel" type="Label" parent="."]
|
|
anchors_preset = 4
|
|
anchor_top = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = 8.0
|
|
offset_top = -11.5
|
|
offset_right = 48.0
|
|
offset_bottom = 11.5
|
|
grow_vertical = 2
|
|
theme = ExtResource("7_2tupu")
|
|
theme_override_font_sizes/font_size = 13
|
|
text = "Player"
|
|
vertical_alignment = 1
|
|
|
|
[connection signal="putt" from="PuttController" to="." method="_on_putt"]
|