diff --git a/KinematicBody2D.gd b/KinematicBody2D.gd new file mode 100644 index 0000000..7e84473 --- /dev/null +++ b/KinematicBody2D.gd @@ -0,0 +1,16 @@ +extends KinematicBody2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/Skeleton Enemy.gd b/Skeleton Enemy.gd new file mode 100644 index 0000000..2b0de64 --- /dev/null +++ b/Skeleton Enemy.gd @@ -0,0 +1,27 @@ +extends KinematicBody2D + +var speed = 60 +var gravity =500 +const UP = Vector2(0, -1) + +var velocity = Vector2() + +func apply_gravity(delta, modifier = 1): + velocity.y += gravity * delta * modifier + +func _physics_process(_delta): + if Globals.player != null: + if $RayCast2D.get_collider() != null && $RayCast2D.get_collider().has_method("get_type") and $RayCast2D.get_collider().get_type() == "player": + velocity = Vector2(0, 0) + elif $RayCast2D2.get_collider() != null && $RayCast2D2.get_collider().has_method("get_type") and $RayCast2D2.get_collider().get_type() == "player": + velocity = Vector2(0, 0) + else: + velocity.x = position.direction_to(Globals.player).normalized().x + apply_gravity(_delta) + velocity.x *= speed + velocity = move_and_slide(velocity, UP) + + if is_on_wall() and is_on_floor(): + velocity.y = -150 + + diff --git a/Skeleton.gd b/Skeleton.gd new file mode 100644 index 0000000..3e8348f --- /dev/null +++ b/Skeleton.gd @@ -0,0 +1,32 @@ +extends RigidBody2D + +var speed = 45 +var gravity = 500 +const UP = Vector2(0, -1) +var is_grounded +var touching_wall = 0 + +var velocity = Vector2() + +func apply_gravity(delta, modifier = 1): + velocity.y += gravity * delta * modifier + +func _physics_process(_delta): + if Globals.player != null: + velocity.x = position.direction_to(Globals.player).normalized().x + apply_gravity(_delta) + velocity = move_and_slide(velocity * speed) + + if is_on_wall(): + if velocity.x > -1 and velocity.x < 1: + velocity.x = 0 + var was_on_floor = is_on_floor() + velocity = move_and_slide(velocity, Vector2.UP) + if !was_on_floor and is_on_floor(): + emit_signal("grounded_updated", is_on_floor()) + var was_grounded = is_grounded + is_grounded = is_on_floor() + + if Vector2.ZERO == velocity: + velocity.y = -10 + diff --git a/ai/Skeleton Enemy.tscn b/ai/Skeleton Enemy.tscn new file mode 100644 index 0000000..7ab1596 --- /dev/null +++ b/ai/Skeleton Enemy.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Skeleton Enemy.gd" type="Script" id=1] +[ext_resource path="res://art/unknown.png" type="Texture" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 5, 7 ) + +[node name="Skeleton Enemy" type="KinematicBody2D"] +collision_layer = 4 +collision_mask = 3 +script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) + +[node name="RayCast2D" type="RayCast2D" parent="."] +enabled = true +cast_to = Vector2( -80, 0 ) +collision_mask = 3 + +[node name="RayCast2D2" type="RayCast2D" parent="."] +enabled = true +cast_to = Vector2( 80, 0 ) +collision_mask = 3 diff --git a/art/unknown.png b/art/unknown.png new file mode 100644 index 0000000..2a90cd3 Binary files /dev/null and b/art/unknown.png differ diff --git a/art/unknown.png.import b/art/unknown.png.import new file mode 100644 index 0000000..358a340 --- /dev/null +++ b/art/unknown.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/unknown.png-7a4eff0f343d686ce2bdb9afaa03b634.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/unknown.png" +dest_files=[ "res://.import/unknown.png-7a4eff0f343d686ce2bdb9afaa03b634.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/characters/Player.tscn b/characters/Player.tscn index 1bba75d..4b10638 100644 --- a/characters/Player.tscn +++ b/characters/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://script/player.gd" type="Script" id=1] [ext_resource path="res://ui/PlayerStats.tscn" type="PackedScene" id=2] @@ -9,10 +9,6 @@ [sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( -7, 0, -7, -2, -6, -2, -6, -3, -5, -3, -5, -5, -6, -5, -6, -10, -7, -10, -7, -12, -6, -12, -6, -19, -4, -19, -4, -18, -3, -18, -3, -17, 1, -17, 1, -16, 3, -16, 3, -15, 4, -15, 4, -14, 5, -14, 5, -13, 6, -13, 6, -12, 7, -12, 7, -10, 6, -10, 6, -9, 5, -9, 5, -8, 6, -8, 6, -4, 5, -4, 5, 0, -7, 0 ) -[sub_resource type="CapsuleShape2D" id=2] -radius = 6.0 -height = 2.0 - [sub_resource type="Animation" id=3] resource_name = "Idle" length = 0.8 @@ -94,11 +90,6 @@ visible = false position = Vector2( 0, 12 ) occluder = SubResource( 1 ) -[node name="WorldCollision" type="CollisionShape2D" parent="."] -visible = false -position = Vector2( 0, -7 ) -shape = SubResource( 2 ) - [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/Idle = SubResource( 3 ) anims/Jumping = SubResource( 4 ) @@ -118,5 +109,8 @@ position = Vector2( 0, -7 ) [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hitbox"] visible = false -polygon = PoolVector2Array( -6, -12, -6, -5, -7, -5, -7, -3, -6, -3, -6, 2, -5, 2, -5, 4, -6, 4, -6, 5, -7, 5, -7, 7, 5, 7, 5, 3, 6, 3, 6, -1, 5, -1, 5, -2, 6, -2, 6, -3, 7, -3, 7, -5, 6, -5, 6, -6, 5, -6, 5, -7, 4, -7, 4, -8, 3, -8, 3, -9, 1, -9, 1, -10, -3, -10, -3, -11, -4, -11, -4, -12, -6, -12 ) +polygon = PoolVector2Array( -6, -12, -6, -5, -7, -5, -7, -3, -6, -3, -6, -0.52261, -6, 2, -5, 2, -5, 4, -6, 4, -6, 5, -7, 5, -7, 7, -3.9179, 7, 0.0151539, 7, 5, 7, 5, 5.0024, 5, 3, 6, 3, 6, 0.882053, 6, -1, 5, -1, 5, -2, 6, -2, 6, -3, 7, -3, 7, -5, 6, -5, 6, -6, 5, -6, 5, -7, 4, -7, 4, -8, 3, -8, 3, -9, 1, -9, 1, -10, -3, -10, -3, -11, -4, -11, -4, -12, -6, -12 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PoolVector2Array( 5, 0, 5, -4, 6, -4, 6, -8, 5, -8, 5, -9, 6, -9, 6, -10, 7, -10, 7, -12, 6, -12, 6, -13, 5, -13, 5, -14, 4, -14, 4, -15, 3, -15, 3, -16, 1, -16, 1, -17, -3, -17, -3, -18, -4, -18, -4, -19, -6, -19, -6, -12, -7, -12, -7, -10, -6, -10, -6, -5, -5, -5, -5, -3, -6, -3, -6, -2, -7, -2, -7, 0 ) [connection signal="grounded_updated" from="." to="Camera" method="_on_grounded_updated"] diff --git a/levels/World.tscn b/levels/World.tscn index b5cc196..8c97f63 100644 --- a/levels/World.tscn +++ b/levels/World.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://meta/DungeonTilemap.tscn" type="PackedScene" id=1] [ext_resource path="res://characters/Player.tscn" type="PackedScene" id=2] @@ -6,6 +6,8 @@ [ext_resource path="res://Music and Fonts(Misc.)/Hawaii Partii - Stranded Lullaby(8-Bit).wav" type="AudioStream" id=4] [ext_resource path="res://script/typewriter.gd" type="Script" id=5] [ext_resource path="res://Music and Fonts(Misc.)/Keb3q1.png" type="Texture" id=6] +[ext_resource path="res://art/Pedestal.png" type="Texture" id=7] +[ext_resource path="res://ai/Skeleton Enemy.tscn" type="PackedScene" id=8] [sub_resource type="DynamicFont" id=1] font_data = ExtResource( 3 ) @@ -26,7 +28,7 @@ tracks/0/keys = { "values": [ 0.0, 1.0 ] } -[sub_resource type="Animation" id=9] +[sub_resource type="Animation" id=3] resource_name = "Type Writer" length = 2.0 tracks/0/type = "value" @@ -42,7 +44,7 @@ tracks/0/keys = { "values": [ 0.0, 1.0 ] } -[sub_resource type="Animation" id=10] +[sub_resource type="Animation" id=4] resource_name = "Type Writer" length = 2.0 tracks/0/type = "value" @@ -58,7 +60,7 @@ tracks/0/keys = { "values": [ 0.0, 1.0 ] } -[sub_resource type="Animation" id=8] +[sub_resource type="Animation" id=5] resource_name = "Ok" tracks/0/type = "value" tracks/0/path = NodePath("sample_text:percent_visible") @@ -73,8 +75,7 @@ tracks/0/keys = { "values": [ 0.0, 0.0 ] } -[sub_resource type="Animation" id=3] -resource_name = "Type Writer" +[sub_resource type="Animation" id=6] length = 2.0 tracks/0/type = "value" tracks/0/path = NodePath("sample_text:percent_visible") @@ -105,7 +106,7 @@ tracks/0/keys = { "values": [ 0.0, 1.0 ] } -[sub_resource type="RectangleShape2D" id=6] +[sub_resource type="RectangleShape2D" id=8] extents = Vector2( 169.977, 24.8286 ) [node name="World" type="Node2D"] @@ -145,7 +146,7 @@ __meta__ = { [node name="AnimationPlayer" type="AnimationPlayer" parent="Text4"] autoplay = "Type Writer" -"anims/Type Writer" = SubResource( 9 ) +"anims/Type Writer" = SubResource( 3 ) [node name="Text5" type="Node" parent="."] @@ -163,7 +164,7 @@ __meta__ = { [node name="AnimationPlayer" type="AnimationPlayer" parent="Text5"] autoplay = "Type Writer" -"anims/Type Writer" = SubResource( 10 ) +"anims/Type Writer" = SubResource( 4 ) [node name="Text2" type="Node" parent="."] script = ExtResource( 5 ) @@ -186,8 +187,8 @@ __meta__ = { [node name="AnimationPlayer" type="AnimationPlayer" parent="Text2"] autoplay = "Ok" -anims/Ok = SubResource( 8 ) -"anims/Type Writer" = SubResource( 3 ) +anims/Ok = SubResource( 5 ) +"anims/Type Writer" = SubResource( 6 ) [node name="Text3" type="Node" parent="."] @@ -210,7 +211,7 @@ autoplay = "Type Writer" [node name="TileMap" parent="." instance=ExtResource( 1 )] position = Vector2( -5.81107, -6.20908 ) -tile_data = PoolIntArray( 0, 0, 8, 1, 0, 10, 2, 0, 10, 3, 0, 10, 4, 0, 10, 5, 0, 10, 6, 0, 10, 7, 0, 10, 8, 0, 10, 9, 0, 10, 10, 0, 10, 11, 0, 10, 12, 0, 10, 13, 0, 10, 14, 0, 10, 15, 0, 10, 16, 0, 10, 17, 0, 10, 18, 0, 10, 19, 0, 10, 20, 0, 10, 21, 0, 10, 22, 0, 10, 23, 0, 10, 24, 0, 10, 25, 0, 10, 26, 0, 10, 27, 0, 10, 28, 0, 10, 29, 0, 10, 30, 0, 10, 31, 0, 10, 32, 0, 10, 33, 0, 10, 34, 0, 10, 35, 0, 10, 36, 0, 10, 37, 0, 10, 38, 0, 10, 39, 0, 10, 40, 0, 10, 41, 0, 10, 42, 0, 10, 43, 0, 10, 44, 0, 10, 45, 0, 10, 46, 0, 10, 47, 0, 10, 48, 0, 10, 49, 0, 10, 50, 0, 10, 51, 0, 10, 52, 0, 10, 53, 0, 10, 54, 0, 10, 55, 0, 10, 56, 0, 10, 57, 0, 10, 58, 0, 10, 59, 0, 10, 60, 0, 10, 61, 0, 10, 62, 0, 10, 63, 0, 10, 64, 0, 10, 65, 0, 10, 66, 0, 10, 67, 0, 10, 68, 0, 10, 69, 0, 10, 70, 0, 10, 71, 0, 10, 72, 0, 11, 65536, 0, 65544, 65537, 0, 131078, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 131077, 65556, 0, 131081, 65557, 0, 131081, 65558, 0, 131081, 65559, 0, 131081, 65560, 0, 131081, 65561, 0, 131081, 65562, 0, 131081, 65563, 0, 131081, 65564, 0, 131081, 65565, 0, 131081, 65566, 0, 131081, 65567, 0, 131081, 65568, 0, 131081, 65569, 0, 131081, 65570, 0, 131081, 65571, 0, 131081, 65572, 0, 131081, 65573, 0, 131081, 65574, 0, 131081, 65575, 0, 131081, 65576, 0, 131081, 65577, 0, 131081, 65578, 0, 131081, 65579, 0, 131081, 65580, 0, 131081, 65581, 0, 131078, 65582, 0, 196617, 65583, 0, 196617, 65584, 0, 196617, 65585, 0, 196617, 65586, 0, 196617, 65587, 0, 196617, 65588, 0, 196617, 65589, 0, 196617, 65590, 0, 196617, 65591, 0, 196617, 65592, 0, 196617, 65593, 0, 196617, 65594, 0, 196617, 65595, 0, 196617, 65596, 0, 196617, 65597, 0, 196617, 65598, 0, 196617, 65599, 0, 196617, 65600, 0, 196617, 65601, 0, 196617, 65602, 0, 196617, 65603, 0, 196617, 65604, 0, 196617, 65605, 0, 196617, 65606, 0, 196617, 65607, 0, 196617, 65608, 0, 196619, 131072, 0, 65544, 131073, 0, 131083, 131091, 0, 65544, 131092, 0, 131081, 131093, 0, 131081, 131094, 0, 131081, 131095, 0, 131081, 131096, 0, 131081, 131097, 0, 131081, 131098, 0, 131081, 131099, 0, 131081, 131100, 0, 131081, 131101, 0, 131081, 131102, 0, 131081, 131103, 0, 131081, 131104, 0, 131081, 131105, 0, 131081, 131106, 0, 131081, 131107, 0, 131081, 131108, 0, 131081, 131109, 0, 131081, 131110, 0, 131081, 131111, 0, 131081, 131112, 0, 131081, 131113, 0, 131081, 131114, 0, 131081, 131115, 0, 131081, 131116, 0, 131081, 131117, 0, 131083, 196608, 0, 65544, 196609, 0, 131083, 196627, 0, 65544, 196628, 0, 131081, 196629, 0, 131081, 196630, 0, 131081, 196631, 0, 131081, 196632, 0, 131081, 196633, 0, 131081, 196634, 0, 131081, 196635, 0, 131081, 196636, 0, 131081, 196637, 0, 131081, 196638, 0, 131081, 196639, 0, 131081, 196640, 0, 131081, 196641, 0, 131081, 196642, 0, 131081, 196643, 0, 131081, 196644, 0, 131081, 196645, 0, 131081, 196646, 0, 131081, 196647, 0, 131081, 196648, 0, 131081, 196649, 0, 131081, 196650, 0, 131081, 196651, 0, 131081, 196652, 0, 131081, 196653, 0, 131083, 262144, 0, 65544, 262145, 0, 131083, 262163, 0, 65544, 262164, 0, 131081, 262165, 0, 131081, 262166, 0, 131081, 262167, 0, 131081, 262168, 0, 131081, 262169, 0, 131081, 262170, 0, 131081, 262171, 0, 131081, 262172, 0, 131081, 262173, 0, 131081, 262174, 0, 131081, 262175, 0, 131081, 262176, 0, 131081, 262177, 0, 131081, 262178, 0, 131081, 262179, 0, 131081, 262180, 0, 131081, 262181, 0, 131081, 262182, 0, 131081, 262183, 0, 131081, 262184, 0, 131081, 262185, 0, 131081, 262186, 0, 131081, 262187, 0, 131081, 262188, 0, 131081, 262189, 0, 131083, 327680, 0, 65544, 327681, 0, 131083, 327699, 0, 65544, 327700, 0, 131081, 327701, 0, 131081, 327702, 0, 131081, 327703, 0, 131081, 327704, 0, 131081, 327705, 0, 131081, 327706, 0, 131081, 327707, 0, 131081, 327708, 0, 131081, 327709, 0, 131081, 327710, 0, 131081, 327711, 0, 131081, 327712, 0, 131081, 327713, 0, 131081, 327714, 0, 131081, 327715, 0, 131081, 327716, 0, 131081, 327717, 0, 131081, 327718, 0, 131081, 327719, 0, 131081, 327720, 0, 131081, 327721, 0, 131081, 327722, 0, 131081, 327723, 0, 131081, 327724, 0, 131081, 327725, 0, 131083, 393216, 0, 65544, 393217, 0, 131083, 393235, 0, 196616, 393236, 0, 196617, 393237, 0, 196617, 393238, 0, 196617, 393239, 0, 196617, 393240, 0, 196617, 393241, 0, 196617, 393242, 0, 196617, 393243, 0, 196617, 393244, 0, 196617, 393245, 0, 196617, 393246, 0, 196617, 393247, 0, 196617, 393248, 0, 196617, 393249, 0, 196617, 393250, 0, 196617, 393251, 0, 196617, 393252, 0, 196617, 393253, 0, 196617, 393254, 0, 196617, 393255, 0, 196617, 393256, 0, 196617, 393257, 0, 196617, 393258, 0, 196617, 393259, 0, 196617, 393260, 0, 196617, 393261, 0, 196619, 524286, 0, 8, 524287, 0, 6, 458752, 0, 196613, 458753, 0, 196619, 589822, 0, 65544, 589823, 0, 131083, 655358, 0, 65544, 655359, 0, 131083, 720894, 0, 196616, 720895, 0, 196614, 655360, 0, 5, 655361, 0, 10, 655362, 0, 10, 655363, 0, 10, 655364, 0, 10, 655365, 0, 10, 655366, 0, 10, 655367, 0, 10, 655368, 0, 10, 655369, 0, 10, 655370, 0, 10, 655371, 0, 10, 655372, 0, 10, 655373, 0, 10, 655374, 0, 10, 655375, 0, 10, 655376, 0, 10, 655377, 0, 10, 655378, 0, 10, 655379, 0, 10, 655380, 0, 10, 655381, 0, 10, 655382, 0, 10, 655383, 0, 10, 655384, 0, 10, 655385, 0, 10, 655386, 0, 10, 655387, 0, 10, 655388, 0, 10, 655389, 0, 10, 655390, 0, 10, 655391, 0, 10, 655392, 0, 10, 655393, 0, 10, 655394, 0, 10, 655395, 0, 10, 655396, 0, 10, 655397, 0, 10, 655398, 0, 10, 655399, 0, 10, 655400, 0, 10, 655401, 0, 10, 655402, 0, 10, 655403, 0, 10, 655404, 0, 10, 655405, 0, 10, 655406, 0, 10, 655407, 0, 10, 655408, 0, 10, 655409, 0, 10, 655410, 0, 10, 655411, 0, 10, 655412, 0, 10, 655413, 0, 10, 655414, 0, 10, 655415, 0, 10, 655416, 0, 10, 655417, 0, 10, 655418, 0, 10, 655419, 0, 10, 655420, 0, 10, 655421, 0, 10, 655422, 0, 10, 655423, 0, 10, 655424, 0, 10, 655425, 0, 10, 655426, 0, 10, 655427, 0, 10, 655428, 0, 10, 655429, 0, 10, 655430, 0, 10, 655431, 0, 10, 655432, 0, 10, 655433, 0, 11, 720896, 0, 65544, 720897, 0, 131081, 720898, 0, 131081, 720899, 0, 131081, 720900, 0, 131081, 720901, 0, 131081, 720902, 0, 131081, 720903, 0, 131081, 720904, 0, 131081, 720905, 0, 131081, 720906, 0, 131081, 720907, 0, 131081, 720908, 0, 131081, 720909, 0, 131081, 720910, 0, 131081, 720911, 0, 131081, 720912, 0, 131081, 720913, 0, 131081, 720914, 0, 131081, 720915, 0, 131081, 720916, 0, 131081, 720917, 0, 131081, 720918, 0, 131081, 720919, 0, 131081, 720920, 0, 131081, 720921, 0, 131081, 720922, 0, 131081, 720923, 0, 131081, 720924, 0, 131081, 720925, 0, 131081, 720926, 0, 131081, 720927, 0, 131081, 720928, 0, 131081, 720929, 0, 131081, 720930, 0, 131081, 720931, 0, 131081, 720932, 0, 131081, 720933, 0, 131081, 720934, 0, 131081, 720935, 0, 131081, 720936, 0, 131081, 720937, 0, 131081, 720938, 0, 131081, 720939, 0, 131081, 720940, 0, 131081, 720941, 0, 131081, 720942, 0, 131081, 720943, 0, 131081, 720944, 0, 131081, 720945, 0, 131081, 720946, 0, 131081, 720947, 0, 131081, 720948, 0, 131081, 720949, 0, 131081, 720950, 0, 131081, 720951, 0, 131081, 720952, 0, 131081, 720953, 0, 131081, 720954, 0, 131081, 720955, 0, 131081, 720956, 0, 131081, 720957, 0, 131081, 720958, 0, 131081, 720959, 0, 131081, 720960, 0, 131081, 720961, 0, 131081, 720962, 0, 131081, 720963, 0, 131081, 720964, 0, 131081, 720965, 0, 131081, 720966, 0, 131081, 720967, 0, 131081, 720968, 0, 131081, 720969, 0, 131083, 786432, 0, 196616, 786433, 0, 196617, 786434, 0, 196617, 786435, 0, 196617, 786436, 0, 196617, 786437, 0, 196617, 786438, 0, 196617, 786439, 0, 196617, 786440, 0, 196617, 786441, 0, 196617, 786442, 0, 196617, 786443, 0, 196617, 786444, 0, 196617, 786445, 0, 196617, 786446, 0, 196617, 786447, 0, 196617, 786448, 0, 196617, 786449, 0, 196617, 786450, 0, 196617, 786451, 0, 196617, 786452, 0, 196617, 786453, 0, 196617, 786454, 0, 196617, 786455, 0, 196617, 786456, 0, 196617, 786457, 0, 196617, 786458, 0, 196617, 786459, 0, 196617, 786460, 0, 196617, 786461, 0, 196617, 786462, 0, 196617, 786463, 0, 196617, 786464, 0, 196617, 786465, 0, 196617, 786466, 0, 196617, 786467, 0, 196617, 786468, 0, 196617, 786469, 0, 196617, 786470, 0, 196617, 786471, 0, 196617, 786472, 0, 196617, 786473, 0, 196617, 786474, 0, 196617, 786475, 0, 196617, 786476, 0, 196617, 786477, 0, 196617, 786478, 0, 196617, 786479, 0, 196617, 786480, 0, 196617, 786481, 0, 196617, 786482, 0, 196617, 786483, 0, 196617, 786484, 0, 196617, 786485, 0, 196617, 786486, 0, 196617, 786487, 0, 196617, 786488, 0, 196617, 786489, 0, 196617, 786490, 0, 196617, 786491, 0, 196617, 786492, 0, 196617, 786493, 0, 196617, 786494, 0, 196617, 786495, 0, 196617, 786496, 0, 196617, 786497, 0, 196617, 786498, 0, 196617, 786499, 0, 196617, 786500, 0, 196617, 786501, 0, 196617, 786502, 0, 196617, 786503, 0, 196617, 786504, 0, 196617, 786505, 0, 196619 ) +tile_data = PoolIntArray( 65524, 0, 8, 65525, 0, 10, 65526, 0, 10, 65527, 0, 10, 65528, 0, 10, 65529, 0, 10, 65530, 0, 10, 65531, 0, 10, 65532, 0, 10, 65533, 0, 10, 65534, 0, 10, 65535, 0, 10, 0, 0, 10, 1, 0, 10, 2, 0, 10, 3, 0, 10, 4, 0, 10, 5, 0, 10, 6, 0, 10, 7, 0, 10, 8, 0, 10, 9, 0, 10, 10, 0, 10, 11, 0, 10, 12, 0, 10, 13, 0, 10, 14, 0, 10, 15, 0, 10, 16, 0, 10, 17, 0, 10, 18, 0, 10, 19, 0, 10, 20, 0, 10, 21, 0, 10, 22, 0, 10, 23, 0, 10, 24, 0, 10, 25, 0, 10, 26, 0, 10, 27, 0, 10, 28, 0, 10, 29, 0, 10, 30, 0, 10, 31, 0, 10, 32, 0, 10, 33, 0, 10, 34, 0, 10, 35, 0, 10, 36, 0, 10, 37, 0, 10, 38, 0, 10, 39, 0, 10, 40, 0, 10, 41, 0, 10, 42, 0, 10, 43, 0, 10, 44, 0, 10, 45, 0, 10, 46, 0, 10, 47, 0, 10, 48, 0, 10, 49, 0, 10, 50, 0, 10, 51, 0, 10, 52, 0, 10, 53, 0, 10, 54, 0, 10, 55, 0, 10, 56, 0, 10, 57, 0, 10, 58, 0, 10, 59, 0, 10, 60, 0, 10, 61, 0, 10, 62, 0, 10, 63, 0, 10, 64, 0, 10, 65, 0, 10, 66, 0, 10, 67, 0, 10, 68, 0, 10, 69, 0, 10, 70, 0, 10, 71, 0, 10, 72, 0, 10, 73, 0, 10, 74, 0, 10, 75, 0, 10, 76, 0, 10, 77, 0, 10, 78, 0, 10, 79, 0, 10, 80, 0, 10, 81, 0, 10, 82, 0, 10, 83, 0, 10, 84, 0, 10, 85, 0, 10, 86, 0, 10, 87, 0, 10, 88, 0, 10, 89, 0, 10, 90, 0, 10, 91, 0, 10, 92, 0, 10, 93, 0, 10, 94, 0, 10, 95, 0, 10, 96, 0, 10, 97, 0, 10, 98, 0, 10, 99, 0, 10, 100, 0, 10, 101, 0, 10, 102, 0, 10, 103, 0, 10, 104, 0, 10, 105, 0, 10, 106, 0, 10, 107, 0, 10, 108, 0, 10, 109, 0, 10, 110, 0, 10, 111, 0, 10, 112, 0, 10, 113, 0, 10, 114, 0, 10, 115, 0, 10, 116, 0, 10, 117, 0, 10, 118, 0, 10, 119, 0, 10, 120, 0, 10, 121, 0, 10, 122, 0, 10, 123, 0, 10, 124, 0, 10, 125, 0, 10, 126, 0, 10, 127, 0, 10, 128, 0, 10, 129, 0, 10, 130, 0, 10, 131, 0, 10, 132, 0, 11, 131060, 0, 65544, 131061, 0, 131081, 131062, 0, 131081, 131063, 0, 131081, 131064, 0, 131081, 131065, 0, 131081, 131066, 0, 131081, 131067, 0, 131081, 131068, 0, 131081, 131069, 0, 131081, 131070, 0, 131081, 131071, 0, 131081, 65536, 0, 131081, 65537, 0, 131078, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 131077, 65556, 0, 131081, 65557, 0, 131081, 65558, 0, 131081, 65559, 0, 131081, 65560, 0, 131081, 65561, 0, 131081, 65562, 0, 131081, 65563, 0, 131081, 65564, 0, 131081, 65565, 0, 131081, 65566, 0, 131081, 65567, 0, 131081, 65568, 0, 131081, 65569, 0, 131081, 65570, 0, 131081, 65571, 0, 131081, 65572, 0, 131081, 65573, 0, 131081, 65574, 0, 131081, 65575, 0, 131081, 65576, 0, 131081, 65577, 0, 131081, 65578, 0, 131081, 65579, 0, 131081, 65580, 0, 131081, 65581, 0, 131078, 65582, 0, 196617, 65583, 0, 196617, 65584, 0, 196617, 65585, 0, 196617, 65586, 0, 196617, 65587, 0, 196617, 65588, 0, 196617, 65589, 0, 196617, 65590, 0, 196617, 65591, 0, 196617, 65592, 0, 196617, 65593, 0, 196617, 65594, 0, 196617, 65595, 0, 196617, 65596, 0, 196617, 65597, 0, 196617, 65598, 0, 196617, 65599, 0, 196617, 65600, 0, 196617, 65601, 0, 196617, 65602, 0, 196617, 65603, 0, 196617, 65604, 0, 196617, 65605, 0, 196617, 65606, 0, 196617, 65607, 0, 196617, 65608, 0, 196617, 65609, 0, 196617, 65610, 0, 196617, 65611, 0, 196617, 65612, 0, 196617, 65613, 0, 196617, 65614, 0, 196617, 65615, 0, 196617, 65616, 0, 196617, 65617, 0, 196617, 65618, 0, 196617, 65619, 0, 196617, 65620, 0, 196617, 65621, 0, 196617, 65622, 0, 196617, 65623, 0, 196617, 65624, 0, 196617, 65625, 0, 196617, 65626, 0, 196617, 65627, 0, 196617, 65628, 0, 196617, 65629, 0, 196617, 65630, 0, 196617, 65631, 0, 196617, 65632, 0, 196617, 65633, 0, 196617, 65634, 0, 196617, 65635, 0, 196617, 65636, 0, 196617, 65637, 0, 196617, 65638, 0, 196617, 65639, 0, 196617, 65640, 0, 196617, 65641, 0, 196617, 65642, 0, 196617, 65643, 0, 196617, 65644, 0, 196617, 65645, 0, 196617, 65646, 0, 196617, 65647, 0, 196617, 65648, 0, 196617, 65649, 0, 196617, 65650, 0, 196617, 65651, 0, 196617, 65652, 0, 196617, 65653, 0, 196617, 65654, 0, 196617, 65655, 0, 196617, 65656, 0, 196617, 65657, 0, 196617, 65658, 0, 196617, 65659, 0, 196617, 65660, 0, 196617, 65661, 0, 196617, 65662, 0, 196617, 65663, 0, 196617, 65664, 0, 196617, 65665, 0, 196617, 65666, 0, 196617, 65667, 0, 196617, 65668, 0, 196619, 196596, 0, 65544, 196597, 0, 131081, 196598, 0, 131081, 196599, 0, 131081, 196600, 0, 131081, 196601, 0, 131081, 196602, 0, 131081, 196603, 0, 131081, 196604, 0, 131081, 196605, 0, 131081, 196606, 0, 131081, 196607, 0, 131081, 131072, 0, 131081, 131073, 0, 131083, 131091, 0, 65544, 131092, 0, 131081, 131093, 0, 131081, 131094, 0, 131081, 131095, 0, 131081, 131096, 0, 131081, 131097, 0, 131081, 131098, 0, 131081, 131099, 0, 131081, 131100, 0, 131081, 131101, 0, 131081, 131102, 0, 131081, 131103, 0, 131081, 131104, 0, 131081, 131105, 0, 131081, 131106, 0, 131081, 131107, 0, 131081, 131108, 0, 131081, 131109, 0, 131081, 131110, 0, 131081, 131111, 0, 131081, 131112, 0, 131081, 131113, 0, 131081, 131114, 0, 131081, 131115, 0, 131081, 131116, 0, 131081, 131117, 0, 131083, 262132, 0, 65544, 262133, 0, 131081, 262134, 0, 131081, 262135, 0, 131081, 262136, 0, 131081, 262137, 0, 131081, 262138, 0, 131081, 262139, 0, 131081, 262140, 0, 131081, 262141, 0, 131081, 262142, 0, 131081, 262143, 0, 131081, 196608, 0, 131081, 196609, 0, 131083, 196627, 0, 65544, 196628, 0, 131081, 196629, 0, 131081, 196630, 0, 131081, 196631, 0, 131081, 196632, 0, 131081, 196633, 0, 131081, 196634, 0, 131081, 196635, 0, 131081, 196636, 0, 131081, 196637, 0, 131081, 196638, 0, 131081, 196639, 0, 131081, 196640, 0, 131081, 196641, 0, 131081, 196642, 0, 131081, 196643, 0, 131081, 196644, 0, 131081, 196645, 0, 131081, 196646, 0, 131081, 196647, 0, 131081, 196648, 0, 131081, 196649, 0, 131081, 196650, 0, 131081, 196651, 0, 131081, 196652, 0, 131081, 196653, 0, 131083, 327668, 0, 65544, 327669, 0, 131081, 327670, 0, 131081, 327671, 0, 131081, 327672, 0, 131081, 327673, 0, 131081, 327674, 0, 131081, 327675, 0, 131081, 327676, 0, 131081, 327677, 0, 131081, 327678, 0, 131081, 327679, 0, 131081, 262144, 0, 131081, 262145, 0, 131083, 262163, 0, 65544, 262164, 0, 131081, 262165, 0, 131081, 262166, 0, 131081, 262167, 0, 131081, 262168, 0, 131081, 262169, 0, 131081, 262170, 0, 131081, 262171, 0, 131081, 262172, 0, 131081, 262173, 0, 131081, 262174, 0, 131081, 262175, 0, 131081, 262176, 0, 131081, 262177, 0, 131081, 262178, 0, 131081, 262179, 0, 131081, 262180, 0, 131081, 262181, 0, 131081, 262182, 0, 131081, 262183, 0, 131081, 262184, 0, 131081, 262185, 0, 131081, 262186, 0, 131081, 262187, 0, 131081, 262188, 0, 131081, 262189, 0, 131083, 393204, 0, 65544, 393205, 0, 131081, 393206, 0, 131081, 393207, 0, 131081, 393208, 0, 131081, 393209, 0, 131081, 393210, 0, 131081, 393211, 0, 131081, 393212, 0, 131081, 393213, 0, 131081, 393214, 0, 131081, 393215, 0, 131081, 327680, 0, 131081, 327681, 0, 131083, 327699, 0, 65544, 327700, 0, 131081, 327701, 0, 131081, 327702, 0, 131081, 327703, 0, 131081, 327704, 0, 131081, 327705, 0, 131081, 327706, 0, 131081, 327707, 0, 131081, 327708, 0, 131081, 327709, 0, 131081, 327710, 0, 131081, 327711, 0, 131081, 327712, 0, 131081, 327713, 0, 131081, 327714, 0, 131081, 327715, 0, 131081, 327716, 0, 131081, 327717, 0, 131081, 327718, 0, 131081, 327719, 0, 131081, 327720, 0, 131081, 327721, 0, 131081, 327722, 0, 131081, 327723, 0, 131081, 327724, 0, 131081, 327725, 0, 131083, 458740, 0, 65544, 458741, 0, 131081, 458742, 0, 131081, 458743, 0, 131081, 458744, 0, 131081, 458745, 0, 131081, 458746, 0, 131081, 458747, 0, 131081, 458748, 0, 131081, 458749, 0, 131081, 458750, 0, 131081, 458751, 0, 131081, 393216, 0, 131081, 393217, 0, 131083, 393235, 0, 196616, 393236, 0, 196617, 393237, 0, 196617, 393238, 0, 196617, 393239, 0, 196617, 393240, 0, 196617, 393241, 0, 196617, 393242, 0, 196617, 393243, 0, 196617, 393244, 0, 196617, 393245, 0, 196617, 393246, 0, 196617, 393247, 0, 196617, 393248, 0, 196617, 393249, 0, 196617, 393250, 0, 196617, 393251, 0, 196617, 393252, 0, 196617, 393253, 0, 196617, 393254, 0, 196617, 393255, 0, 196617, 393256, 0, 196617, 393257, 0, 196617, 393258, 0, 196617, 393259, 0, 196617, 393260, 0, 196617, 393261, 0, 196619, 393292, 0, 8, 393293, 0, 10, 393294, 0, 10, 393295, 0, 10, 393296, 0, 10, 393297, 0, 10, 393298, 0, 10, 393299, 0, 10, 393300, 0, 10, 393301, 0, 10, 393302, 0, 10, 393303, 0, 10, 393304, 0, 10, 393305, 0, 10, 393306, 0, 10, 393307, 0, 10, 393308, 0, 10, 393309, 0, 10, 393310, 0, 10, 393311, 0, 10, 393312, 0, 10, 393313, 0, 10, 393314, 0, 10, 393315, 0, 10, 393316, 0, 10, 393317, 0, 10, 393318, 0, 10, 393319, 0, 10, 393320, 0, 10, 393321, 0, 10, 393322, 0, 10, 393323, 0, 10, 393324, 0, 10, 393325, 0, 10, 393326, 0, 10, 393327, 0, 10, 393328, 0, 10, 393329, 0, 10, 393330, 0, 10, 393331, 0, 10, 393332, 0, 10, 393333, 0, 10, 393334, 0, 10, 393335, 0, 10, 393336, 0, 10, 393337, 0, 10, 393338, 0, 10, 393339, 0, 10, 393340, 0, 10, 393341, 0, 10, 393342, 0, 10, 393343, 0, 10, 393344, 0, 10, 393345, 0, 10, 393346, 0, 10, 393347, 0, 10, 393348, 0, 11, 524276, 0, 65544, 524277, 0, 131081, 524278, 0, 131081, 524279, 0, 131081, 524280, 0, 131081, 524281, 0, 131081, 524282, 0, 131081, 524283, 0, 131081, 524284, 0, 131078, 524285, 0, 196617, 524286, 0, 196617, 524287, 0, 196617, 458752, 0, 196617, 458753, 0, 196619, 458827, 0, 8, 458828, 0, 65541, 458829, 0, 131081, 458830, 0, 131081, 458831, 0, 131081, 458832, 0, 131081, 458833, 0, 131081, 458834, 0, 131081, 458835, 0, 131081, 458836, 0, 131081, 458837, 0, 131081, 458838, 0, 131081, 458839, 0, 131081, 458840, 0, 131081, 458841, 0, 131081, 458842, 0, 131081, 458843, 0, 131081, 458844, 0, 131081, 458845, 0, 131081, 458846, 0, 131081, 458847, 0, 131081, 458848, 0, 131081, 458849, 0, 131081, 458850, 0, 131081, 458851, 0, 131081, 458852, 0, 131081, 458853, 0, 131081, 458854, 0, 131081, 458855, 0, 131081, 458856, 0, 131081, 458857, 0, 131081, 458858, 0, 131081, 458859, 0, 131081, 458860, 0, 131081, 458861, 0, 131081, 458862, 0, 131081, 458863, 0, 131081, 458864, 0, 131081, 458865, 0, 131081, 458866, 0, 131081, 458867, 0, 131081, 458868, 0, 131081, 458869, 0, 131081, 458870, 0, 131081, 458871, 0, 131081, 458872, 0, 131081, 458873, 0, 131081, 458874, 0, 131081, 458875, 0, 131081, 458876, 0, 131081, 458877, 0, 131081, 458878, 0, 131081, 458879, 0, 131081, 458880, 0, 131081, 458881, 0, 131081, 458882, 0, 131081, 458883, 0, 131081, 458884, 0, 131083, 589812, 0, 65544, 589813, 0, 131081, 589814, 0, 131081, 589815, 0, 131081, 589816, 0, 131081, 589817, 0, 131081, 589818, 0, 131081, 589819, 0, 131081, 589820, 0, 131083, 524293, 0, 0, 524318, 0, 0, 524362, 0, 8, 524363, 0, 65541, 524364, 0, 131081, 524365, 0, 131081, 524366, 0, 131081, 524367, 0, 131081, 524368, 0, 131081, 524369, 0, 131081, 524370, 0, 131081, 524371, 0, 131081, 524372, 0, 131081, 524373, 0, 131081, 524374, 0, 131081, 524375, 0, 131081, 524376, 0, 131081, 524377, 0, 131081, 524378, 0, 131081, 524379, 0, 131081, 524380, 0, 131081, 524381, 0, 131081, 524382, 0, 131081, 524383, 0, 131081, 524384, 0, 131081, 524385, 0, 131081, 524386, 0, 131081, 524387, 0, 131081, 524388, 0, 131081, 524389, 0, 131081, 524390, 0, 131081, 524391, 0, 131081, 524392, 0, 131081, 524393, 0, 131081, 524394, 0, 131081, 524395, 0, 131081, 524396, 0, 131081, 524397, 0, 131081, 524398, 0, 131081, 524399, 0, 131081, 524400, 0, 131081, 524401, 0, 131081, 524402, 0, 131081, 524403, 0, 131081, 524404, 0, 131081, 524405, 0, 131081, 524406, 0, 131081, 524407, 0, 131081, 524408, 0, 131081, 524409, 0, 131081, 524410, 0, 131081, 524411, 0, 131081, 524412, 0, 131081, 524413, 0, 131081, 524414, 0, 131081, 524415, 0, 131081, 524416, 0, 131081, 524417, 0, 131081, 524418, 0, 131081, 524419, 0, 131081, 524420, 0, 131083, 655348, 0, 65544, 655349, 0, 131081, 655350, 0, 131081, 655351, 0, 131081, 655352, 0, 131081, 655353, 0, 131081, 655354, 0, 131081, 655355, 0, 131081, 655356, 0, 131083, 589828, 0, 8, 589829, 0, 9, 589830, 0, 11, 589853, 0, 8, 589854, 0, 9, 589855, 0, 11, 589898, 0, 65544, 589899, 0, 131081, 589900, 0, 131081, 589901, 0, 131081, 589902, 0, 131081, 589903, 0, 131081, 589904, 0, 131081, 589905, 0, 131081, 589906, 0, 131081, 589907, 0, 131081, 589908, 0, 131081, 589909, 0, 131081, 589910, 0, 131081, 589911, 0, 131081, 589912, 0, 131081, 589913, 0, 131081, 589914, 0, 131081, 589915, 0, 131081, 589916, 0, 131081, 589917, 0, 131081, 589918, 0, 131081, 589919, 0, 131081, 589920, 0, 131081, 589921, 0, 131081, 589922, 0, 131081, 589923, 0, 131081, 589924, 0, 131081, 589925, 0, 131081, 589926, 0, 131081, 589927, 0, 131081, 589928, 0, 131081, 589929, 0, 131081, 589930, 0, 131081, 589931, 0, 131081, 589932, 0, 131081, 589933, 0, 131081, 589934, 0, 131081, 589935, 0, 131081, 589936, 0, 131081, 589937, 0, 131081, 589938, 0, 131081, 589939, 0, 131081, 589940, 0, 131081, 589941, 0, 131081, 589942, 0, 131081, 589943, 0, 131081, 589944, 0, 131081, 589945, 0, 131081, 589946, 0, 131081, 589947, 0, 131081, 589948, 0, 131081, 589949, 0, 131081, 589950, 0, 131081, 589951, 0, 131081, 589952, 0, 131081, 589953, 0, 131081, 589954, 0, 131081, 589955, 0, 131081, 589956, 0, 131083, 720884, 0, 65544, 720885, 0, 131081, 720886, 0, 131081, 720887, 0, 131081, 720888, 0, 131081, 720889, 0, 131081, 720890, 0, 131081, 720891, 0, 131081, 720892, 0, 65542, 720893, 0, 10, 720894, 0, 10, 720895, 0, 10, 655360, 0, 10, 655361, 0, 10, 655362, 0, 10, 655363, 0, 10, 655364, 0, 65541, 655365, 0, 131081, 655366, 0, 65542, 655367, 0, 10, 655368, 0, 10, 655369, 0, 10, 655370, 0, 10, 655371, 0, 10, 655372, 0, 10, 655373, 0, 10, 655374, 0, 10, 655375, 0, 10, 655376, 0, 10, 655377, 0, 10, 655378, 0, 10, 655379, 0, 10, 655380, 0, 10, 655381, 0, 10, 655382, 0, 10, 655383, 0, 10, 655384, 0, 10, 655385, 0, 10, 655386, 0, 10, 655387, 0, 10, 655388, 0, 10, 655389, 0, 65541, 655390, 0, 131081, 655391, 0, 65542, 655392, 0, 10, 655393, 0, 10, 655394, 0, 10, 655395, 0, 10, 655396, 0, 10, 655397, 0, 10, 655398, 0, 10, 655399, 0, 10, 655400, 0, 10, 655401, 0, 10, 655402, 0, 10, 655403, 0, 10, 655404, 0, 10, 655405, 0, 10, 655406, 0, 10, 655407, 0, 10, 655408, 0, 10, 655409, 0, 10, 655410, 0, 10, 655411, 0, 10, 655412, 0, 10, 655413, 0, 10, 655414, 0, 10, 655415, 0, 10, 655416, 0, 10, 655417, 0, 10, 655418, 0, 10, 655419, 0, 10, 655420, 0, 10, 655421, 0, 10, 655422, 0, 10, 655423, 0, 10, 655424, 0, 10, 655425, 0, 10, 655426, 0, 10, 655427, 0, 10, 655428, 0, 10, 655429, 0, 10, 655430, 0, 10, 655431, 0, 10, 655432, 0, 10, 655433, 0, 10, 655434, 0, 65541, 655435, 0, 131081, 655436, 0, 131081, 655437, 0, 131081, 655438, 0, 131081, 655439, 0, 131081, 655440, 0, 131081, 655441, 0, 131081, 655442, 0, 131081, 655443, 0, 131081, 655444, 0, 131081, 655445, 0, 131081, 655446, 0, 131081, 655447, 0, 131081, 655448, 0, 131081, 655449, 0, 131081, 655450, 0, 131081, 655451, 0, 131081, 655452, 0, 131081, 655453, 0, 131081, 655454, 0, 131081, 655455, 0, 131081, 655456, 0, 131081, 655457, 0, 131081, 655458, 0, 131081, 655459, 0, 131081, 655460, 0, 131081, 655461, 0, 131081, 655462, 0, 131081, 655463, 0, 131081, 655464, 0, 131081, 655465, 0, 131081, 655466, 0, 131081, 655467, 0, 131081, 655468, 0, 131081, 655469, 0, 131081, 655470, 0, 131081, 655471, 0, 131081, 655472, 0, 131081, 655473, 0, 131081, 655474, 0, 131081, 655475, 0, 131081, 655476, 0, 131081, 655477, 0, 131081, 655478, 0, 131081, 655479, 0, 131081, 655480, 0, 131081, 655481, 0, 131081, 655482, 0, 131081, 655483, 0, 131081, 655484, 0, 131081, 655485, 0, 131081, 655486, 0, 131081, 655487, 0, 131081, 655488, 0, 131081, 655489, 0, 131081, 655490, 0, 131081, 655491, 0, 131081, 655492, 0, 131083, 786420, 0, 65544, 786421, 0, 131081, 786422, 0, 131081, 786423, 0, 131081, 786424, 0, 131081, 786425, 0, 131081, 786426, 0, 131081, 786427, 0, 131081, 786428, 0, 131081, 786429, 0, 131081, 786430, 0, 131081, 786431, 0, 131081, 720896, 0, 131081, 720897, 0, 131081, 720898, 0, 131081, 720899, 0, 131081, 720900, 0, 131081, 720901, 0, 131081, 720902, 0, 131081, 720903, 0, 131081, 720904, 0, 131081, 720905, 0, 131081, 720906, 0, 131081, 720907, 0, 131081, 720908, 0, 131081, 720909, 0, 131081, 720910, 0, 131081, 720911, 0, 131081, 720912, 0, 131081, 720913, 0, 131081, 720914, 0, 131081, 720915, 0, 131081, 720916, 0, 131081, 720917, 0, 131081, 720918, 0, 131081, 720919, 0, 131081, 720920, 0, 131081, 720921, 0, 131081, 720922, 0, 131081, 720923, 0, 131081, 720924, 0, 131081, 720925, 0, 131081, 720926, 0, 131081, 720927, 0, 131081, 720928, 0, 131081, 720929, 0, 131081, 720930, 0, 131081, 720931, 0, 131081, 720932, 0, 131081, 720933, 0, 131081, 720934, 0, 131081, 720935, 0, 131081, 720936, 0, 131081, 720937, 0, 131081, 720938, 0, 131081, 720939, 0, 131081, 720940, 0, 131081, 720941, 0, 131081, 720942, 0, 131081, 720943, 0, 131081, 720944, 0, 131081, 720945, 0, 131081, 720946, 0, 131081, 720947, 0, 131081, 720948, 0, 131081, 720949, 0, 131081, 720950, 0, 131081, 720951, 0, 131081, 720952, 0, 131081, 720953, 0, 131081, 720954, 0, 131081, 720955, 0, 131081, 720956, 0, 131081, 720957, 0, 131081, 720958, 0, 131081, 720959, 0, 131081, 720960, 0, 131081, 720961, 0, 131081, 720962, 0, 131081, 720963, 0, 131081, 720964, 0, 131081, 720965, 0, 131081, 720966, 0, 131081, 720967, 0, 131081, 720968, 0, 131081, 720969, 0, 131081, 720970, 0, 131081, 720971, 0, 131081, 720972, 0, 131081, 720973, 0, 131081, 720974, 0, 131081, 720975, 0, 131081, 720976, 0, 131081, 720977, 0, 131081, 720978, 0, 131081, 720979, 0, 131081, 720980, 0, 131081, 720981, 0, 131081, 720982, 0, 131081, 720983, 0, 131081, 720984, 0, 131081, 720985, 0, 131081, 720986, 0, 131081, 720987, 0, 131081, 720988, 0, 131081, 720989, 0, 131081, 720990, 0, 131081, 720991, 0, 131081, 720992, 0, 131081, 720993, 0, 131081, 720994, 0, 131081, 720995, 0, 131081, 720996, 0, 131081, 720997, 0, 131081, 720998, 0, 131081, 720999, 0, 131081, 721000, 0, 131081, 721001, 0, 131081, 721002, 0, 131081, 721003, 0, 131081, 721004, 0, 131081, 721005, 0, 131081, 721006, 0, 131081, 721007, 0, 131081, 721008, 0, 131081, 721009, 0, 131081, 721010, 0, 131081, 721011, 0, 131081, 721012, 0, 131081, 721013, 0, 131081, 721014, 0, 131081, 721015, 0, 131081, 721016, 0, 131081, 721017, 0, 131081, 721018, 0, 131081, 721019, 0, 131081, 721020, 0, 131081, 721021, 0, 131081, 721022, 0, 131081, 721023, 0, 131081, 721024, 0, 131081, 721025, 0, 131081, 721026, 0, 131081, 721027, 0, 131081, 721028, 0, 131083, 851956, 0, 196616, 851957, 0, 196617, 851958, 0, 196617, 851959, 0, 196617, 851960, 0, 196617, 851961, 0, 196617, 851962, 0, 196617, 851963, 0, 196617, 851964, 0, 196617, 851965, 0, 196617, 851966, 0, 196617, 851967, 0, 196617, 786432, 0, 196617, 786433, 0, 196617, 786434, 0, 196617, 786435, 0, 196617, 786436, 0, 196617, 786437, 0, 196617, 786438, 0, 196617, 786439, 0, 196617, 786440, 0, 196617, 786441, 0, 196617, 786442, 0, 196617, 786443, 0, 196617, 786444, 0, 196617, 786445, 0, 196617, 786446, 0, 196617, 786447, 0, 196617, 786448, 0, 196617, 786449, 0, 196617, 786450, 0, 196617, 786451, 0, 196617, 786452, 0, 196617, 786453, 0, 196617, 786454, 0, 196617, 786455, 0, 196617, 786456, 0, 196617, 786457, 0, 196617, 786458, 0, 196617, 786459, 0, 196617, 786460, 0, 196617, 786461, 0, 196617, 786462, 0, 196617, 786463, 0, 196617, 786464, 0, 196617, 786465, 0, 196617, 786466, 0, 196617, 786467, 0, 196617, 786468, 0, 196617, 786469, 0, 196617, 786470, 0, 196617, 786471, 0, 196617, 786472, 0, 196617, 786473, 0, 196617, 786474, 0, 196617, 786475, 0, 196617, 786476, 0, 196617, 786477, 0, 196617, 786478, 0, 196617, 786479, 0, 196617, 786480, 0, 196617, 786481, 0, 196617, 786482, 0, 196617, 786483, 0, 196617, 786484, 0, 196617, 786485, 0, 196617, 786486, 0, 196617, 786487, 0, 196617, 786488, 0, 196617, 786489, 0, 196617, 786490, 0, 196617, 786491, 0, 196617, 786492, 0, 196617, 786493, 0, 196617, 786494, 0, 196617, 786495, 0, 196617, 786496, 0, 196617, 786497, 0, 196617, 786498, 0, 196617, 786499, 0, 196617, 786500, 0, 196617, 786501, 0, 196617, 786502, 0, 196617, 786503, 0, 196617, 786504, 0, 196617, 786505, 0, 196617, 786506, 0, 196617, 786507, 0, 196617, 786508, 0, 196617, 786509, 0, 196617, 786510, 0, 196617, 786511, 0, 196617, 786512, 0, 196617, 786513, 0, 196617, 786514, 0, 196617, 786515, 0, 196617, 786516, 0, 196617, 786517, 0, 196617, 786518, 0, 196617, 786519, 0, 196617, 786520, 0, 196617, 786521, 0, 196617, 786522, 0, 196617, 786523, 0, 196617, 786524, 0, 196617, 786525, 0, 196617, 786526, 0, 196617, 786527, 0, 196617, 786528, 0, 196617, 786529, 0, 196617, 786530, 0, 196617, 786531, 0, 196617, 786532, 0, 196617, 786533, 0, 196617, 786534, 0, 196617, 786535, 0, 196617, 786536, 0, 196617, 786537, 0, 196617, 786538, 0, 196617, 786539, 0, 196617, 786540, 0, 196617, 786541, 0, 196617, 786542, 0, 196617, 786543, 0, 196617, 786544, 0, 196617, 786545, 0, 196617, 786546, 0, 196617, 786547, 0, 196617, 786548, 0, 196617, 786549, 0, 196617, 786550, 0, 196617, 786551, 0, 196617, 786552, 0, 196617, 786553, 0, 196617, 786554, 0, 196617, 786555, 0, 196617, 786556, 0, 196617, 786557, 0, 196617, 786558, 0, 196617, 786559, 0, 196617, 786560, 0, 196617, 786561, 0, 196617, 786562, 0, 196617, 786563, 0, 196617, 786564, 0, 196619 ) [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource( 4 ) @@ -218,7 +219,7 @@ volume_db = -21.204 autoplay = true [node name="Player" parent="." instance=ExtResource( 2 )] -position = Vector2( 39.6773, 71.1674 ) +position = Vector2( -38.2158, 143.114 ) [node name="Area2D" type="Area2D" parent="."] position = Vector2( 435.093, 129.644 ) @@ -227,13 +228,13 @@ __meta__ = { } [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -shape = SubResource( 6 ) +shape = SubResource( 8 ) [node name="ParallaxBackground" type="ParallaxBackground" parent="."] [node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] modulate = Color( 0.635294, 0.635294, 0.635294, 1 ) -motion_mirroring = Vector2( 500, 500 ) +motion_mirroring = Vector2( 490, 500 ) [node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"] modulate = Color( 0.419608, 0.411765, 0.411765, 1 ) @@ -242,4 +243,12 @@ scale = Vector2( 0.872628, 0.872628 ) texture = ExtResource( 6 ) centered = false offset = Vector2( -615.364, -675.27 ) + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 954.711, 145.551 ) +scale = Vector2( 1, 1.1044 ) +texture = ExtResource( 7 ) + +[node name="Skeleton Enemy" parent="." instance=ExtResource( 8 )] +position = Vector2( 371.515, 139.784 ) [connection signal="body_entered" from="Area2D" to="Text2" method="_on_body_entered"] diff --git a/magic/projectiles/WhiteProjectile.tscn b/magic/projectiles/WhiteProjectile.tscn index d15ce7b..5fbf33d 100644 --- a/magic/projectiles/WhiteProjectile.tscn +++ b/magic/projectiles/WhiteProjectile.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://script/Projectile.gd" type="Script" id=1] [ext_resource path="res://art/WhiteProjectile.png" type="Texture" id=2] @@ -6,6 +6,15 @@ [sub_resource type="CircleShape2D" id=1] radius = 4.0 +[sub_resource type="Environment" id=2] +background_mode = 4 +glow_enabled = true +glow_intensity = 0.25 +glow_bloom = 0.15 +glow_blend_mode = 0 +glow_hdr_threshold = 3.29 +glow_bicubic_upscale = true + [node name="WhiteProjectile" type="KinematicBody2D"] collision_layer = 8 collision_mask = 2 @@ -16,3 +25,6 @@ shape = SubResource( 1 ) [node name="WhiteProjectile" type="Sprite" parent="."] texture = ExtResource( 2 ) + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource( 2 ) diff --git a/project.godot b/project.godot index e240ad6..c1c47a2 100644 --- a/project.godot +++ b/project.godot @@ -116,19 +116,13 @@ shoot={ ] } -<<<<<<< HEAD -======= [layer_names] -2d_render/layer_1="Player" 2d_physics/layer_1="Player" -2d_render/layer_2="World" 2d_physics/layer_2="World" 2d_physics/layer_3="Enemy" 2d_physics/layer_4="Projectiles" ->>>>>>> master [rendering] -quality/driver/fallback_to_gles2=true environment/default_environment="res://default_env.tres" diff --git a/script/PlayerStateMachine.gd b/script/PlayerStateMachine.gd index 10a86c1..b6dddc0 100644 --- a/script/PlayerStateMachine.gd +++ b/script/PlayerStateMachine.gd @@ -67,4 +67,4 @@ func enter_state(new_state, old_state): func exit_state(old_state, new_state): - pass \ No newline at end of file + pass diff --git a/script/Skeleton Enemy.gd b/script/Skeleton Enemy.gd new file mode 100644 index 0000000..3f25b2b --- /dev/null +++ b/script/Skeleton Enemy.gd @@ -0,0 +1,20 @@ +extends KinematicBody2D + +var speed = 75 +var gravity = 500 +const UP = Vector2(0, -1) + +var velocity = Vector2() + +func apply_gravity(delta, modifier = 1): + velocity.y += gravity * delta * modifier + +func _physics_process(_delta): + if Globals.player != null: + velocity.x = position.direction_to(Globals.player).normalized().x + apply_gravity(_delta) + velocity = move_and_slide(velocity * speed) + + if is_on_wall(): + velocity.y = -50 + velocity = move_and_slide(velocity, UP) diff --git a/script/player.gd b/script/player.gd index b3b71b9..3111655 100644 --- a/script/player.gd +++ b/script/player.gd @@ -32,6 +32,9 @@ onready var Stats = $Stats onready var health = Stats.health setget set_health, get_health onready var energy = Stats.energy setget set_energy, get_energy +func get_type(): + return "player" + func set_health(value): Stats.set_health(value) @@ -56,7 +59,6 @@ func _physics_process(delta): Globals.player = position emit_signal("grounded_updated", is_on_floor()) - func handle_move_input(): input_direction = int(Input.is_action_pressed("right")) - int(Input.is_action_pressed("left")) velocity.x = lerp(velocity.x, speed * input_direction, get_movement_weight())