init public repo
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/player/bot_controls.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scripts/player/bot_inventory.gd" type="Script" id=2]
|
||||
|
||||
|
||||
|
||||
[node name="BotPlayer" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="inventory" type="Spatial" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
@@ -0,0 +1,119 @@
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/player/human_controls.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/fonts/Kenney Future Narrow.ttf" type="DynamicFontData" id=2]
|
||||
[ext_resource path="res://resources/ui/theme.tres" type="Theme" id=3]
|
||||
[ext_resource path="res://scenes/menus/IngameMenu.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://scripts/player/human_inventory.gd" type="Script" id=5]
|
||||
[ext_resource path="res://scenes/road/roadStraightLong.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://scripts/player/inventory_preview.gd" type="Script" id=7]
|
||||
|
||||
[sub_resource type="ViewportTexture" id=1]
|
||||
viewport_path = NodePath("inventory/viewport")
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 14
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=3]
|
||||
size = 85
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[node name="HumanPlayer" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="hud" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="inventory" type="Control" parent="hud"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="background" type="ColorRect" parent="hud/inventory"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -75.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 150.0
|
||||
|
||||
[node name="track" type="TextureRect" parent="hud/inventory"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -75.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 150.0
|
||||
texture = SubResource( 1 )
|
||||
|
||||
[node name="type" type="Label" parent="hud/inventory"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -74.0
|
||||
margin_right = 75.0
|
||||
margin_bottom = 58.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="speed" type="Label" parent="hud"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
margin_left = -77.0
|
||||
margin_top = -39.0
|
||||
margin_right = 77.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource( 3 )
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
[node name="reset" type="Label" parent="hud"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -20.0
|
||||
margin_top = -56.5
|
||||
margin_right = 20.0
|
||||
margin_bottom = 56.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
align = 1
|
||||
valign = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="ingame_menu" parent="hud" instance=ExtResource( 4 )]
|
||||
visible = false
|
||||
|
||||
[node name="inventory" type="Spatial" parent="."]
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="viewport" type="Viewport" parent="inventory"]
|
||||
size = Vector2( 150, 150 )
|
||||
transparent_bg = true
|
||||
hdr = false
|
||||
render_target_v_flip = true
|
||||
|
||||
[node name="camera" type="Camera" parent="inventory/viewport"]
|
||||
transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -50.616, -999.296, 0 )
|
||||
current = true
|
||||
fov = 100.0
|
||||
near = 0.5
|
||||
far = 20.0
|
||||
|
||||
[node name="view" type="Spatial" parent="inventory"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -50, -1000, 0 )
|
||||
|
||||
[node name="roadStraightLong" parent="inventory/view" instance=ExtResource( 6 )]
|
||||
transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0 )
|
||||
|
||||
[node name="preview" type="Spatial" parent="inventory"]
|
||||
script = ExtResource( 7 )
|
||||
|
||||
[node name="camera" type="InterpolatedCamera" parent="."]
|
||||
fov = 100.0
|
||||
far = 250.0
|
||||
@@ -0,0 +1,87 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/player/player.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scripts/player/race_car.gd" type="Script" id=2]
|
||||
[ext_resource path="res://assets/raceCar/body.obj" type="ArrayMesh" id=3]
|
||||
[ext_resource path="res://assets/raceCar/wheel.obj" type="ArrayMesh" id=4]
|
||||
|
||||
[sub_resource type="Curve3D" id=1]
|
||||
bake_interval = 0.05
|
||||
_data = {
|
||||
"points": PoolVector3Array( ),
|
||||
"tilts": PoolRealArray( )
|
||||
}
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=2]
|
||||
albedo_color = Color( 0.14902, 0.14902, 0.14902, 1 )
|
||||
|
||||
[sub_resource type="BoxShape" id=3]
|
||||
extents = Vector3( 0.075079, 0.03, 0.13 )
|
||||
|
||||
[node name="Player" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Path" type="Path" parent="."]
|
||||
curve = SubResource( 1 )
|
||||
|
||||
[node name="PathFollow" type="PathFollow" parent="Path"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 0.999999, 0, 0, 0 )
|
||||
v_offset = 0.015
|
||||
rotation_mode = 4
|
||||
loop = false
|
||||
|
||||
[node name="raceCar" type="KinematicBody" parent="Path/PathFollow"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
collision_layer = 31
|
||||
collision_mask = 31
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="body" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.125 )
|
||||
mesh = ExtResource( 3 )
|
||||
material/0 = null
|
||||
material/1 = null
|
||||
material/2 = null
|
||||
|
||||
[node name="wheelBackLeft" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.061, 0.024, -0.082 )
|
||||
mesh = ExtResource( 4 )
|
||||
material/0 = SubResource( 2 )
|
||||
material/1 = null
|
||||
|
||||
[node name="wheelBackRight" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.061, 0.024, -0.082 )
|
||||
mesh = ExtResource( 4 )
|
||||
material/0 = SubResource( 2 )
|
||||
material/1 = null
|
||||
|
||||
[node name="wheelFrontLeft" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.061, 0.024, 0.078 )
|
||||
mesh = ExtResource( 4 )
|
||||
material/0 = SubResource( 2 )
|
||||
material/1 = null
|
||||
|
||||
[node name="wheelFrontRight" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.061, 0.024, 0.078 )
|
||||
mesh = ExtResource( 4 )
|
||||
material/0 = SubResource( 2 )
|
||||
material/1 = null
|
||||
|
||||
[node name="collision" type="CollisionShape" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.03, 0.01 )
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="CameraTarget" type="Spatial" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.3, -0.6 )
|
||||
|
||||
[node name="ray" type="RayCast" parent="Path/PathFollow/raceCar"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.075, 0.2 )
|
||||
enabled = true
|
||||
cast_to = Vector3( 0, -0.2, 0 )
|
||||
collision_mask = 0
|
||||
|
||||
[node name="ResetTimer" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
one_shot = true
|
||||
[connection signal="road_entered" from="Path/PathFollow/raceCar" to="." method="_on_raceCar_road_entered"]
|
||||
[connection signal="timeout" from="ResetTimer" to="." method="_on_ResetTimer_timeout"]
|
||||
Reference in New Issue
Block a user