diff --git a/Door.png b/Door.png new file mode 100644 index 0000000..9f8fcc5 Binary files /dev/null and b/Door.png differ diff --git a/Door.png.import b/Door.png.import new file mode 100644 index 0000000..51e5970 --- /dev/null +++ b/Door.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Door.png-69503ba9367bcfa2ab8de46ca34fdb85.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Door.png" +dest_files=[ "res://.import/Door.png-69503ba9367bcfa2ab8de46ca34fdb85.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 +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Enemy.tscn b/Enemy.tscn index 2c8e27d..5a7a811 100644 --- a/Enemy.tscn +++ b/Enemy.tscn @@ -2,66 +2,178 @@ [ext_resource path="res://NightBorne.png" type="Texture" id=1] -[sub_resource type="AtlasTexture" id=50] +[sub_resource type="AtlasTexture" id=1] atlas = ExtResource( 1 ) region = Rect2( 0, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=51] +[sub_resource type="AtlasTexture" id=2] atlas = ExtResource( 1 ) region = Rect2( 80, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=52] +[sub_resource type="AtlasTexture" id=3] atlas = ExtResource( 1 ) region = Rect2( 160, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=53] +[sub_resource type="AtlasTexture" id=4] atlas = ExtResource( 1 ) region = Rect2( 240, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=54] +[sub_resource type="AtlasTexture" id=5] atlas = ExtResource( 1 ) region = Rect2( 320, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=55] +[sub_resource type="AtlasTexture" id=6] atlas = ExtResource( 1 ) region = Rect2( 400, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=56] +[sub_resource type="AtlasTexture" id=7] atlas = ExtResource( 1 ) region = Rect2( 480, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=57] +[sub_resource type="AtlasTexture" id=8] atlas = ExtResource( 1 ) region = Rect2( 560, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=58] +[sub_resource type="AtlasTexture" id=9] atlas = ExtResource( 1 ) region = Rect2( 640, 0, 80, 80 ) -[sub_resource type="AtlasTexture" id=59] +[sub_resource type="AtlasTexture" id=10] atlas = ExtResource( 1 ) region = Rect2( 0, 80, 80, 80 ) -[sub_resource type="AtlasTexture" id=60] +[sub_resource type="AtlasTexture" id=11] atlas = ExtResource( 1 ) region = Rect2( 80, 80, 80, 80 ) -[sub_resource type="AtlasTexture" id=61] +[sub_resource type="AtlasTexture" id=12] atlas = ExtResource( 1 ) region = Rect2( 160, 80, 80, 80 ) -[sub_resource type="AtlasTexture" id=62] +[sub_resource type="AtlasTexture" id=13] atlas = ExtResource( 1 ) region = Rect2( 240, 80, 80, 80 ) -[sub_resource type="AtlasTexture" id=63] +[sub_resource type="AtlasTexture" id=14] atlas = ExtResource( 1 ) region = Rect2( 320, 80, 80, 80 ) -[sub_resource type="AtlasTexture" id=64] +[sub_resource type="AtlasTexture" id=15] atlas = ExtResource( 1 ) region = Rect2( 400, 80, 80, 80 ) +[sub_resource type="AtlasTexture" id=16] +atlas = ExtResource( 1 ) +region = Rect2( 80, 160, 80, 80 ) + +[sub_resource type="AtlasTexture" id=17] +atlas = ExtResource( 1 ) +region = Rect2( 160, 160, 80, 80 ) + +[sub_resource type="AtlasTexture" id=18] +atlas = ExtResource( 1 ) +region = Rect2( 240, 160, 80, 80 ) + +[sub_resource type="AtlasTexture" id=19] +atlas = ExtResource( 1 ) +region = Rect2( 320, 160, 80, 80 ) + +[sub_resource type="AtlasTexture" id=20] +atlas = ExtResource( 1 ) +region = Rect2( 400, 160, 80, 80 ) + +[sub_resource type="AtlasTexture" id=21] +atlas = ExtResource( 1 ) +region = Rect2( 0, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=22] +atlas = ExtResource( 1 ) +region = Rect2( 80, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=23] +atlas = ExtResource( 1 ) +region = Rect2( 160, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=24] +atlas = ExtResource( 1 ) +region = Rect2( 240, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=25] +atlas = ExtResource( 1 ) +region = Rect2( 320, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=26] +atlas = ExtResource( 1 ) +region = Rect2( 400, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=27] +atlas = ExtResource( 1 ) +region = Rect2( 480, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=28] +atlas = ExtResource( 1 ) +region = Rect2( 560, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=29] +atlas = ExtResource( 1 ) +region = Rect2( 640, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=30] +atlas = ExtResource( 1 ) +region = Rect2( 720, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=31] +atlas = ExtResource( 1 ) +region = Rect2( 800, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=32] +atlas = ExtResource( 1 ) +region = Rect2( 880, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=33] +atlas = ExtResource( 1 ) +region = Rect2( 960, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=34] +atlas = ExtResource( 1 ) +region = Rect2( 1040, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=35] +atlas = ExtResource( 1 ) +region = Rect2( 1120, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=36] +atlas = ExtResource( 1 ) +region = Rect2( 1200, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=37] +atlas = ExtResource( 1 ) +region = Rect2( 1280, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=38] +atlas = ExtResource( 1 ) +region = Rect2( 1360, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=39] +atlas = ExtResource( 1 ) +region = Rect2( 1440, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=40] +atlas = ExtResource( 1 ) +region = Rect2( 1520, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=41] +atlas = ExtResource( 1 ) +region = Rect2( 1600, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=42] +atlas = ExtResource( 1 ) +region = Rect2( 1680, 320, 80, 80 ) + +[sub_resource type="AtlasTexture" id=43] +atlas = ExtResource( 1 ) +region = Rect2( 0, 160, 80, 80 ) + [sub_resource type="AtlasTexture" id=44] atlas = ExtResource( 1 ) region = Rect2( 480, 160, 80, 80 ) @@ -86,168 +198,56 @@ region = Rect2( 800, 160, 80, 80 ) atlas = ExtResource( 1 ) region = Rect2( 880, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=65] +[sub_resource type="AtlasTexture" id=50] atlas = ExtResource( 1 ) region = Rect2( 480, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=66] +[sub_resource type="AtlasTexture" id=51] atlas = ExtResource( 1 ) region = Rect2( 560, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=67] +[sub_resource type="AtlasTexture" id=52] atlas = ExtResource( 1 ) region = Rect2( 640, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=68] +[sub_resource type="AtlasTexture" id=53] atlas = ExtResource( 1 ) region = Rect2( 720, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=69] +[sub_resource type="AtlasTexture" id=54] atlas = ExtResource( 1 ) region = Rect2( 800, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=70] +[sub_resource type="AtlasTexture" id=55] atlas = ExtResource( 1 ) region = Rect2( 880, 160, 80, 80 ) -[sub_resource type="AtlasTexture" id=71] -atlas = ExtResource( 1 ) -region = Rect2( 0, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=72] -atlas = ExtResource( 1 ) -region = Rect2( 80, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=73] -atlas = ExtResource( 1 ) -region = Rect2( 160, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=74] -atlas = ExtResource( 1 ) -region = Rect2( 240, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=75] -atlas = ExtResource( 1 ) -region = Rect2( 320, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=76] -atlas = ExtResource( 1 ) -region = Rect2( 400, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=77] -atlas = ExtResource( 1 ) -region = Rect2( 480, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=78] -atlas = ExtResource( 1 ) -region = Rect2( 560, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=79] -atlas = ExtResource( 1 ) -region = Rect2( 640, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=80] -atlas = ExtResource( 1 ) -region = Rect2( 720, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=81] -atlas = ExtResource( 1 ) -region = Rect2( 800, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=82] -atlas = ExtResource( 1 ) -region = Rect2( 880, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=83] -atlas = ExtResource( 1 ) -region = Rect2( 960, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=84] -atlas = ExtResource( 1 ) -region = Rect2( 1040, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=85] -atlas = ExtResource( 1 ) -region = Rect2( 1120, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=86] -atlas = ExtResource( 1 ) -region = Rect2( 1200, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=87] -atlas = ExtResource( 1 ) -region = Rect2( 1280, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=88] -atlas = ExtResource( 1 ) -region = Rect2( 1360, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=89] -atlas = ExtResource( 1 ) -region = Rect2( 1440, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=90] -atlas = ExtResource( 1 ) -region = Rect2( 1520, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=91] -atlas = ExtResource( 1 ) -region = Rect2( 1600, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=92] -atlas = ExtResource( 1 ) -region = Rect2( 1680, 320, 80, 80 ) - -[sub_resource type="AtlasTexture" id=38] -atlas = ExtResource( 1 ) -region = Rect2( 0, 160, 80, 80 ) - -[sub_resource type="AtlasTexture" id=39] -atlas = ExtResource( 1 ) -region = Rect2( 80, 160, 80, 80 ) - -[sub_resource type="AtlasTexture" id=40] -atlas = ExtResource( 1 ) -region = Rect2( 160, 160, 80, 80 ) - -[sub_resource type="AtlasTexture" id=41] -atlas = ExtResource( 1 ) -region = Rect2( 240, 160, 80, 80 ) - -[sub_resource type="AtlasTexture" id=42] -atlas = ExtResource( 1 ) -region = Rect2( 320, 160, 80, 80 ) - -[sub_resource type="AtlasTexture" id=43] -atlas = ExtResource( 1 ) -region = Rect2( 400, 160, 80, 80 ) - -[sub_resource type="SpriteFrames" id=93] +[sub_resource type="SpriteFrames" id=56] animations = [ { -"frames": [ SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ), SubResource( 56 ), SubResource( 57 ), SubResource( 58 ) ], +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ], "loop": true, "name": "idle", "speed": 10.0 }, { -"frames": [ SubResource( 59 ), SubResource( 60 ), SubResource( 61 ), SubResource( 62 ), SubResource( 63 ), SubResource( 64 ) ], +"frames": [ SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ) ], "loop": true, "name": "running", "speed": 10.0 }, { -"frames": [ SubResource( 44 ), SubResource( 45 ), SubResource( 46 ), SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 65 ), SubResource( 66 ), SubResource( 67 ), SubResource( 68 ), SubResource( 69 ), SubResource( 70 ) ], +"frames": [ SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ], "loop": true, -"name": "attack", -"speed": 10.0 +"name": "hurt", +"speed": 5.0 }, { -"frames": [ SubResource( 71 ), SubResource( 72 ), SubResource( 73 ), SubResource( 74 ), SubResource( 75 ), SubResource( 76 ), SubResource( 77 ), SubResource( 78 ), SubResource( 79 ), SubResource( 80 ), SubResource( 81 ), SubResource( 82 ), SubResource( 83 ), SubResource( 84 ), SubResource( 85 ), SubResource( 86 ), SubResource( 87 ), SubResource( 88 ), SubResource( 89 ), SubResource( 90 ), SubResource( 91 ), SubResource( 92 ), SubResource( 38 ) ], +"frames": [ SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ), SubResource( 31 ), SubResource( 32 ), SubResource( 33 ), SubResource( 34 ), SubResource( 35 ), SubResource( 36 ), SubResource( 37 ), SubResource( 38 ), SubResource( 39 ), SubResource( 40 ), SubResource( 41 ), SubResource( 42 ), SubResource( 43 ) ], "loop": true, "name": "death", "speed": 10.0 }, { -"frames": [ SubResource( 39 ), SubResource( 40 ), SubResource( 41 ), SubResource( 42 ), SubResource( 43 ) ], +"frames": [ SubResource( 44 ), SubResource( 45 ), SubResource( 46 ), SubResource( 47 ), SubResource( 48 ), SubResource( 49 ), SubResource( 50 ), SubResource( 51 ), SubResource( 52 ), SubResource( 53 ), SubResource( 54 ), SubResource( 55 ) ], "loop": true, -"name": "hurt", -"speed": 5.0 +"name": "attack", +"speed": 10.0 } ] [node name="Node2D" type="KinematicBody2D"] @@ -255,7 +255,7 @@ animations = [ { [node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimatedSprite" type="AnimatedSprite" parent="."] -frames = SubResource( 93 ) +frames = SubResource( 56 ) animation = "idle" -frame = 6 +frame = 4 playing = true diff --git a/HUD.gd b/HUD.gd new file mode 100644 index 0000000..d216863 --- /dev/null +++ b/HUD.gd @@ -0,0 +1,75 @@ +extends CanvasLayer + +signal add_currency(amount) + + +func _on_Add_Currency_pressed() -> void: + emit_signal('add_currency', 1) + return + + +func update_currency(amount: int) -> void: + $Currency.set_text(String(amount)) + return + + +func update_health(value: int) -> void: + $'Health Bar'.value = value + return + + +func _on_weapon_slot_pressed() -> void: + $'Weapon Selection'.set_visible(not $'Weapon Selection'.visible) + return + + +func _on_select_bow_pressed() -> void: + $'Weapon Selection/Bow'.set_visible(false) + $'Equipped Weapon/Weapon'.set_normal_texture( + $'Weapon Selection/Bow/Weapon'.get_normal_texture()) + + $'Weapon Selection/Javelin'.set_visible(true) + $'Weapon Selection/Staff'.set_visible(true) + $'Weapon Selection/Sword'.set_visible(true) + + $'Weapon Selection'.set_visible(false) + return + + +func _on_select_javelin_pressed() -> void: + $'Weapon Selection/Javelin'.set_visible(false) + $'Equipped Weapon/Weapon'.set_normal_texture( + $'Weapon Selection/Javelin/Weapon'.get_normal_texture()) + + $'Weapon Selection/Bow'.set_visible(true) + $'Weapon Selection/Staff'.set_visible(true) + $'Weapon Selection/Sword'.set_visible(true) + + $'Weapon Selection'.set_visible(false) + return + + +func _on_select_staff_pressed() -> void: + $'Weapon Selection/Staff'.set_visible(false) + $'Equipped Weapon/Weapon'.set_normal_texture( + $'Weapon Selection/Staff/Weapon'.get_normal_texture()) + + $'Weapon Selection/Bow'.set_visible(true) + $'Weapon Selection/Javelin'.set_visible(true) + $'Weapon Selection/Sword'.set_visible(true) + + $'Weapon Selection'.set_visible(false) + return + + +func _on_select_sword_pressed() -> void: + $'Weapon Selection/Sword'.set_visible(false) + $'Equipped Weapon/Weapon'.set_normal_texture( + $'Weapon Selection/Sword/Weapon'.get_normal_texture()) + + $'Weapon Selection/Bow'.set_visible(true) + $'Weapon Selection/Javelin'.set_visible(true) + $'Weapon Selection/Staff'.set_visible(true) + + $'Weapon Selection'.set_visible(false) + return diff --git a/HUD.tscn b/HUD.tscn new file mode 100644 index 0000000..8dcdb2e --- /dev/null +++ b/HUD.tscn @@ -0,0 +1,172 @@ +[gd_scene load_steps=10 format=2] + +[ext_resource path="res://HUD.gd" type="Script" id=1] +[ext_resource path="res://Sprites/Health_Bar_Under.png" type="Texture" id=2] +[ext_resource path="res://Sprites/Health_Bar_Progress.png" type="Texture" id=3] +[ext_resource path="res://Sprites/Health_Bar_Over.png" type="Texture" id=4] +[ext_resource path="res://Sprites/Staff.png" type="Texture" id=5] +[ext_resource path="res://Sprites/Sword.png" type="Texture" id=6] +[ext_resource path="res://HUD_Weapon_Slot.png" type="Texture" id=7] +[ext_resource path="res://Sprites/Bow.png" type="Texture" id=8] +[ext_resource path="res://Sprites/Javelin.png" type="Texture" id=9] + +[node name="HUD" type="CanvasLayer"] +script = ExtResource( 1 ) + +[node name="Health Bar" type="TextureProgress" parent="."] +margin_top = 1.0 +margin_right = 104.0 +margin_bottom = 19.0 +rect_min_size = Vector2( 104, 18 ) +rect_scale = Vector2( 0.75, 0.75 ) +value = 50.0 +texture_under = ExtResource( 2 ) +texture_over = ExtResource( 4 ) +texture_progress = ExtResource( 3 ) +tint_progress = Color( 0.431373, 1, 0.737255, 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Currency" type="Label" parent="."] +margin_left = 220.0 +margin_right = 320.0 +align = 2 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Add Currency" type="Button" parent="."] +visible = false +margin_left = 300.0 +margin_top = 20.0 +margin_right = 320.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Equipped Weapon" type="CenterContainer" parent="."] +margin_left = 275.0 +margin_top = 135.0 +margin_right = 315.0 +margin_bottom = 175.0 +rect_min_size = Vector2( 40, 40 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Slot Background" type="TextureRect" parent="Equipped Weapon"] +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 7 ) + +[node name="Weapon" type="TextureButton" parent="Equipped Weapon"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 32.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 25, 25 ) +texture_normal = ExtResource( 6 ) +expand = true + +[node name="Weapon Selection" type="HBoxContainer" parent="."] +visible = false +margin_left = 230.0 +margin_top = 135.0 +margin_right = 270.0 +margin_bottom = 175.0 +grow_horizontal = 0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Bow" type="CenterContainer" parent="Weapon Selection"] +margin_right = 40.0 +margin_bottom = 40.0 +rect_min_size = Vector2( 40, 40 ) + +[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Bow"] +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 7 ) + +[node name="Weapon" type="TextureButton" parent="Weapon Selection/Bow"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 32.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 25, 25 ) +texture_normal = ExtResource( 8 ) +expand = true + +[node name="Javelin" type="CenterContainer" parent="Weapon Selection"] +margin_left = 44.0 +margin_right = 84.0 +margin_bottom = 40.0 +rect_min_size = Vector2( 40, 40 ) + +[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Javelin"] +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 7 ) + +[node name="Weapon" type="TextureButton" parent="Weapon Selection/Javelin"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 32.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 25, 25 ) +texture_normal = ExtResource( 9 ) +expand = true + +[node name="Staff" type="CenterContainer" parent="Weapon Selection"] +margin_left = 88.0 +margin_right = 128.0 +margin_bottom = 40.0 +rect_min_size = Vector2( 40, 40 ) + +[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Staff"] +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 7 ) + +[node name="Weapon" type="TextureButton" parent="Weapon Selection/Staff"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 32.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 25, 25 ) +texture_normal = ExtResource( 5 ) +expand = true + +[node name="Sword" type="CenterContainer" parent="Weapon Selection"] +visible = false +margin_left = 132.0 +margin_right = 172.0 +margin_bottom = 40.0 +rect_min_size = Vector2( 40, 40 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Slot Background" type="TextureRect" parent="Weapon Selection/Sword"] +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 7 ) + +[node name="Weapon" type="TextureButton" parent="Weapon Selection/Sword"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 32.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 25, 25 ) +texture_normal = ExtResource( 6 ) +expand = true + +[connection signal="pressed" from="Add Currency" to="." method="_on_Add_Currency_pressed"] +[connection signal="pressed" from="Equipped Weapon/Weapon" to="." method="_on_weapon_slot_pressed"] +[connection signal="pressed" from="Weapon Selection/Bow/Weapon" to="." method="_on_select_bow_pressed"] +[connection signal="pressed" from="Weapon Selection/Javelin/Weapon" to="." method="_on_select_javelin_pressed"] +[connection signal="pressed" from="Weapon Selection/Staff/Weapon" to="." method="_on_select_staff_pressed"] +[connection signal="pressed" from="Weapon Selection/Sword/Weapon" to="." method="_on_select_sword_pressed"] diff --git a/HUD_Weapon_Slot.png b/HUD_Weapon_Slot.png new file mode 100644 index 0000000..b77a497 Binary files /dev/null and b/HUD_Weapon_Slot.png differ diff --git a/HUD_Weapon_Slot.png.import b/HUD_Weapon_Slot.png.import new file mode 100644 index 0000000..fc1df58 --- /dev/null +++ b/HUD_Weapon_Slot.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/HUD_Weapon_Slot.png-55420041f7240ad325b59133cce1c101.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://HUD_Weapon_Slot.png" +dest_files=[ "res://.import/HUD_Weapon_Slot.png-55420041f7240ad325b59133cce1c101.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 +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Health_Bar_Progress.png.import b/Health_Bar_Progress.png.import new file mode 100644 index 0000000..7399b14 --- /dev/null +++ b/Health_Bar_Progress.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Health_Bar_Progress.png-117323bbc852614a5961413bb8cfea0f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Health_Bar_Progress.png" +dest_files=[ "res://.import/Health_Bar_Progress.png-117323bbc852614a5961413bb8cfea0f.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +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/Health_Bar_Under.png.import b/Health_Bar_Under.png.import new file mode 100644 index 0000000..5156e66 --- /dev/null +++ b/Health_Bar_Under.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Health_Bar_Under.png-6cd4d04ee9e2525df9d3281f17cae308.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Health_Bar_Under.png" +dest_files=[ "res://.import/Health_Bar_Under.png-6cd4d04ee9e2525df9d3281f17cae308.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +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/Ice.png b/Ice.png new file mode 100644 index 0000000..761ef73 Binary files /dev/null and b/Ice.png differ diff --git a/Ice.png.import b/Ice.png.import new file mode 100644 index 0000000..b7aae80 --- /dev/null +++ b/Ice.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Ice.png-c8b4cdbfa14e71a25c68ce0779963d26.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Ice.png" +dest_files=[ "res://.import/Ice.png-c8b4cdbfa14e71a25c68ce0779963d26.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=true +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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Inventory.gd b/Inventory.gd new file mode 100644 index 0000000..807e50d --- /dev/null +++ b/Inventory.gd @@ -0,0 +1,45 @@ +extends Node + +signal update_currency(amount) + +var __currency: int + +var __weapons: Array +var __accessories: Array +var __categories: Dictionary + + +func _ready() -> void: + self.__currency = 100 + + self.__weapons = [] + self.__accessories = [] + self.__categories = { + 'Weapon': self.__weapons, + 'Accessory': self.__accessories} + return + + +func get_currency() -> int: + return self.__currency + + +func add_currency(amount: int) -> void: + self.__currency += amount + emit_signal('update_currency', self.__currency) + return + + +func add(item) -> void: + self.__categories[item.type].append(item) + return + + +func discard(item) -> void: + var index: int = 0 + for itr in self.__categories[item.type]: + if itr.equals(item): + self.__categories[item.type].remove(index) + break + index += 1 + return diff --git a/Inventory.tscn b/Inventory.tscn new file mode 100644 index 0000000..9bd00aa --- /dev/null +++ b/Inventory.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Inventory.gd" type="Script" id=1] + +[node name="Inventory" type="Node"] +script = ExtResource( 1 ) diff --git a/Javelin.png.import b/Javelin.png.import new file mode 100644 index 0000000..b349350 --- /dev/null +++ b/Javelin.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Javelin.png-bf9f385141fd8df71540678491f44dbb.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Javelin.png" +dest_files=[ "res://.import/Javelin.png-bf9f385141fd8df71540678491f44dbb.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +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/Main.gd b/Main.gd index 9d139b2..99e49ee 100644 --- a/Main.gd +++ b/Main.gd @@ -51,8 +51,9 @@ func free_connected_node(node: Node, connected_function: String) -> void: func new_game() -> void: - if get_tree().change_scene(world_path) != OK: - print('ERROR: Main failed to change scene to World.') + #if get_tree().change_scene(world_path) != OK: + # print('ERROR: Main failed to change scene to World.') + get_tree().change_scene(world_path) return diff --git a/Player.gd b/Player.gd index 2865a3b..f59b44f 100644 --- a/Player.gd +++ b/Player.gd @@ -1,6 +1,9 @@ extends KinematicBody2D const ACCELERATION = 1000 +var hud: CanvasLayer = null +const HEALTH_SLICES: Array = [0, 20, 35, 50, 65, 80, 100] +var health_index: int = 6 const MAX_SPEED = 120 const FRICTION = 1000 @@ -22,3 +25,11 @@ func _physics_process(delta) -> void: velocity = move_and_slide(velocity) return +func load_hud(node: CanvasLayer) -> void: + hud = node + #if hud.connect('add_currency', self, 'add_currency') != OK: + #print('ERROR: HUD "add_currency" signal already connected.') + + hud.update_health(HEALTH_SLICES[health_index]) + hud.update_currency($Inventory.get_currency()) + return diff --git a/Player.tscn b/Player.tscn index f75f9f1..e372716 100644 --- a/Player.tscn +++ b/Player.tscn @@ -1,20 +1,21 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://Player.gd" type="Script" id=1] [ext_resource path="res://Sprites/Player.png" type="Texture" id=2] [ext_resource path="res://Sprites/Player_Down.png" type="Texture" id=3] [ext_resource path="res://Sprites/Player_Up.png" type="Texture" id=4] +[ext_resource path="res://Inventory.tscn" type="PackedScene" id=5] [sub_resource type="SpriteFrames" id=1] animations = [ { -"frames": [ ExtResource( 4 ) ], +"frames": [ ExtResource( 2 ) ], "loop": false, -"name": "look_up", +"name": "look_left", "speed": 5.0 }, { "frames": [ ExtResource( 2 ) ], "loop": false, -"name": "look_left", +"name": "look_right", "speed": 5.0 }, { "frames": [ ExtResource( 3 ) ], @@ -22,9 +23,9 @@ animations = [ { "name": "look_down", "speed": 5.0 }, { -"frames": [ ExtResource( 2 ) ], +"frames": [ ExtResource( 4 ) ], "loop": false, -"name": "look_right", +"name": "look_up", "speed": 5.0 } ] @@ -146,26 +147,26 @@ tracks/1/keys = { "values": [ false ] } -[sub_resource type="AnimationNodeAnimation" id=15] +[sub_resource type="AnimationNodeAnimation" id=8] animation = "Look Left" -[sub_resource type="AnimationNodeAnimation" id=16] +[sub_resource type="AnimationNodeAnimation" id=9] animation = "Look Down" -[sub_resource type="AnimationNodeAnimation" id=17] +[sub_resource type="AnimationNodeAnimation" id=10] animation = "Look Right" -[sub_resource type="AnimationNodeAnimation" id=18] +[sub_resource type="AnimationNodeAnimation" id=11] animation = "Look Up" [sub_resource type="AnimationNodeBlendSpace2D" id=12] -blend_point_0/node = SubResource( 15 ) +blend_point_0/node = SubResource( 8 ) blend_point_0/pos = Vector2( -1.01, 0 ) -blend_point_1/node = SubResource( 16 ) +blend_point_1/node = SubResource( 9 ) blend_point_1/pos = Vector2( 0, 1.1 ) -blend_point_2/node = SubResource( 17 ) +blend_point_2/node = SubResource( 10 ) blend_point_2/pos = Vector2( 1, 0 ) -blend_point_3/node = SubResource( 18 ) +blend_point_3/node = SubResource( 11 ) blend_point_3/pos = Vector2( 0, -1.1 ) min_space = Vector2( -1.01, -1.1 ) max_space = Vector2( 1, 1.1 ) @@ -210,3 +211,5 @@ anim_player = NodePath("../AnimationPlayer") active = true parameters/playback = SubResource( 14 ) parameters/Idle/blend_position = Vector2( 0.993787, 0.0189655 ) + +[node name="Inventory" parent="." instance=ExtResource( 5 )] diff --git a/Sprites/Bow.png b/Sprites/Bow.png new file mode 100644 index 0000000..8b8cfa5 Binary files /dev/null and b/Sprites/Bow.png differ diff --git a/Sprites/Bow.png.import b/Sprites/Bow.png.import new file mode 100644 index 0000000..3f9099e --- /dev/null +++ b/Sprites/Bow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Bow.png-2e372c0098797d6106e6e3767417e1ac.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Bow.png" +dest_files=[ "res://.import/Bow.png-2e372c0098797d6106e6e3767417e1ac.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=true +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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Sprites/Health_Bar_Over.png b/Sprites/Health_Bar_Over.png new file mode 100644 index 0000000..1fb3231 Binary files /dev/null and b/Sprites/Health_Bar_Over.png differ diff --git a/Sprites/Health_Bar_Over.png.import b/Sprites/Health_Bar_Over.png.import new file mode 100644 index 0000000..ab3e29d --- /dev/null +++ b/Sprites/Health_Bar_Over.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Health_Bar_Over.png-eb296b5f718c04ea700ee8c8b642b2c2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Health_Bar_Over.png" +dest_files=[ "res://.import/Health_Bar_Over.png-eb296b5f718c04ea700ee8c8b642b2c2.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 +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Sprites/Health_Bar_Progress.png b/Sprites/Health_Bar_Progress.png new file mode 100644 index 0000000..efcdf67 Binary files /dev/null and b/Sprites/Health_Bar_Progress.png differ diff --git a/Sprites/Health_Bar_Progress.png.import b/Sprites/Health_Bar_Progress.png.import new file mode 100644 index 0000000..63edae5 --- /dev/null +++ b/Sprites/Health_Bar_Progress.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Health_Bar_Progress.png-117323bbc852614a5961413bb8cfea0f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Health_Bar_Progress.png" +dest_files=[ "res://.import/Health_Bar_Progress.png-117323bbc852614a5961413bb8cfea0f.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 +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Sprites/Health_Bar_Under.png b/Sprites/Health_Bar_Under.png new file mode 100644 index 0000000..e9f5ffb Binary files /dev/null and b/Sprites/Health_Bar_Under.png differ diff --git a/Sprites/Health_Bar_Under.png.import b/Sprites/Health_Bar_Under.png.import new file mode 100644 index 0000000..ea6c142 --- /dev/null +++ b/Sprites/Health_Bar_Under.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Health_Bar_Under.png-6cd4d04ee9e2525df9d3281f17cae308.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Health_Bar_Under.png" +dest_files=[ "res://.import/Health_Bar_Under.png-6cd4d04ee9e2525df9d3281f17cae308.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 +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Sprites/Javelin.png b/Sprites/Javelin.png new file mode 100644 index 0000000..92c490d Binary files /dev/null and b/Sprites/Javelin.png differ diff --git a/Sprites/Javelin.png.import b/Sprites/Javelin.png.import new file mode 100644 index 0000000..b2adf8f --- /dev/null +++ b/Sprites/Javelin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Javelin.png-bf9f385141fd8df71540678491f44dbb.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Javelin.png" +dest_files=[ "res://.import/Javelin.png-bf9f385141fd8df71540678491f44dbb.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Sprites/Staff.png b/Sprites/Staff.png new file mode 100644 index 0000000..40e4363 Binary files /dev/null and b/Sprites/Staff.png differ diff --git a/Sprites/Staff.png.import b/Sprites/Staff.png.import new file mode 100644 index 0000000..de2bcb0 --- /dev/null +++ b/Sprites/Staff.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Staff.png-fa42f43f1fe514a082f4f7fb2db50691.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Staff.png" +dest_files=[ "res://.import/Staff.png-fa42f43f1fe514a082f4f7fb2db50691.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Sprites/Sword.png b/Sprites/Sword.png new file mode 100644 index 0000000..4aa40b2 Binary files /dev/null and b/Sprites/Sword.png differ diff --git a/Sprites/Sword.png.import b/Sprites/Sword.png.import new file mode 100644 index 0000000..bd8ef6d --- /dev/null +++ b/Sprites/Sword.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sword.png-f1264e53af856562d5148b82ddb3fd18.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Sword.png" +dest_files=[ "res://.import/Sword.png-f1264e53af856562d5148b82ddb3fd18.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/Sprites/coin.png b/Sprites/coin.png new file mode 100644 index 0000000..3d586c2 Binary files /dev/null and b/Sprites/coin.png differ diff --git a/Sprites/coin.png.import b/Sprites/coin.png.import new file mode 100644 index 0000000..d3e5bb6 --- /dev/null +++ b/Sprites/coin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/coin.png-b7fabe76c61e67396a7c0402e221b540.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/coin.png" +dest_files=[ "res://.import/coin.png-b7fabe76c61e67396a7c0402e221b540.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=true +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 +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Staff.png.import b/Staff.png.import new file mode 100644 index 0000000..46a2255 --- /dev/null +++ b/Staff.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Staff.png-fa42f43f1fe514a082f4f7fb2db50691.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Staff.png" +dest_files=[ "res://.import/Staff.png-fa42f43f1fe514a082f4f7fb2db50691.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=0 +process/fix_alpha_border=false +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/Sword.png.import b/Sword.png.import new file mode 100644 index 0000000..21fa263 --- /dev/null +++ b/Sword.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sword.png-f1264e53af856562d5148b82ddb3fd18.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/Sword.png" +dest_files=[ "res://.import/Sword.png-f1264e53af856562d5148b82ddb3fd18.stex" ] + +[params] + +compress/mode=3 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=2 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +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/World.gd b/World.gd index f349435..dac8a1f 100644 --- a/World.gd +++ b/World.gd @@ -2,4 +2,5 @@ extends Node2D func _ready() -> void: $YSort/Player.position = get_viewport_rect().size / 2 + $YSort/Player.load_hud($HUD) return diff --git a/World.tscn b/World.tscn index 4ec57f8..d1c0dfd 100644 --- a/World.tscn +++ b/World.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=15 format=2] [ext_resource path="res://Player.tscn" type="PackedScene" id=1] [ext_resource path="res://World.gd" type="Script" id=2] @@ -7,31 +7,9 @@ [ext_resource path="res://Cliffs.png" type="Texture" id=5] [ext_resource path="res://Sand.png" type="Texture" id=6] [ext_resource path="res://TX Props.png" type="Texture" id=7] - -[sub_resource type="TileSet" id=1] -0/name = "Grass.png 0" -0/texture = ExtResource( 3 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 80, 48 ) -0/tile_mode = 1 -0/autotile/bitmask_mode = 1 -0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 255, Vector2( 0, 1 ), 219, Vector2( 0, 2 ), 507, Vector2( 1, 0 ), 63, Vector2( 1, 2 ), 504, Vector2( 2, 0 ), 447, Vector2( 2, 1 ), 438, Vector2( 2, 2 ), 510, Vector2( 3, 0 ), 432, Vector2( 3, 1 ), 54, Vector2( 4, 0 ), 216, Vector2( 4, 1 ), 27, Vector2( 4, 2 ), 511 ] -0/autotile/icon_coordinate = Vector2( 0, 0 ) -0/autotile/tile_size = Vector2( 16, 16 ) -0/autotile/spacing = 0 -0/autotile/occluder_map = [ ] -0/autotile/navpoly_map = [ ] -0/autotile/priority_map = [ ] -0/autotile/z_index_map = [ ] -0/occluder_offset = Vector2( 0, 0 ) -0/navigation_offset = Vector2( 0, 0 ) -0/shape_offset = Vector2( 0, 0 ) -0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape_one_way = false -0/shape_one_way_margin = 0.0 -0/shapes = [ ] -0/z_index = 0 +[ext_resource path="res://HUD.tscn" type="PackedScene" id=8] +[ext_resource path="res://forestHouse.tscn" type="PackedScene" id=9] +[ext_resource path="res://Door.png" type="Texture" id=10] [sub_resource type="TileSet" id=2] 0/name = "Grass.png 0" @@ -104,6 +82,31 @@ 2/shapes = [ ] 2/z_index = 2 +[sub_resource type="TileSet" id=1] +0/name = "Grass.png 0" +0/texture = ExtResource( 3 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 80, 48 ) +0/tile_mode = 1 +0/autotile/bitmask_mode = 1 +0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 255, Vector2( 0, 1 ), 219, Vector2( 0, 2 ), 507, Vector2( 1, 0 ), 63, Vector2( 1, 2 ), 504, Vector2( 2, 0 ), 447, Vector2( 2, 1 ), 438, Vector2( 2, 2 ), 510, Vector2( 3, 0 ), 432, Vector2( 3, 1 ), 54, Vector2( 4, 0 ), 216, Vector2( 4, 1 ), 27, Vector2( 4, 2 ), 511 ] +0/autotile/icon_coordinate = Vector2( 0, 0 ) +0/autotile/tile_size = Vector2( 16, 16 ) +0/autotile/spacing = 0 +0/autotile/occluder_map = [ ] +0/autotile/navpoly_map = [ ] +0/autotile/priority_map = [ ] +0/autotile/z_index_map = [ ] +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape_one_way = false +0/shape_one_way_margin = 0.0 +0/shapes = [ ] +0/z_index = 0 + [sub_resource type="ConvexPolygonShape2D" id=3] points = PoolVector2Array( 33.0868, 45.5302, 15.4222, 45.5302, 15.4222, 39.0812, 33.0868, 39.0812 ) @@ -182,17 +185,18 @@ points = PoolVector2Array( 33.0868, 45.5302, 15.4222, 45.5302, 15.4222, 39.0812, [node name="World" type="Node2D"] script = ExtResource( 2 ) -[node name="TileMap" type="TileMap" parent="."] -modulate = Color( 0.745098, 0.498039, 0.498039, 1 ) +[node name="YSort" type="YSort" parent="."] + +[node name="Player" parent="YSort" instance=ExtResource( 1 )] z_index = 2 -tile_set = SubResource( 1 ) -cell_size = Vector2( 16, 16 ) -cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 ) -format = 1 -tile_data = PoolIntArray( -589809, 0, 3, -589808, 0, 4, -524273, 0, 65538, -524272, 0, 65536, -458739, 0, 3, -458738, 0, 131073, -458737, 0, 0, -458736, 0, 65540, -393203, 0, 65538, -393202, 0, 0, -393201, 0, 65540, -327669, 0, 3, -327668, 0, 131073, -327667, 0, 131074, -327666, 0, 65536, -262134, 0, 3, -262133, 0, 131074, -262132, 0, 0, -262131, 0, 1, -262130, 0, 65540, -196601, 0, 3, -196600, 0, 131073, -196599, 0, 131073, -196598, 0, 131074, -196597, 0, 0, -196596, 0, 65540, -131065, 0, 65538, -131064, 0, 0, -131063, 0, 1, -131062, 0, 1, -131061, 0, 65540, -131054, 0, 131076, -2, 0, 3, -1, 0, 131073, -65536, 0, 131073, -65535, 0, 131073, -65534, 0, 131073, -65533, 0, 131073, -65532, 0, 131073, -65531, 0, 131073, -65530, 0, 131073, -65529, 0, 131074, -65528, 0, 65536, -65517, 0, 131076, 65534, 0, 65539, 65535, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 2, 8, 0, 65536, 65543, 0, 65538, 65544, 0, 131072, 65545, 0, 131073, 65546, 0, 131073, 65547, 0, 131073, 65548, 0, 131073, 65549, 0, 131073, 65550, 0, 4, 131079, 0, 65538, 131080, 0, 0, 131081, 0, 1, 131082, 0, 1, 131083, 0, 1, 131084, 0, 2, 131085, 0, 131076, 131086, 0, 65536, 196615, 0, 65538, 196616, 0, 65536, 196620, 0, 65539, 196621, 0, 2, 196622, 0, 65536, 262150, 0, 3, 262151, 0, 131074, 262152, 0, 65536, 262157, 0, 65538, 262158, 0, 65536, 327683, 0, 3, 327684, 0, 131073, 327685, 0, 131073, 327686, 0, 131074, 327687, 0, 0, 327688, 0, 65540, 327693, 0, 65538, 327694, 0, 65536, 458749, 0, 3, 458750, 0, 131073, 458751, 0, 131073, 393216, 0, 131073, 393217, 0, 131073, 393218, 0, 131073, 393219, 0, 131074, 393220, 0, 0, 393221, 0, 1, 393222, 0, 1, 393223, 0, 65540, 393227, 0, 3, 393228, 0, 131073, 393229, 0, 131074, 393230, 0, 65536, 524285, 0, 65539, 524286, 0, 1, 524287, 0, 1, 458752, 0, 1, 458753, 0, 1, 458754, 0, 1, 458755, 0, 1, 458756, 0, 65540, 458762, 0, 3, 458763, 0, 131074, 458764, 0, 131076, 458765, 0, 131076, 458766, 0, 65536, 524298, 0, 65538, 524299, 0, 131076, 524300, 0, 0, 524301, 0, 1, 524302, 0, 65540, 589833, 0, 3, 589834, 0, 131074, 589835, 0, 131076, 589836, 0, 65536, 655369, 0, 65538, 655370, 0, 0, 655371, 0, 1, 655372, 0, 65540, 720901, 0, 3, 720902, 0, 131073, 720903, 0, 131073, 720904, 0, 131073, 720905, 0, 131074, 720906, 0, 65536, 786435, 0, 3, 786436, 0, 131073, 786437, 0, 131074, 786438, 0, 0, 786439, 0, 1, 786440, 0, 1, 786441, 0, 2, 786442, 0, 65536, 851971, 0, 65539, 851972, 0, 1, 851973, 0, 1, 851974, 0, 65540, 851977, 0, 65539, 851978, 0, 65540 ) +collision_mask = 2 + +[node name="Camera2D" type="Camera2D" parent="YSort/Player"] +current = true + +[node name="HUD" parent="." instance=ExtResource( 8 )] [node name="Ground" type="TileMap" parent="."] -z_index = 1 tile_set = SubResource( 2 ) cell_size = Vector2( 16, 16 ) cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 ) @@ -201,20 +205,29 @@ cell_y_sort = true format = 1 tile_data = PoolIntArray( -720892, 0, 3, -720891, 0, 131073, -720890, 0, 131073, -720889, 0, 131073, -720888, 0, 131073, -720887, 0, 131073, -720886, 0, 131073, -720885, 0, 131073, -720884, 0, 131073, -720883, 0, 131073, -720882, 0, 131073, -720881, 0, 131073, -720880, 0, 131073, -720879, 0, 131073, -720878, 0, 4, -655356, 0, 65538, -655355, 0, 131076, -655354, 0, 131076, -655353, 0, 131076, -655352, 0, 131076, -655351, 0, 131076, -655350, 0, 131076, -655349, 0, 131076, -655348, 0, 131076, -655347, 0, 131076, -655346, 0, 131076, -655345, 0, 131076, -655344, 0, 131076, -655343, 0, 131076, -655342, 0, 131072, -655341, 0, 4, -589822, 0, 3, -589821, 0, 131073, -589820, 0, 131074, -589819, 0, 131076, -589818, 0, 131076, -589817, 0, 131076, -589816, 0, 131076, -589815, 0, 131076, -589814, 0, 131076, -589813, 0, 131076, -589812, 0, 131076, -589811, 0, 131076, -589810, 0, 131076, -589809, 0, 131076, -589808, 0, 131076, -589807, 0, 131076, -589806, 0, 131076, -589805, 0, 131072, -589804, 0, 4, -524286, 0, 65538, -524285, 0, 131076, -524284, 0, 131076, -524283, 0, 131076, -524282, 0, 131076, -524281, 0, 131076, -524280, 0, 131076, -524279, 0, 131076, -524278, 0, 131076, -524277, 0, 131076, -524276, 0, 131076, -524275, 0, 131076, -524274, 0, 131076, -524273, 0, 131076, -524272, 0, 131076, -524271, 0, 131076, -524270, 0, 131076, -524269, 0, 131076, -524268, 0, 65536, -458750, 0, 65538, -458749, 0, 131076, -458748, 0, 131076, -458747, 0, 131076, -458746, 0, 131076, -458745, 0, 131076, -458744, 0, 131076, -458743, 0, 131076, -458742, 0, 131076, -458741, 0, 131076, -458740, 0, 131076, -458739, 0, 131076, -458738, 0, 131076, -458737, 0, 131076, -458736, 0, 131076, -458735, 0, 131076, -458734, 0, 131076, -458733, 0, 131076, -458732, 0, 65536, -393215, 0, 3, -393214, 0, 131074, -393213, 0, 131076, -393212, 0, 131076, -393211, 0, 131076, -393210, 0, 131076, -393209, 0, 131076, -393208, 0, 131076, -393207, 0, 131076, -393206, 0, 131076, -393205, 0, 131076, -393204, 0, 131076, -393203, 0, 131076, -393202, 0, 131076, -393201, 0, 131076, -393200, 0, 131076, -393199, 0, 131076, -393198, 0, 131076, -393197, 0, 131076, -393196, 0, 65536, -327680, 0, 3, -327679, 0, 131074, -327678, 0, 131076, -327677, 0, 131076, -327676, 0, 131076, -327675, 0, 131076, -327674, 0, 131076, -327673, 0, 131076, -327672, 0, 131076, -327671, 0, 131076, -327670, 0, 131076, -327669, 0, 131076, -327668, 0, 131076, -327667, 0, 131076, -327666, 0, 131076, -327665, 0, 131076, -327664, 0, 131076, -327663, 0, 131076, -327662, 0, 131076, -327661, 0, 131076, -327660, 0, 65536, -196609, 0, 3, -262144, 0, 131074, -262143, 0, 131076, -262142, 0, 131076, -262141, 0, 131076, -262140, 0, 131076, -262139, 0, 131076, -262138, 0, 131076, -262137, 0, 131076, -262136, 0, 131076, -262135, 0, 131076, -262134, 0, 131076, -262133, 0, 131076, -262132, 0, 131076, -262131, 0, 131076, -262130, 0, 131076, -262129, 0, 131076, -262128, 0, 131076, -262127, 0, 131076, -262126, 0, 131076, -262125, 0, 131076, -262124, 0, 65536, -131074, 0, 3, -131073, 0, 131074, -196608, 0, 131076, -196607, 0, 131076, -196606, 0, 131076, -196605, 0, 131076, -196604, 0, 131076, -196603, 0, 131076, -196602, 0, 131076, -196601, 0, 131076, -196600, 0, 131076, -196599, 0, 131076, -196598, 0, 131076, -196597, 0, 131076, -196596, 0, 131076, -196595, 0, 131076, -196594, 0, 131076, -196593, 0, 131076, -196592, 0, 131076, -196591, 0, 131076, -196590, 0, 131076, -196589, 0, 131076, -196588, 0, 131072, -196587, 0, 4, -65538, 0, 65538, -65537, 0, 131076, -131072, 0, 131076, -131071, 0, 131076, -131070, 0, 131076, -131069, 0, 131076, -131068, 0, 131076, -131067, 0, 131076, -131066, 0, 131076, -131065, 0, 131076, -131064, 0, 131076, -131063, 0, 131076, -131062, 0, 131076, -131061, 0, 131076, -131060, 0, 131076, -131059, 0, 131076, -131058, 0, 131076, -131057, 0, 131076, -131056, 0, 131076, -131055, 0, 131076, -131054, 0, 131076, -131053, 0, 131076, -131052, 0, 131076, -131051, 0, 65536, -2, 0, 65538, -1, 0, 131076, -65536, 0, 131076, -65535, 0, 131076, -65534, 0, 131076, -65533, 0, 131076, -65532, 0, 131076, -65531, 0, 131076, -65530, 0, 131076, -65529, 0, 131076, -65528, 0, 131076, -65527, 0, 131076, -65526, 0, 131076, -65525, 0, 131076, -65524, 0, 131076, -65523, 0, 131076, -65522, 0, 131076, -65521, 0, 131076, -65520, 0, 131076, -65519, 0, 131076, -65518, 0, 131076, -65517, 0, 131076, -65516, 0, 131076, -65515, 0, 65536, 65534, 0, 65538, 65535, 0, 131076, 0, 0, 131076, 1, 0, 131076, 2, 0, 131076, 3, 0, 131076, 4, 0, 131076, 5, 0, 131076, 6, 0, 131076, 7, 0, 131076, 8, 0, 131076, 9, 0, 131076, 10, 0, 131076, 11, 0, 131076, 12, 0, 131076, 13, 0, 131076, 14, 0, 131076, 15, 0, 131076, 16, 0, 131076, 17, 0, 131076, 18, 0, 131076, 19, 0, 131076, 20, 0, 131076, 21, 0, 65536, 131070, 0, 65538, 131071, 0, 131076, 65536, 0, 131076, 65537, 0, 131076, 65538, 0, 131076, 65539, 0, 131076, 65540, 0, 131076, 65541, 0, 131076, 65542, 0, 131076, 65543, 0, 131076, 65544, 0, 131076, 65545, 0, 131076, 65546, 0, 131076, 65547, 0, 131076, 65548, 0, 131076, 65549, 0, 131076, 65550, 0, 131076, 65551, 0, 131076, 65552, 0, 131076, 65553, 0, 131076, 65554, 0, 131076, 65555, 0, 131076, 65556, 0, 131076, 65557, 0, 65536, 196606, 0, 65538, 196607, 0, 131076, 131072, 0, 131076, 131073, 0, 131076, 131074, 0, 131076, 131075, 0, 131076, 131076, 0, 131076, 131077, 0, 131076, 131078, 0, 131076, 131079, 0, 131076, 131080, 0, 131076, 131081, 0, 131076, 131082, 0, 131076, 131083, 0, 131076, 131084, 0, 131076, 131085, 0, 131076, 131086, 0, 131076, 131087, 0, 131076, 131088, 0, 131076, 131089, 0, 131076, 131090, 0, 131076, 131091, 0, 131076, 131092, 0, 131076, 131093, 0, 65536, 262142, 0, 65538, 262143, 0, 131076, 196608, 0, 131076, 196609, 0, 131076, 196610, 0, 131076, 196611, 0, 131076, 196612, 0, 131076, 196613, 0, 131076, 196614, 0, 131076, 196615, 0, 131076, 196616, 0, 131076, 196617, 0, 131076, 196618, 0, 131076, 196619, 0, 131076, 196620, 0, 131076, 196621, 0, 131076, 196622, 0, 131076, 196623, 0, 131076, 196624, 0, 131076, 196625, 0, 131076, 196626, 0, 131076, 196627, 0, 131076, 196628, 0, 131076, 196629, 0, 65536, 327678, 0, 65538, 327679, 0, 131076, 262144, 0, 131076, 262145, 0, 131076, 262146, 0, 131076, 262147, 0, 131076, 262148, 0, 131076, 262149, 0, 131076, 262150, 0, 131076, 262151, 0, 131076, 262152, 0, 131076, 262153, 0, 131076, 262154, 0, 131076, 262155, 0, 131076, 262156, 0, 131076, 262157, 0, 131076, 262158, 0, 131076, 262159, 0, 131076, 262160, 0, 131076, 262161, 0, 131076, 262162, 0, 131076, 262163, 0, 131076, 262164, 0, 131076, 262165, 0, 65536, 393214, 0, 65539, 393215, 0, 1, 327680, 0, 2, 327681, 0, 131076, 327682, 0, 131076, 327683, 0, 131076, 327684, 0, 131076, 327685, 0, 131076, 327686, 0, 131076, 327687, 0, 131076, 327688, 0, 131076, 327689, 0, 131076, 327690, 0, 131076, 327691, 0, 131076, 327692, 0, 131076, 327693, 0, 131076, 327694, 0, 131076, 327695, 0, 131076, 327696, 0, 131076, 327697, 0, 131076, 327698, 0, 131076, 327699, 0, 131076, 327700, 0, 0, 327701, 0, 65540, 393216, 0, 65538, 393217, 0, 131076, 393218, 0, 131076, 393219, 0, 131076, 393220, 0, 131076, 393221, 0, 131076, 393222, 0, 131076, 393223, 0, 131076, 393224, 0, 131076, 393225, 0, 131076, 393226, 0, 131076, 393227, 0, 131076, 393228, 0, 131076, 393229, 0, 131076, 393230, 0, 131076, 393231, 0, 131076, 393232, 0, 131076, 393233, 0, 131076, 393234, 0, 131076, 393235, 0, 131076, 393236, 0, 65536, 524287, 0, 3, 458752, 0, 131074, 458753, 0, 131076, 458754, 0, 131076, 458755, 0, 131076, 458756, 0, 131076, 458757, 0, 131076, 458758, 0, 131076, 458759, 0, 131076, 458760, 0, 131076, 458761, 0, 131076, 458762, 0, 131076, 458763, 0, 131076, 458764, 0, 131076, 458765, 0, 131076, 458766, 0, 131076, 458767, 0, 131076, 458768, 0, 131076, 458769, 0, 131076, 458770, 0, 131076, 458771, 0, 131076, 458772, 0, 65536, 589823, 0, 65538, 524288, 0, 131076, 524289, 0, 131076, 524290, 0, 131076, 524291, 0, 131076, 524292, 0, 131076, 524293, 0, 131076, 524294, 0, 131076, 524295, 0, 131076, 524296, 0, 131076, 524297, 0, 131076, 524298, 0, 131076, 524299, 0, 131076, 524300, 0, 131076, 524301, 0, 131076, 524302, 0, 131076, 524303, 0, 131076, 524304, 0, 131076, 524305, 0, 131076, 524306, 0, 131076, 524307, 0, 131076, 524308, 0, 65536, 655359, 0, 65538, 589824, 0, 131076, 589825, 0, 131076, 589826, 0, 131076, 589827, 0, 131076, 589828, 0, 131076, 589829, 0, 131076, 589830, 0, 131076, 589831, 0, 131076, 589832, 0, 131076, 589833, 0, 131076, 589834, 0, 131076, 589835, 0, 131076, 589836, 0, 131076, 589837, 0, 131076, 589838, 0, 131076, 589839, 0, 131076, 589840, 0, 131076, 589841, 0, 131076, 589842, 0, 131076, 589843, 0, 131076, 589844, 0, 131072, 589845, 0, 4, 720895, 0, 65539, 655360, 0, 2, 655361, 0, 131076, 655362, 0, 131076, 655363, 0, 131076, 655364, 0, 131076, 655365, 0, 131076, 655366, 0, 131076, 655367, 0, 131076, 655368, 0, 131076, 655369, 0, 131076, 655370, 0, 131076, 655371, 0, 131076, 655372, 0, 131076, 655373, 0, 131076, 655374, 0, 131076, 655375, 0, 131076, 655376, 0, 131076, 655377, 0, 131076, 655378, 0, 131076, 655379, 0, 131076, 655380, 0, 131076, 655381, 0, 65536, 720896, 0, 65539, 720897, 0, 2, 720898, 0, 131076, 720899, 0, 131076, 720900, 0, 131076, 720901, 0, 131076, 720902, 0, 131076, 720903, 0, 131076, 720904, 0, 131076, 720905, 0, 0, 720906, 0, 1, 720907, 0, 1, 720908, 0, 2, 720909, 0, 131076, 720910, 0, 131076, 720911, 0, 131076, 720912, 0, 131076, 720913, 0, 131076, 720914, 0, 131076, 720915, 0, 0, 720916, 0, 1, 720917, 0, 65540, 786433, 0, 65539, 786434, 0, 1, 786435, 0, 1, 786436, 0, 1, 786437, 0, 1, 786438, 0, 1, 786439, 0, 1, 786440, 0, 1, 786441, 0, 65540, 786444, 0, 65539, 786445, 0, 1, 786446, 0, 1, 786447, 0, 1, 786448, 0, 1, 786449, 0, 1, 786450, 0, 1, 786451, 0, 65540 ) +[node name="forestHouse" parent="." instance=ExtResource( 9 )] +visible = false +position = Vector2( 35.4162, -76.797 ) + +[node name="TileMap" type="TileMap" parent="."] +modulate = Color( 0.745098, 0.498039, 0.498039, 1 ) +tile_set = SubResource( 1 ) +cell_size = Vector2( 16, 16 ) +cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 ) +format = 1 +tile_data = PoolIntArray( -589809, 0, 3, -589808, 0, 4, -524273, 0, 65538, -524272, 0, 65536, -458739, 0, 3, -458738, 0, 131073, -458737, 0, 131074, -458736, 0, 65536, -393203, 0, 65538, -393202, 0, 0, -393201, 0, 1, -393200, 0, 65540, -327669, 0, 3, -327668, 0, 131073, -327667, 0, 131074, -327666, 0, 65536, -262134, 0, 3, -262133, 0, 131074, -262132, 0, 0, -262131, 0, 1, -262130, 0, 65540, -196601, 0, 3, -196600, 0, 131073, -196599, 0, 131073, -196598, 0, 131074, -196597, 0, 0, -196596, 0, 65540, -131065, 0, 65538, -131064, 0, 0, -131063, 0, 1, -131062, 0, 1, -131061, 0, 65540, -131054, 0, 131076, -2, 0, 3, -1, 0, 131073, -65536, 0, 131073, -65535, 0, 131073, -65534, 0, 131073, -65533, 0, 131073, -65532, 0, 131073, -65531, 0, 131073, -65530, 0, 131073, -65529, 0, 131074, -65528, 0, 65536, -65517, 0, 131076, 65534, 0, 65539, 65535, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 2, 8, 0, 65536, 65543, 0, 65538, 65544, 0, 131072, 65545, 0, 131073, 65546, 0, 131073, 65547, 0, 131073, 65548, 0, 131073, 65549, 0, 131073, 65550, 0, 4, 131079, 0, 65538, 131080, 0, 0, 131081, 0, 1, 131082, 0, 1, 131083, 0, 1, 131084, 0, 2, 131085, 0, 131076, 131086, 0, 65536, 196615, 0, 65538, 196616, 0, 65536, 196620, 0, 65539, 196621, 0, 2, 196622, 0, 65536, 262150, 0, 3, 262151, 0, 131074, 262152, 0, 65536, 262157, 0, 65538, 262158, 0, 65536, 327683, 0, 3, 327684, 0, 131073, 327685, 0, 131073, 327686, 0, 131074, 327687, 0, 0, 327688, 0, 65540, 327693, 0, 65538, 327694, 0, 65536, 458749, 0, 3, 458750, 0, 131073, 458751, 0, 131073, 393216, 0, 131073, 393217, 0, 131073, 393218, 0, 131073, 393219, 0, 131074, 393220, 0, 0, 393221, 0, 1, 393222, 0, 1, 393223, 0, 65540, 393227, 0, 3, 393228, 0, 131073, 393229, 0, 131074, 393230, 0, 65536, 524285, 0, 65539, 524286, 0, 1, 524287, 0, 1, 458752, 0, 1, 458753, 0, 1, 458754, 0, 1, 458755, 0, 1, 458756, 0, 65540, 458762, 0, 3, 458763, 0, 131074, 458764, 0, 131076, 458765, 0, 131076, 458766, 0, 65536, 524298, 0, 65538, 524299, 0, 131076, 524300, 0, 0, 524301, 0, 1, 524302, 0, 65540, 589833, 0, 3, 589834, 0, 131074, 589835, 0, 131076, 589836, 0, 65536, 655369, 0, 65538, 655370, 0, 0, 655371, 0, 1, 655372, 0, 65540, 720901, 0, 3, 720902, 0, 131073, 720903, 0, 131073, 720904, 0, 131073, 720905, 0, 131074, 720906, 0, 65536, 786435, 0, 3, 786436, 0, 131073, 786437, 0, 131074, 786438, 0, 0, 786439, 0, 1, 786440, 0, 1, 786441, 0, 2, 786442, 0, 65536, 851971, 0, 65539, 851972, 0, 1, 851973, 0, 1, 851974, 0, 65540, 851977, 0, 65539, 851978, 0, 65540 ) + [node name="Objects" type="TileMap" parent="."] -z_index = 2 tile_set = SubResource( 4 ) cell_size = Vector2( 16, 16 ) cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 ) cell_y_sort = true format = 1 -tile_data = PoolIntArray( -786418, 5, 0, -393211, 1, 0, -393199, 1, 0, -327677, 1, 0, -327665, 1, 0, -262144, 1, 0, -262142, 1, 0, -262139, 1, 0, -262127, 1, 0, -131057, 1, 0, -131054, 1, 0, -65527, 3, 0, -65523, 3, 65537, 4, 1, 0, 11, 3, 65538, 17, 1, 0, 65536, 1, 0, 65537, 3, 1, 65551, 1, 0, 65552, 3, 65538, 131074, 1, 0, 131082, 1, 0, 131089, 1, 0, 196608, 1, 0, 196614, 3, 65536, 262147, 3, 0, 262153, 0, 4, 327682, 0, 3, 327687, 0, 3, 327688, 0, 131074, 327689, 0, 65536, 327692, 3, 131073, 393217, 0, 3, 393218, 0, 131074, 393219, 0, 131072, 393222, 0, 131073, 393223, 0, 131074, 393224, 0, 0, 393225, 0, 65540, 393233, 3, 131074, 458753, 1, 0, 458754, 0, 1, 458755, 3, 2, 458758, 0, 1, 458759, 0, 1, 458760, 0, 65540, 458761, 3, 2, 524291, 0, 65539, 524292, 0, 65540, 524295, 3, 131072, 524303, 3, 2, 524305, 1, 0, 589828, 3, 131074, 655368, 3, 65537 ) +tile_data = PoolIntArray( -393211, 1, 0, -393199, 1, 0, -327677, 1, 0, -327665, 1, 0, -262144, 1, 0, -262142, 1, 0, -262139, 1, 0, -262127, 1, 0, -131057, 1, 0, -131054, 1, 0, -65527, 3, 0, -65523, 3, 65537, 4, 1, 0, 11, 3, 65538, 17, 1, 0, 65536, 1, 0, 65537, 3, 1, 65551, 1, 0, 65552, 3, 65538, 131074, 1, 0, 131082, 1, 0, 131089, 1, 0, 196608, 1, 0, 196614, 3, 65536, 262147, 3, 0, 262153, 0, 4, 327682, 0, 3, 327687, 0, 3, 327688, 0, 131074, 327689, 0, 65536, 327692, 3, 131073, 393217, 0, 3, 393218, 0, 131074, 393219, 0, 131072, 393222, 0, 131073, 393223, 0, 131074, 393224, 0, 0, 393225, 0, 65540, 393233, 3, 131074, 458753, 1, 0, 458754, 0, 1, 458755, 3, 2, 458758, 0, 1, 458759, 0, 1, 458760, 0, 65540, 458761, 3, 2, 524291, 0, 65539, 524292, 0, 65540, 524295, 3, 131072, 524303, 3, 2, 524305, 1, 0, 589828, 3, 131074, 655368, 3, 65537 ) -[node name="YSort" type="YSort" parent="."] +[node name="Node2D" type="Node2D" parent="."] +position = Vector2( 256, -143 ) +scale = Vector2( 0.6, 0.6 ) -[node name="Player" parent="YSort" instance=ExtResource( 1 )] -z_index = 3 -collision_mask = 2 - -[node name="Camera2D" type="Camera2D" parent="YSort/Player"] -current = true +[node name="Sprite" type="Sprite" parent="Node2D"] +texture = ExtResource( 10 ) diff --git a/forestHouse.png.import b/forestHouse.png.import index e69c43e..8e87bc7 100644 --- a/forestHouse.png.import +++ b/forestHouse.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 @@ -30,5 +30,5 @@ process/HDR_as_SRGB=false process/invert_color=false stream=false size_limit=0 -detect_3d=true +detect_3d=false svg/scale=1.0 diff --git a/forestHouse.tscn b/forestHouse.tscn index 6931a39..c8a6092 100644 --- a/forestHouse.tscn +++ b/forestHouse.tscn @@ -8,7 +8,6 @@ extents = Vector2( 13, 10 ) [node name="forestHouse" type="Node2D"] [node name="Sprite" type="Sprite" parent="."] -modulate = Color( 0.823529, 0.34902, 0.32549, 1 ) texture = ExtResource( 1 ) offset = Vector2( 0, -8 ) diff --git a/project.godot b/project.godot index f03b21f..c88bda6 100644 --- a/project.godot +++ b/project.godot @@ -30,22 +30,22 @@ window/stretch/aspect="keep" player_right={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) ] } player_left={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) ] } player_up={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) ] } player_down={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) ] }