1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2025-02-04 12:28:35 +00:00

Improve menuing, and convert ships to RigidBody2D for accurate positioning.

This commit is contained in:
2021-10-21 01:24:27 -05:00
parent e9040293ae
commit 0fd0fa63f0
14 changed files with 153 additions and 58 deletions

View File

@@ -1,14 +1,13 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://assets/game/board_blue.png" type="Texture" id=1]
[ext_resource path="res://script/title screen/Title-Screen-Background.png" type="Texture" id=2]
[ext_resource path="res://script/game/Gameplay.gd" type="Script" id=3]
[ext_resource path="res://assets/game/2longShipS.png" type="Texture" id=4]
[ext_resource path="res://assets/game/5longShipS.png" type="Texture" id=5]
[ext_resource path="res://assets/game/3longShipBS.png" type="Texture" id=6]
[ext_resource path="res://assets/game/4longShipS.png" type="Texture" id=7]
[ext_resource path="res://assets/game/3longShipAS.png" type="Texture" id=8]
[ext_resource path="res://script/game/moveShip.gd" type="Script" id=9]
[ext_resource path="res://scenes/ships/2Ship.tscn" type="PackedScene" id=4]
[ext_resource path="res://scenes/ships/5Ship.tscn" type="PackedScene" id=5]
[ext_resource path="res://scenes/ships/3ShipB.tscn" type="PackedScene" id=6]
[ext_resource path="res://scenes/ships/3shipA.tscn" type="PackedScene" id=7]
[ext_resource path="res://scenes/ships/4Ship.tscn" type="PackedScene" id=8]
[node name="Game" type="Control"]
anchor_right = 1.0
@@ -23,8 +22,9 @@ __meta__ = {
}
[node name="board_blue" type="Sprite" parent="."]
position = Vector2( 187, 178 )
position = Vector2( 18, 18 )
texture = ExtResource( 1 )
centered = false
[node name="Title-Screen-Background" type="Sprite" parent="."]
show_behind_parent = true
@@ -63,30 +63,20 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="2longShipS" type="Sprite" parent="."]
position = Vector2( 600.784, 51.419 )
texture = ExtResource( 4 )
script = ExtResource( 9 )
[node name="2Ship" parent="." instance=ExtResource( 4 )]
position = Vector2( 529.802, 70.7151 )
[node name="3longShipAS" type="Sprite" parent="."]
position = Vector2( 599.524, 261.826 )
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="3ShipA" parent="." instance=ExtResource( 7 )]
position = Vector2( 434.236, 114.21 )
[node name="3longShipBS" type="Sprite" parent="."]
position = Vector2( 600.784, 146.543 )
texture = ExtResource( 6 )
script = ExtResource( 9 )
[node name="3ShipB" parent="." instance=ExtResource( 6 )]
position = Vector2( 443.216, 266.865 )
[node name="4longShipS" type="Sprite" parent="."]
position = Vector2( 543.458, 253.006 )
texture = ExtResource( 7 )
script = ExtResource( 9 )
[node name="4Ship" parent="." instance=ExtResource( 8 )]
position = Vector2( 522.911, 218.599 )
[node name="5longShipS" type="Sprite" parent="."]
position = Vector2( 541.568, 89.2166 )
texture = ExtResource( 5 )
script = ExtResource( 9 )
[node name="5Ship" parent="." instance=ExtResource( 5 )]
position = Vector2( 607.096, 211.864 )
[connection signal="pressed" from="VBoxContainer/Forfeit" to="." method="_on_Forfeit_pressed"]
[connection signal="about_to_show" from="ConfirmationDialog" to="." method="_on_ConfirmationDialog_about_to_show"]

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://script/game/moveShip.gd" type="Script" id=1]
[ext_resource path="res://assets/game/2longShipS.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 32 )
[node name="2Ship" type="RigidBody2D"]
input_pickable = true
custom_integrator = true
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, 16 )
shape = SubResource( 1 )
[node name="2longShipS" type="Sprite" parent="."]
position = Vector2( 0, 16 )
texture = ExtResource( 2 )

View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://script/game/moveShip.gd" type="Script" id=1]
[ext_resource path="res://assets/game/3longShipBS.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 48 )
[node name="3ShipB" type="RigidBody2D"]
input_pickable = true
custom_integrator = true
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="3longShipBS" type="Sprite" parent="."]
texture = ExtResource( 2 )

View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://script/game/moveShip.gd" type="Script" id=1]
[ext_resource path="res://assets/game/3longShipAS.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 48 )
[node name="3ShipA" type="RigidBody2D"]
input_pickable = true
custom_integrator = true
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="3longShipAS" type="Sprite" parent="."]
texture = ExtResource( 2 )

View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://script/game/moveShip.gd" type="Script" id=1]
[ext_resource path="res://assets/game/4longShipS.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 64 )
[node name="4Ship" type="RigidBody2D"]
input_pickable = true
custom_integrator = true
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, 16 )
shape = SubResource( 1 )
[node name="4longShipS" type="Sprite" parent="."]
position = Vector2( 0, 16 )
texture = ExtResource( 2 )

View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://script/game/moveShip.gd" type="Script" id=1]
[ext_resource path="res://assets/game/5longShipS.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 80 )
[node name="5Ship" type="RigidBody2D"]
input_pickable = true
custom_integrator = true
script = ExtResource( 1 )
[node name="5longShipS" type="Sprite" parent="."]
texture = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )