diff --git a/.import/character0.png-44bea6e364f4e83634268216d02b7691.md5 b/.import/character0.png-44bea6e364f4e83634268216d02b7691.md5 new file mode 100644 index 0000000..09f2077 --- /dev/null +++ b/.import/character0.png-44bea6e364f4e83634268216d02b7691.md5 @@ -0,0 +1,3 @@ +source_md5="e76cb679a88e60e83cb2bc1b8fcf172f" +dest_md5="bd1558239daef36856293ec7cd3cf0ab" + diff --git a/.import/character0.png-44bea6e364f4e83634268216d02b7691.stex b/.import/character0.png-44bea6e364f4e83634268216d02b7691.stex new file mode 100644 index 0000000..4ec9c01 Binary files /dev/null and b/.import/character0.png-44bea6e364f4e83634268216d02b7691.stex differ diff --git a/.import/character1.png-bd48f4d72ecdf8b7218be1e3ee3b3161.md5 b/.import/character1.png-bd48f4d72ecdf8b7218be1e3ee3b3161.md5 new file mode 100644 index 0000000..5ff9a3e --- /dev/null +++ b/.import/character1.png-bd48f4d72ecdf8b7218be1e3ee3b3161.md5 @@ -0,0 +1,3 @@ +source_md5="cfa44e898dff62270cb115257892e86d" +dest_md5="5480f6518d5953eed765444512e37d02" + diff --git a/.import/character1.png-bd48f4d72ecdf8b7218be1e3ee3b3161.stex b/.import/character1.png-bd48f4d72ecdf8b7218be1e3ee3b3161.stex new file mode 100644 index 0000000..61ff686 Binary files /dev/null and b/.import/character1.png-bd48f4d72ecdf8b7218be1e3ee3b3161.stex differ diff --git a/.import/character2.png-1146c046681af3bc05bef103082e6815.md5 b/.import/character2.png-1146c046681af3bc05bef103082e6815.md5 new file mode 100644 index 0000000..024a24d --- /dev/null +++ b/.import/character2.png-1146c046681af3bc05bef103082e6815.md5 @@ -0,0 +1,3 @@ +source_md5="efcdc56db0b4eb1d7a50e0fa0bbf5555" +dest_md5="689a05b8feac08b490450a55ffc3cae2" + diff --git a/.import/character2.png-1146c046681af3bc05bef103082e6815.stex b/.import/character2.png-1146c046681af3bc05bef103082e6815.stex new file mode 100644 index 0000000..6b344e3 Binary files /dev/null and b/.import/character2.png-1146c046681af3bc05bef103082e6815.stex differ diff --git a/.import/character3.png-802fd257d6f399298a8c312db3952692.md5 b/.import/character3.png-802fd257d6f399298a8c312db3952692.md5 new file mode 100644 index 0000000..cfeef32 --- /dev/null +++ b/.import/character3.png-802fd257d6f399298a8c312db3952692.md5 @@ -0,0 +1,3 @@ +source_md5="0457a0c791212b89c20ab3e8987b5fe7" +dest_md5="4446e64506cfd205d7298870aef65678" + diff --git a/.import/character3.png-802fd257d6f399298a8c312db3952692.stex b/.import/character3.png-802fd257d6f399298a8c312db3952692.stex new file mode 100644 index 0000000..fcf7f1b Binary files /dev/null and b/.import/character3.png-802fd257d6f399298a8c312db3952692.stex differ diff --git a/.import/tile_0440.png-78cb329c3eb8e9a38f2ecc926158b184.md5 b/.import/tile_0440.png-78cb329c3eb8e9a38f2ecc926158b184.md5 new file mode 100644 index 0000000..0240688 --- /dev/null +++ b/.import/tile_0440.png-78cb329c3eb8e9a38f2ecc926158b184.md5 @@ -0,0 +1,3 @@ +source_md5="0c6794b3051b4ea30826d52de0ed1b59" +dest_md5="85508566cfc1e124bb1bb07863d90611" + diff --git a/.import/tile_0440.png-c423ca1f100eb98055cae3b9049d02fb.md5 b/.import/tile_0440.png-c423ca1f100eb98055cae3b9049d02fb.md5 new file mode 100644 index 0000000..0240688 --- /dev/null +++ b/.import/tile_0440.png-c423ca1f100eb98055cae3b9049d02fb.md5 @@ -0,0 +1,3 @@ +source_md5="0c6794b3051b4ea30826d52de0ed1b59" +dest_md5="85508566cfc1e124bb1bb07863d90611" + diff --git a/.import/tile_0440.png-c423ca1f100eb98055cae3b9049d02fb.stex b/.import/tile_0440.png-c423ca1f100eb98055cae3b9049d02fb.stex new file mode 100644 index 0000000..068a1b0 Binary files /dev/null and b/.import/tile_0440.png-c423ca1f100eb98055cae3b9049d02fb.stex differ diff --git a/.import/tile_0507.png-1ace5b73ba99be15e114b194c7bbb403.md5 b/.import/tile_0507.png-1ace5b73ba99be15e114b194c7bbb403.md5 new file mode 100644 index 0000000..11e5b81 --- /dev/null +++ b/.import/tile_0507.png-1ace5b73ba99be15e114b194c7bbb403.md5 @@ -0,0 +1,3 @@ +source_md5="4592cebfbe3348dc5a95b2fb84f6456f" +dest_md5="21225ebe71a40f36cb0cd38f78a0e85a" + diff --git a/.import/tile_0507.png-6571e55ec122829424bda38c3d26b433.md5 b/.import/tile_0507.png-6571e55ec122829424bda38c3d26b433.md5 new file mode 100644 index 0000000..11e5b81 --- /dev/null +++ b/.import/tile_0507.png-6571e55ec122829424bda38c3d26b433.md5 @@ -0,0 +1,3 @@ +source_md5="4592cebfbe3348dc5a95b2fb84f6456f" +dest_md5="21225ebe71a40f36cb0cd38f78a0e85a" + diff --git a/.import/tile_0507.png-6571e55ec122829424bda38c3d26b433.stex b/.import/tile_0507.png-6571e55ec122829424bda38c3d26b433.stex new file mode 100644 index 0000000..ee9da3f Binary files /dev/null and b/.import/tile_0507.png-6571e55ec122829424bda38c3d26b433.stex differ diff --git a/.import/tile_0508.png-cfdfe91c9ce16b96a76023fbeb3a62a7.md5 b/.import/tile_0508.png-cfdfe91c9ce16b96a76023fbeb3a62a7.md5 new file mode 100644 index 0000000..95f4976 --- /dev/null +++ b/.import/tile_0508.png-cfdfe91c9ce16b96a76023fbeb3a62a7.md5 @@ -0,0 +1,3 @@ +source_md5="d0ade4baa5f2ef083b8c3588abc9ec0b" +dest_md5="eefe174f8f378d07f38c70dadecdee2c" + diff --git a/.import/tile_0508.png-cfdfe91c9ce16b96a76023fbeb3a62a7.stex b/.import/tile_0508.png-cfdfe91c9ce16b96a76023fbeb3a62a7.stex new file mode 100644 index 0000000..ae23a09 Binary files /dev/null and b/.import/tile_0508.png-cfdfe91c9ce16b96a76023fbeb3a62a7.stex differ diff --git a/.import/tile_0508.png-d895dfd8314c22b034201e21d743e0dc.md5 b/.import/tile_0508.png-d895dfd8314c22b034201e21d743e0dc.md5 new file mode 100644 index 0000000..95f4976 --- /dev/null +++ b/.import/tile_0508.png-d895dfd8314c22b034201e21d743e0dc.md5 @@ -0,0 +1,3 @@ +source_md5="d0ade4baa5f2ef083b8c3588abc9ec0b" +dest_md5="eefe174f8f378d07f38c70dadecdee2c" + diff --git a/.import/tile_0509.png-b2e2689547eda65b2f5aa3620e95f264.md5 b/.import/tile_0509.png-b2e2689547eda65b2f5aa3620e95f264.md5 new file mode 100644 index 0000000..e36b91b --- /dev/null +++ b/.import/tile_0509.png-b2e2689547eda65b2f5aa3620e95f264.md5 @@ -0,0 +1,3 @@ +source_md5="af33e3b6516dc05fa2ebc5e5ac761a0f" +dest_md5="65c274ac49e3df6dc0d7617aee1d452c" + diff --git a/.import/tile_0509.png-f23df3b3f97c973418719bbd0c6c7c2f.md5 b/.import/tile_0509.png-f23df3b3f97c973418719bbd0c6c7c2f.md5 new file mode 100644 index 0000000..e36b91b --- /dev/null +++ b/.import/tile_0509.png-f23df3b3f97c973418719bbd0c6c7c2f.md5 @@ -0,0 +1,3 @@ +source_md5="af33e3b6516dc05fa2ebc5e5ac761a0f" +dest_md5="65c274ac49e3df6dc0d7617aee1d452c" + diff --git a/.import/tile_0509.png-f23df3b3f97c973418719bbd0c6c7c2f.stex b/.import/tile_0509.png-f23df3b3f97c973418719bbd0c6c7c2f.stex new file mode 100644 index 0000000..0e9c30e Binary files /dev/null and b/.import/tile_0509.png-f23df3b3f97c973418719bbd0c6c7c2f.stex differ diff --git a/.import/tile_0735.png-3640642dd35d2d6a378880dd36604f30.md5 b/.import/tile_0735.png-3640642dd35d2d6a378880dd36604f30.md5 new file mode 100644 index 0000000..79125fa --- /dev/null +++ b/.import/tile_0735.png-3640642dd35d2d6a378880dd36604f30.md5 @@ -0,0 +1,3 @@ +source_md5="51e6835150d8d9e9b7a9b9df030545e3" +dest_md5="63b554de2aa63874d44c1a84b4aca2ac" + diff --git a/.import/tile_0735.png-3640642dd35d2d6a378880dd36604f30.stex b/.import/tile_0735.png-3640642dd35d2d6a378880dd36604f30.stex new file mode 100644 index 0000000..1a00067 Binary files /dev/null and b/.import/tile_0735.png-3640642dd35d2d6a378880dd36604f30.stex differ diff --git a/.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.md5 b/.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.md5 new file mode 100644 index 0000000..79125fa --- /dev/null +++ b/.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.md5 @@ -0,0 +1,3 @@ +source_md5="51e6835150d8d9e9b7a9b9df030545e3" +dest_md5="63b554de2aa63874d44c1a84b4aca2ac" + diff --git a/.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.stex b/.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.stex new file mode 100644 index 0000000..1a00067 Binary files /dev/null and b/.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.stex differ diff --git a/CharacterSelector.gd b/CharacterSelector.gd new file mode 100644 index 0000000..f7cee3b --- /dev/null +++ b/CharacterSelector.gd @@ -0,0 +1,36 @@ +extends WindowDialog + +const NUM_CHARACTERS: int = 4 +var character_index: int = 0 setget set_character_index + +onready var character_texture: TextureRect = get_node("VBoxContainer/HBoxContainer/TextureRect") +onready var name_line_edit: LineEdit = get_node("VBoxContainer/LineEdit") + + +func set_character_index(new_index: int) -> void: + if new_index < 0: + character_index = NUM_CHARACTERS - 1 + elif new_index >= NUM_CHARACTERS: + character_index = 0 + else: + character_index = new_index + + character_texture.texture = load("res://assets/images/GhostShip_Assets/character_icons/character" + str(character_index) + ".png") + + +func _on_LeftButton_pressed() -> void: + self.character_index -= 1 + + +func _on_RightButton_pressed() -> void: + self.character_index += 1 + + +func _on_CharacterSelector_about_to_show() -> void: + self.character_index = Client.my_info.character_index + name_line_edit.text = Client.my_info.name + + +func _on_CharacterSelector_popup_hide() -> void: + Client.my_info.character_index = character_index + Client.my_info.name = name_line_edit.text diff --git a/Menu.gd b/Menu.gd index 2f48de2..d02cfe5 100644 --- a/Menu.gd +++ b/Menu.gd @@ -11,6 +11,8 @@ onready var join_dialog: WindowDialog = get_node("JoinDialog") onready var join_room_label: Label = join_dialog.get_node("WaitScrollContainer/VBoxContainer/Label") onready var join_player_list: VBoxContainer = join_dialog.get_node("WaitScrollContainer/VBoxContainer/PlayerList") +onready var character_selector: WindowDialog = get_node("CharacterSelector") + func update_room(room_id: int) -> void: if Client.is_creator: @@ -59,3 +61,7 @@ func remove_all_players() -> void: func _on_CreateDialog_confirmed() -> void: Client.start_game() + + +func _on_CharacterSelectorButton_pressed() -> void: + character_selector.popup_centered() diff --git a/Menu.tscn b/Menu.tscn index c900552..7cb3bc1 100644 --- a/Menu.tscn +++ b/Menu.tscn @@ -1,12 +1,23 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://Menu.gd" type="Script" id=1] [ext_resource path="res://JoinDialog.gd" type="Script" id=2] [ext_resource path="res://PlayerList.gd" type="Script" id=3] +[ext_resource path="res://assets/images/GhostShip_Assets/character_icons/character0.png" type="Texture" id=4] +[ext_resource path="res://assets/images/kenney_input/tile_0735.png" type="Texture" id=5] +[ext_resource path="res://CharacterSelector.gd" type="Script" id=6] +[ext_resource path="res://assets/fonts/kenney_fontpackage/Kenney Mini.ttf" type="DynamicFontData" id=7] + +[sub_resource type="DynamicFont" id=1] +font_data = ExtResource( 7 ) + +[sub_resource type="Theme" id=2] +default_font = SubResource( 1 ) [node name="Menu" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +theme = SubResource( 2 ) script = ExtResource( 1 ) [node name="VBoxContainer" type="VBoxContainer" parent="."] @@ -15,17 +26,23 @@ anchor_bottom = 1.0 alignment = 2 [node name="CreateButton" type="Button" parent="VBoxContainer"] -margin_top = 100.0 +margin_top = 58.0 margin_right = 256.0 -margin_bottom = 120.0 +margin_bottom = 84.0 text = "Create" [node name="JoinButton" type="Button" parent="VBoxContainer"] -margin_top = 124.0 +margin_top = 88.0 margin_right = 256.0 -margin_bottom = 144.0 +margin_bottom = 114.0 text = "Join" +[node name="CharacterSelectorButton" type="Button" parent="VBoxContainer"] +margin_top = 118.0 +margin_right = 256.0 +margin_bottom = 144.0 +text = "character Selector" + [node name="CreateDialog" type="AcceptDialog" parent="."] margin_left = 20.0 margin_top = 37.0 @@ -43,8 +60,8 @@ margin_bottom = 52.0 scroll_horizontal_enabled = false [node name="VBoxContainer" type="VBoxContainer" parent="CreateDialog/ScrollContainer"] -margin_right = 61.0 -margin_bottom = 18.0 +margin_right = 74.0 +margin_bottom = 24.0 [node name="Label" type="Label" parent="CreateDialog/ScrollContainer/VBoxContainer"] margin_right = 61.0 @@ -74,14 +91,14 @@ margin_right = 179.0 margin_bottom = 14.0 [node name="SpinBox" type="SpinBox" parent="JoinDialog/ConnectVBoxContainer"] -margin_right = 179.0 -margin_bottom = 24.0 +margin_right = 220.0 +margin_bottom = 30.0 align = 1 [node name="ConnectButton" type="Button" parent="JoinDialog/ConnectVBoxContainer"] -margin_top = 28.0 -margin_right = 179.0 -margin_bottom = 48.0 +margin_top = 34.0 +margin_right = 220.0 +margin_bottom = 60.0 text = "Connect" [node name="WaitScrollContainer" type="ScrollContainer" parent="JoinDialog"] @@ -91,7 +108,7 @@ anchor_bottom = 1.0 scroll_horizontal_enabled = false [node name="VBoxContainer" type="VBoxContainer" parent="JoinDialog/WaitScrollContainer"] -margin_bottom = 18.0 +margin_bottom = 24.0 [node name="Label" type="Label" parent="JoinDialog/WaitScrollContainer/VBoxContainer"] margin_bottom = 14.0 @@ -101,10 +118,68 @@ margin_top = 18.0 margin_bottom = 18.0 script = ExtResource( 3 ) +[node name="CharacterSelector" type="WindowDialog" parent="."] +visible = true +margin_left = 42.0 +margin_top = 34.0 +margin_right = 205.0 +margin_bottom = 124.0 +window_title = "Character selector" +script = ExtResource( 6 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="CharacterSelector"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 4.0 +margin_top = 4.0 +margin_right = -4.0 +margin_bottom = -4.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="CharacterSelector/VBoxContainer"] +margin_right = 206.0 +margin_bottom = 32.0 +alignment = 1 + +[node name="LeftButton" type="TextureButton" parent="CharacterSelector/VBoxContainer/HBoxContainer"] +margin_left = 67.0 +margin_right = 83.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 16, 0 ) +texture_normal = ExtResource( 5 ) +expand = true +stretch_mode = 3 +flip_h = true + +[node name="TextureRect" type="TextureRect" parent="CharacterSelector/VBoxContainer/HBoxContainer"] +margin_left = 87.0 +margin_right = 119.0 +margin_bottom = 32.0 +texture = ExtResource( 4 ) + +[node name="RightButton" type="TextureButton" parent="CharacterSelector/VBoxContainer/HBoxContainer"] +margin_left = 123.0 +margin_right = 139.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 16, 0 ) +texture_normal = ExtResource( 5 ) +expand = true +stretch_mode = 3 + +[node name="LineEdit" type="LineEdit" parent="CharacterSelector/VBoxContainer"] +margin_top = 36.0 +margin_right = 206.0 +margin_bottom = 66.0 +max_length = 12 + [connection signal="pressed" from="VBoxContainer/CreateButton" to="." method="_on_CreateButton_pressed"] [connection signal="pressed" from="VBoxContainer/JoinButton" to="." method="_on_JoinButton_pressed"] +[connection signal="pressed" from="VBoxContainer/CharacterSelectorButton" to="." method="_on_CharacterSelectorButton_pressed"] [connection signal="confirmed" from="CreateDialog" to="." method="_on_CreateDialog_confirmed"] [connection signal="popup_hide" from="CreateDialog" to="." method="_on_popup_hide"] [connection signal="popup_hide" from="JoinDialog" to="." method="_on_popup_hide"] [connection signal="popup_hide" from="JoinDialog" to="JoinDialog" method="_on_JoinDialog_popup_hide"] [connection signal="pressed" from="JoinDialog/ConnectVBoxContainer/ConnectButton" to="JoinDialog" method="_on_ConnectButton_pressed"] +[connection signal="about_to_show" from="CharacterSelector" to="CharacterSelector" method="_on_CharacterSelector_about_to_show"] +[connection signal="popup_hide" from="CharacterSelector" to="CharacterSelector" method="_on_CharacterSelector_popup_hide"] +[connection signal="pressed" from="CharacterSelector/VBoxContainer/HBoxContainer/LeftButton" to="CharacterSelector" method="_on_LeftButton_pressed"] +[connection signal="pressed" from="CharacterSelector/VBoxContainer/HBoxContainer/RightButton" to="CharacterSelector" method="_on_RightButton_pressed"] diff --git a/assets/images/GhostShip_Assets/character_icons/character0.png b/assets/images/GhostShip_Assets/character_icons/character0.png new file mode 100644 index 0000000..61f6478 Binary files /dev/null and b/assets/images/GhostShip_Assets/character_icons/character0.png differ diff --git a/assets/images/GhostShip_Assets/character_icons/character0.png.import b/assets/images/GhostShip_Assets/character_icons/character0.png.import new file mode 100644 index 0000000..ae478b5 --- /dev/null +++ b/assets/images/GhostShip_Assets/character_icons/character0.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/character0.png-c9f6aac0b9a54779db8cbe8aa10cc8d4.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/images/GhostShip_Assets/character_icons/character0.png" +dest_files=[ "res://.import/character0.png-c9f6aac0b9a54779db8cbe8aa10cc8d4.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/images/GhostShip_Assets/character_icons/character1.png b/assets/images/GhostShip_Assets/character_icons/character1.png new file mode 100644 index 0000000..26ea0d2 Binary files /dev/null and b/assets/images/GhostShip_Assets/character_icons/character1.png differ diff --git a/assets/images/GhostShip_Assets/character_icons/character1.png.import b/assets/images/GhostShip_Assets/character_icons/character1.png.import new file mode 100644 index 0000000..09b77b6 --- /dev/null +++ b/assets/images/GhostShip_Assets/character_icons/character1.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/character1.png-b74eead93aea4e0d852e6b2b1be29775.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/images/GhostShip_Assets/character_icons/character1.png" +dest_files=[ "res://.import/character1.png-b74eead93aea4e0d852e6b2b1be29775.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/images/GhostShip_Assets/character_icons/character2.png b/assets/images/GhostShip_Assets/character_icons/character2.png new file mode 100644 index 0000000..f5eaed8 Binary files /dev/null and b/assets/images/GhostShip_Assets/character_icons/character2.png differ diff --git a/assets/images/GhostShip_Assets/character_icons/character2.png.import b/assets/images/GhostShip_Assets/character_icons/character2.png.import new file mode 100644 index 0000000..186b49b --- /dev/null +++ b/assets/images/GhostShip_Assets/character_icons/character2.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/character2.png-2c238128df36e61f9b35e25bacd2b831.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/images/GhostShip_Assets/character_icons/character2.png" +dest_files=[ "res://.import/character2.png-2c238128df36e61f9b35e25bacd2b831.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/images/GhostShip_Assets/character_icons/character3.png b/assets/images/GhostShip_Assets/character_icons/character3.png new file mode 100644 index 0000000..c89b325 Binary files /dev/null and b/assets/images/GhostShip_Assets/character_icons/character3.png differ diff --git a/assets/images/GhostShip_Assets/character_icons/character3.png.import b/assets/images/GhostShip_Assets/character_icons/character3.png.import new file mode 100644 index 0000000..7ef1795 --- /dev/null +++ b/assets/images/GhostShip_Assets/character_icons/character3.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/character3.png-c9dcbd288e6d0a949d8126864548811d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/images/GhostShip_Assets/character_icons/character3.png" +dest_files=[ "res://.import/character3.png-c9dcbd288e6d0a949d8126864548811d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/images/kenney_input/tile_0735.png b/assets/images/kenney_input/tile_0735.png new file mode 100644 index 0000000..80984c4 Binary files /dev/null and b/assets/images/kenney_input/tile_0735.png differ diff --git a/assets/images/kenney_input/tile_0735.png.import b/assets/images/kenney_input/tile_0735.png.import new file mode 100644 index 0000000..f0684f8 --- /dev/null +++ b/assets/images/kenney_input/tile_0735.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/images/kenney_input/tile_0735.png" +dest_files=[ "res://.import/tile_0735.png-58749046a8b2ec57c93badafb723297e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/characters/BaseCharacter.gd b/characters/BaseCharacter.gd index 8254a83..43d641a 100644 --- a/characters/BaseCharacter.gd +++ b/characters/BaseCharacter.gd @@ -12,6 +12,9 @@ func initialize(id: int, name: String, character_index: int) -> void: self.name = str(id) name_label.text = name + + var character_height: float = sprite.texture.get_height() / 4.0 + sprite.region_rect = Rect2(0, character_height * character_index, sprite.texture.get_width(), character_height) func damage(dam: int) -> void: