godot-demo-projects/visual_script/visual_pong/pong.tscn

96 lines
3.1 KiB
Plaintext
Raw Normal View History

2017-07-01 12:29:03 +02:00
[gd_scene load_steps=13 format=2]
[ext_resource path="res://paddle.vs" type="Script" id=1]
[ext_resource path="res://left_pallete.png" type="Texture" id=2]
[ext_resource path="res://right_pallete.png" type="Texture" id=3]
[ext_resource path="res://ball.vs" type="Script" id=4]
[ext_resource path="res://ball.png" type="Texture" id=5]
[ext_resource path="res://separator.png" type="Texture" id=6]
[ext_resource path="res://wall.vs" type="Script" id=7]
[ext_resource path="res://ceiling_floor.vs" type="Script" id=8]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 4, 16 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 4, 4 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 10, 200 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 320, 10 )
2019-06-04 21:25:25 +02:00
[node name="game" type="Node2D"]
2017-07-01 12:29:03 +02:00
2019-06-04 21:25:25 +02:00
[node name="left" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 67.6285, 192.594 )
script = ExtResource( 1 )
2019-06-04 21:25:25 +02:00
[node name="sprite" type="Sprite" parent="left"]
2017-07-01 12:29:03 +02:00
texture = ExtResource( 2 )
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="left"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 1 )
2019-06-04 21:25:25 +02:00
[node name="right" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 563.815, 188.919 )
script = ExtResource( 1 )
ball_dir = -1.0
2019-06-04 21:25:25 +02:00
[node name="sprite" type="Sprite" parent="right"]
2017-07-01 12:29:03 +02:00
texture = ExtResource( 3 )
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="right"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 1 )
2019-06-04 21:25:25 +02:00
[node name="ball" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 320.5, 191.124 )
script = ExtResource( 4 )
2019-06-04 21:25:25 +02:00
[node name="sprite" type="Sprite" parent="ball"]
2017-07-01 12:29:03 +02:00
texture = ExtResource( 5 )
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="ball"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 2 )
2019-06-04 21:25:25 +02:00
[node name="separator" type="Sprite" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 320, 200 )
texture = ExtResource( 6 )
2019-06-04 21:25:25 +02:00
[node name="left_wall" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( -10, 200 )
script = ExtResource( 7 )
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="left_wall"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 3 )
2019-06-04 21:25:25 +02:00
[node name="right_wall" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 650, 200 )
script = ExtResource( 7 )
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="right_wall"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 3 )
2019-06-04 21:25:25 +02:00
[node name="ceiling" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 320, -10 )
script = ExtResource( 8 )
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="ceiling"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 4 )
2019-06-04 21:25:25 +02:00
[node name="floor" type="Area2D" parent="."]
2017-07-01 12:29:03 +02:00
position = Vector2( 320, 410 )
script = ExtResource( 8 )
y_direction = -1.0
2019-06-04 21:25:25 +02:00
[node name="collision" type="CollisionShape2D" parent="floor"]
2017-07-01 12:29:03 +02:00
shape = SubResource( 4 )
[connection signal="area_entered" from="left" to="left" method="_on_area_entered"]
[connection signal="area_entered" from="right" to="right" method="_on_area_entered"]
[connection signal="area_entered" from="left_wall" to="left_wall" method="_on_area_entered"]
[connection signal="area_entered" from="right_wall" to="right_wall" method="_on_area_entered"]
[connection signal="area_entered" from="ceiling" to="ceiling" method="_on_area_entered"]
[connection signal="area_entered" from="floor" to="floor" method="_on_area_entered"]