SpaceClient/Scenes/Player.tscn

441 lines
14 KiB
Plaintext

[gd_scene load_steps=12 format=2]
[ext_resource path="res://Scripts/Player.gd" type="Script" id=1]
[ext_resource path="res://Models/Arrow.obj" type="ArrayMesh" id=2]
[ext_resource path="res://Models/RotateArrow.obj" type="ArrayMesh" id=3]
[ext_resource path="res://Shaders/ArrowMaterial.tres" type="Material" id=4]
[ext_resource path="res://Models/spaceship_model_modified.tscn" type="PackedScene" id=5]
[ext_resource path="res://Models/spaceship_engine_model_modified.tscn" type="PackedScene" id=6]
[ext_resource path="res://Scenes/EngineParticles.tscn" type="PackedScene" id=7]
[ext_resource path="res://Images/TurnEndBanner.png" type="Texture" id=8]
[ext_resource path="res://Animations/TurnEndBanner.anim" type="Animation" id=9]
[sub_resource type="CapsuleShape" id=1]
radius = 0.15
height = 0.6
[sub_resource type="CanvasItemMaterial" id=2]
light_mode = 1
[node name="Player" type="RigidBody"]
gravity_scale = -128.0
script = ExtResource( 1 )
[node name="EngineParticleContainer" type="Spatial" parent="."]
[node name="S-X,R+Y" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( 0.01, 0, 0, 0, 0.01, 0, 0, 0, 0.01, 0.170458, 0, 0.243815 )
[node name="S-X,R-Y" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( 0.01, 0, 0, 0, 0.01, 0, 0, 0, 0.01, 0.21263, 0, -0.339794 )
[node name="S+X,R+Y" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -0.01, 0, 3.25841e-09, 0, 0.01, 0, -3.25841e-09, 0, -0.01, -0.214023, 0, -0.339794 )
[node name="S+X,R-Y" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -0.01, 0, 3.25841e-09, 0, 0.01, 0, -3.25841e-09, 0, -0.01, -0.176102, 0, 0.244114 )
[node name="S-Y,R+Z,R+X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -1.62921e-09, -0.01, 0, 0.01, -1.62921e-09, 0, 0, 0, 0.01, -0.0497533, 0.0974464, 0.270828 )
[node name="S-Y,R-Z,R+X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -1.62921e-09, -0.01, 0, 0.01, -1.62921e-09, 0, 0, 0, 0.01, 0.0501123, 0.0974464, 0.270828 )
[node name="S-Y,R-Z,R-X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -1.62921e-09, -0.01, 0, 0.01, -1.62921e-09, 0, 0, 0, 0.01, 0.0697536, 0.127716, -0.354388 )
[node name="S-Y,R+Z,R-X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -1.62921e-09, -0.01, 0, 0.01, -1.62921e-09, 0, 0, 0, 0.01, -0.0699186, 0.127716, -0.354388 )
[node name="S+Y,R-Z,R+X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( 1.19249e-10, 0.01, 0, -0.01, 1.19249e-10, 0, 0, 0, 0.01, -0.0699186, -0.128048, -0.354388 )
[node name="S+Y,R+Z,R+X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( 1.19249e-10, 0.01, 0, -0.01, 1.19249e-10, 0, 0, 0, 0.01, 0.0700162, -0.128048, -0.354388 )
[node name="S+Y,R-Z,R-X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( 1.19249e-10, 0.01, 0, -0.01, 1.19249e-10, 0, 0, 0, 0.01, -0.0497533, -0.126886, 0.270828 )
[node name="S+Y,R+Z,R-X" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( 1.19249e-10, 0.01, 0, -0.01, 1.19249e-10, 0, 0, 0, 0.01, 0.0497652, -0.126886, 0.270828 )
[node name="SZ" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -3.25841e-09, 0, 0.02, 0, 0.02, 0, -0.02, 0, -3.25841e-09, 0.0588414, 0.000427529, -0.564202 )
[node name="SZ2" parent="EngineParticleContainer" instance=ExtResource( 7 )]
transform = Transform( -3.25841e-09, 0, 0.02, 0, 0.02, 0, -0.02, 0, -3.25841e-09, -0.0578827, 0.000427529, -0.564202 )
[node name="EngineContainer" type="Spatial" parent="."]
[node name="spaceship-engine" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.05, 0, 0, 0, -2.18557e-09, 0.05, 0, -0.05, -2.18557e-09, -0.058048, 0, -0.499619 )
[node name="spaceship-engine2" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.05, 0, 0, 0, -2.18557e-09, 0.05, 0, -0.05, -2.18557e-09, 0.058, 0, -0.5 )
[node name="spaceship-engine3" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( -3.25841e-09, -0.02, -3.25841e-09, 0, -3.25841e-09, 0.02, -0.02, 3.25841e-09, 5.30863e-16, -0.188586, 0, -0.340403 )
[node name="spaceship-engine5" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( -3.25841e-09, -0.02, -3.25841e-09, 0, -3.25841e-09, 0.02, -0.02, 3.25841e-09, 5.30863e-16, -0.15, 0, 0.244 )
[node name="spaceship-engine6" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( -3.25841e-09, 0.02, 3.25841e-09, 0, -3.25841e-09, 0.02, 0.02, 3.25841e-09, 5.30863e-16, 0.15, 0, 0.244 )
[node name="spaceship-engine4" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( -3.25841e-09, 0.02, 3.25841e-09, 0, -3.25841e-09, 0.02, 0.02, 3.25841e-09, 5.30863e-16, 0.189, 0, -0.34 )
[node name="spaceship-engine7" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, 0.0697057, 0.102263, -0.354755 )
[node name="spaceship-engine11" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, -0.07, 0.102, -0.355 )
[node name="spaceship-engine8" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, -0.02, 6.51683e-09, 0, -6.51683e-09, -0.02, 0.07, -0.102, -0.355 )
[node name="spaceship-engine12" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, -0.02, 6.51683e-09, 0, -6.51683e-09, -0.02, -0.07, -0.102, -0.355 )
[node name="spaceship-engine9" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, -0.02, 6.51683e-09, 0, -6.51683e-09, -0.02, 0.0497166, -0.102, 0.271 )
[node name="spaceship-engine13" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, -0.02, 6.51683e-09, 0, -6.51683e-09, -0.02, -0.05, -0.102, 0.271 )
[node name="spaceship-engine10" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, 0.05, 0.073, 0.271 )
[node name="spaceship-engine14" parent="EngineContainer" instance=ExtResource( 6 )]
transform = Transform( 0.02, 0, 0, 0, 0.02, 0, 0, 0, 0.02, -0.05, 0.073, 0.271 )
[node name="spaceship" parent="." instance=ExtResource( 5 )]
transform = Transform( -2.44381e-08, 0, -0.15, 0, 0.15, 0, 0.15, 0, -2.44381e-08, 0, 0, 0 )
[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 0.519, 0, 0, 0, 1, 0, 0, -0.034 )
shape = SubResource( 1 )
[node name="MainPanel" type="Panel" parent="."]
visible = false
anchor_left = 0.5
anchor_right = 0.5
margin_left = -390.0
margin_top = 15.0
margin_right = 390.0
margin_bottom = 50.0
grow_horizontal = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TimeBar" type="HSlider" parent="MainPanel"]
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = 10.0
grow_vertical = 2
max_value = 5.0
step = 0.01
tick_count = 6
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AddButton" type="Button" parent="MainPanel"]
anchor_left = 0.6
anchor_top = 0.5
anchor_right = 0.7
anchor_bottom = 0.5
margin_left = 6.0
margin_right = -1.0
grow_vertical = 2
text = "Add"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PlayButton" type="Button" parent="MainPanel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.6
anchor_bottom = 0.5
margin_left = 6.0
margin_right = -1.0
grow_vertical = 2
text = "Play"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveButton" type="Button" parent="MainPanel"]
anchor_left = 0.7
anchor_top = 0.5
anchor_right = 0.8
anchor_bottom = 0.5
margin_left = 5.0
margin_right = -3.0
grow_vertical = 2
text = "Remove"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ClearButton" type="Button" parent="MainPanel"]
anchor_left = 0.8
anchor_top = 0.5
anchor_right = 0.9
anchor_bottom = 0.5
margin_left = 3.0
margin_right = -5.0
grow_vertical = 2
text = "Clear"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="EndTurnButton" type="Button" parent="MainPanel"]
anchor_left = 0.9
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_left = 1.0
margin_right = -6.0
grow_vertical = 2
text = "End Turn"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ArrowContainer" type="Spatial" parent="."]
[node name="ArrowScaleContainer" type="Spatial" parent="ArrowContainer"]
transform = Transform( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.478 )
[node name="Arrow" type="MeshInstance" parent="ArrowContainer/ArrowScaleContainer"]
transform = Transform( 0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.215, -0.00275069, -0.00179684, -0.000424862 )
mesh = ExtResource( 2 )
material/0 = ExtResource( 4 )
[node name="RotateArrowContainer" type="Spatial" parent="."]
[node name="RotateArrowScaleContainer" type="Spatial" parent="RotateArrowContainer"]
transform = Transform( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
[node name="RotateArrow" type="MeshInstance" parent="RotateArrowContainer/RotateArrowScaleContainer"]
transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0 )
mesh = ExtResource( 3 )
material/0 = ExtResource( 4 )
[node name="ThrustPanel" type="Panel" parent="."]
visible = false
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -300.0
margin_top = -300.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LabelHolder" type="Control" parent="ThrustPanel"]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="ThrustPanel/LabelHolder"]
anchor_left = 0.2
anchor_top = 0.25
anchor_right = 0.2
anchor_bottom = 0.25
margin_left = -44.0
margin_top = -7.0
margin_right = 39.0
margin_bottom = 7.0
grow_horizontal = 2
grow_vertical = 2
text = "Linear Thrust"
[node name="Label3" type="Label" parent="ThrustPanel/LabelHolder"]
anchor_left = 0.4
anchor_top = 0.5
anchor_right = 0.4
anchor_bottom = 0.5
margin_left = -4.0
margin_top = -7.0
margin_right = 4.0
margin_bottom = 7.0
grow_horizontal = 2
grow_vertical = 2
text = "X"
[node name="Label4" type="Label" parent="ThrustPanel/LabelHolder"]
anchor_left = 0.8
anchor_top = 0.5
anchor_right = 0.8
anchor_bottom = 0.5
margin_left = -4.0
margin_top = -7.0
margin_right = 4.0
margin_bottom = 7.0
grow_horizontal = 2
grow_vertical = 2
text = "Z"
[node name="Label5" type="Label" parent="ThrustPanel/LabelHolder"]
anchor_left = 0.6
anchor_top = 0.5
anchor_right = 0.6
anchor_bottom = 0.5
margin_left = -3.5
margin_top = -7.0
margin_right = 3.5
margin_bottom = 7.0
grow_horizontal = 2
grow_vertical = 2
text = "Y"
[node name="Label2" type="Label" parent="ThrustPanel/LabelHolder"]
anchor_left = 0.2
anchor_top = 0.75
anchor_right = 0.2
anchor_bottom = 0.75
margin_left = -47.5
margin_top = -7.0
margin_right = 42.5
margin_bottom = 7.0
grow_horizontal = 2
grow_vertical = 2
text = "Vernier Thrust"
[node name="XLin" type="VSlider" parent="ThrustPanel"]
anchor_left = 0.4
anchor_top = 0.05
anchor_right = 0.4
anchor_bottom = 0.45
margin_left = -8.0
margin_right = 8.0
grow_horizontal = 2
min_value = -1.0
max_value = 1.0
step = 0.01
tick_count = 3
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="XRot" type="VSlider" parent="ThrustPanel"]
anchor_left = 0.4
anchor_top = 0.55
anchor_right = 0.4
anchor_bottom = 0.95
margin_left = -8.0
margin_right = 8.0
grow_horizontal = 2
min_value = -1.0
max_value = 1.0
step = 0.001
tick_count = 3
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="YLin" type="VSlider" parent="ThrustPanel"]
anchor_left = 0.6
anchor_top = 0.05
anchor_right = 0.6
anchor_bottom = 0.45
margin_left = -8.0
margin_right = 8.0
grow_horizontal = 2
min_value = -1.0
max_value = 1.0
step = 0.001
tick_count = 3
ticks_on_borders = true
[node name="YRot" type="VSlider" parent="ThrustPanel"]
anchor_left = 0.6
anchor_top = 0.55
anchor_right = 0.6
anchor_bottom = 0.95
margin_left = -8.0
margin_right = 8.0
grow_horizontal = 2
min_value = -1.0
max_value = 1.0
step = 0.001
tick_count = 3
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ZLin" type="VSlider" parent="ThrustPanel"]
anchor_left = 0.8
anchor_top = 0.05
anchor_right = 0.8
anchor_bottom = 0.45
margin_left = -8.0
margin_right = 8.0
grow_horizontal = 2
min_value = -1.0
max_value = 1.0
step = 0.001
tick_count = 3
ticks_on_borders = true
[node name="ZRot" type="VSlider" parent="ThrustPanel"]
anchor_left = 0.8
anchor_top = 0.55
anchor_right = 0.8
anchor_bottom = 0.95
margin_left = -8.0
margin_top = -0.263489
margin_right = 8.0
margin_bottom = -0.263489
grow_horizontal = 2
min_value = -1.0
max_value = 1.0
step = 0.001
tick_count = 3
ticks_on_borders = true
[node name="TurnEndBanner" type="TextureRect" parent="."]
visible = false
modulate = Color( 1, 1, 1, 0 )
material = SubResource( 2 )
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -20.0
margin_right = 20.0
mouse_filter = 2
texture = ExtResource( 8 )
expand = true
stretch_mode = 6
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="TurnEndBanner"]
autoplay = "ShowEndTurnBanner"
anims/ShowEndTurnBanner = ExtResource( 9 )
[connection signal="value_changed" from="MainPanel/TimeBar" to="." method="_on_TimeBar_value_changed"]
[connection signal="pressed" from="MainPanel/AddButton" to="." method="_on_AddButton_pressed"]
[connection signal="pressed" from="MainPanel/PlayButton" to="." method="_on_PlayButton_pressed"]
[connection signal="pressed" from="MainPanel/RemoveButton" to="." method="_on_RemoveButton_pressed"]
[connection signal="pressed" from="MainPanel/ClearButton" to="." method="_on_ClearButton_pressed"]
[connection signal="pressed" from="MainPanel/EndTurnButton" to="." method="_on_EndTurnButton_pressed"]
[connection signal="value_changed" from="ThrustPanel/XLin" to="." method="_on_XLin_value_changed"]
[connection signal="value_changed" from="ThrustPanel/XRot" to="." method="_on_XRot_value_changed"]
[connection signal="value_changed" from="ThrustPanel/YLin" to="." method="_on_YLin_value_changed"]
[connection signal="value_changed" from="ThrustPanel/YRot" to="." method="_on_YRot_value_changed"]
[connection signal="value_changed" from="ThrustPanel/ZLin" to="." method="_on_ZLin_value_changed"]
[connection signal="value_changed" from="ThrustPanel/ZRot" to="." method="_on_ZRot_value_changed"]