LD54/src/game/player.tscn

35 lines
1.1 KiB
Text

[gd_scene load_steps=4 format=3 uid="uid://ckau5s2tsb3oc"]
[ext_resource type="Script" path="res://src/game/player_controller.gd" id="1_g4ij8"]
[ext_resource type="Texture2D" uid="uid://d1t1g7hyil82v" path="res://assets/spracer.png" id="2_xal47"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_w2nj7"]
size = Vector2(36, 20)
[node name="player" type="StaticBody2D" node_paths=PackedStringArray("camera")]
script = ExtResource("1_g4ij8")
acc = 600.0
dec = 400.0
max_speed = 3000.0
turn_speed = 0.8
brake_strength = 600.0
drift_factor = 1.2
camera_offset_factor = 0.5
camera = NodePath("Camera2D")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, 3.09944e-05)
rotation = 1.5708
scale = Vector2(0.0489796, 0.0489796)
texture = ExtResource("2_xal47")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-1, 0)
shape = SubResource("RectangleShape2D_w2nj7")
[node name="Camera2D" type="Camera2D" parent="."]
rotation = 1.5708
ignore_rotation = false
position_smoothing_enabled = true
rotation_smoothing_enabled = true
rotation_smoothing_speed = 10.0