From 70de3a3e75c175f81b43f6639677f12fb0c7d45d Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 22 Jul 2020 13:12:24 -0500 Subject: [PATCH] Fart --- art/Black.png.import | 34 ++++++++++++++++++++++ art/Black.tres | 16 ++++++++++ levels/AnimationPlayer.gd | 4 +++ levels/Leap Of Faith.gd | 4 +++ levels/Level 1.tscn | 33 +++++++++++++++++++-- magic/Projectiles/ExplosiveProjectile.tscn | 4 +-- script/player.gd | 8 +++-- 7 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 art/Black.png.import create mode 100644 art/Black.tres create mode 100644 levels/AnimationPlayer.gd create mode 100644 levels/Leap Of Faith.gd diff --git a/art/Black.png.import b/art/Black.png.import new file mode 100644 index 0000000..c4f634f --- /dev/null +++ b/art/Black.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Black.png-2d3e71dec7891a7274b5efa77e1741b2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/Black.png" +dest_files=[ "res://.import/Black.png-2d3e71dec7891a7274b5efa77e1741b2.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/art/Black.tres b/art/Black.tres new file mode 100644 index 0000000..2da7db7 --- /dev/null +++ b/art/Black.tres @@ -0,0 +1,16 @@ +[gd_resource type="Animation" format=2] + +[resource] +resource_name = "Black Fade in" +tracks/0/type = "value" +tracks/0/path = NodePath("CanvasLayer/Sprite:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 1 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 1 ) ] +} diff --git a/levels/AnimationPlayer.gd b/levels/AnimationPlayer.gd new file mode 100644 index 0000000..b429a30 --- /dev/null +++ b/levels/AnimationPlayer.gd @@ -0,0 +1,4 @@ +extends AnimationPlayer + +func _on_Leap_body_entered(body): + play("Black") diff --git a/levels/Leap Of Faith.gd b/levels/Leap Of Faith.gd new file mode 100644 index 0000000..3d6f874 --- /dev/null +++ b/levels/Leap Of Faith.gd @@ -0,0 +1,4 @@ +extends Area2D + +func _ready(): + pass # Replace with function body. diff --git a/levels/Level 1.tscn b/levels/Level 1.tscn index 98c7740..c81aa4f 100644 --- a/levels/Level 1.tscn +++ b/levels/Level 1.tscn @@ -1,10 +1,17 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://meta/DungeonTilemap.tres" type="TileSet" id=1] [ext_resource path="res://art/Paralax Dungeon.png" type="Texture" id=2] [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=3] [ext_resource path="res://ai/Scenes/Demon.tscn" type="PackedScene" id=4] [ext_resource path="res://art/door.png" type="Texture" id=5] +[ext_resource path="res://art/Black.png" type="Texture" id=6] +[ext_resource path="res://levels/Leap Of Faith.gd" type="Script" id=7] +[ext_resource path="res://levels/AnimationPlayer.gd" type="Script" id=8] +[ext_resource path="res://art/Black.tres" type="Animation" id=9] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 85, 8 ) [node name="Level 1" type="Node"] @@ -19,7 +26,7 @@ hframes = 2 tile_set = ExtResource( 1 ) cell_size = Vector2( 16, 16 ) format = 1 -tile_data = PoolIntArray( 65535, 0, 8, 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, 11, 131071, 0, 65544, 65536, 0, 131078, 65537, 0, 196617, 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, 196617, 65556, 0, 196617, 65557, 0, 196617, 65558, 0, 196617, 65559, 0, 196617, 65560, 0, 196617, 65561, 0, 196617, 65562, 0, 196617, 65563, 0, 196617, 65564, 0, 196617, 65565, 0, 196617, 65566, 0, 196617, 65567, 0, 196617, 65568, 0, 196617, 65569, 0, 196617, 65570, 0, 196617, 65571, 0, 196617, 65572, 0, 196617, 65573, 0, 196617, 65574, 0, 196617, 65575, 0, 196617, 65576, 0, 196617, 65577, 0, 196617, 65578, 0, 196617, 65579, 0, 196617, 65580, 0, 196617, 65581, 0, 196617, 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, 196619, 196607, 0, 65544, 131072, 0, 131083, 262143, 0, 65544, 196608, 0, 131083, 327679, 0, 65544, 262144, 0, 131083, 393215, 0, 65544, 327680, 0, 131083, 458751, 0, 65544, 393216, 0, 131083, 393270, 0, 8, 393271, 0, 10, 393272, 0, 10, 393273, 0, 10, 393274, 0, 10, 393275, 0, 10, 393276, 0, 10, 393277, 0, 10, 393278, 0, 10, 393279, 0, 10, 393280, 0, 11, 524287, 0, 65544, 458752, 0, 131083, 458805, 0, 8, 458806, 0, 65541, 458807, 0, 131081, 458808, 0, 131081, 458809, 0, 131081, 458810, 0, 131081, 458811, 0, 131081, 458812, 0, 131081, 458813, 0, 131081, 458814, 0, 131081, 458815, 0, 131081, 458816, 0, 131083, 589823, 0, 65544, 524288, 0, 131083, 524308, 0, 196608, 524340, 0, 8, 524341, 0, 65541, 524342, 0, 131081, 524343, 0, 131081, 524344, 0, 131081, 524345, 0, 131081, 524346, 0, 131081, 524347, 0, 131081, 524348, 0, 131081, 524349, 0, 131081, 524350, 0, 131081, 524351, 0, 131081, 524352, 0, 131083, 655359, 0, 65544, 589824, 0, 131083, 589861, 0, 8, 589862, 0, 10, 589863, 0, 10, 589864, 0, 10, 589865, 0, 10, 589866, 0, 10, 589867, 0, 10, 589868, 0, 10, 589869, 0, 10, 589870, 0, 10, 589871, 0, 11, 589875, 0, 196609, 589876, 0, 196613, 589877, 0, 196617, 589878, 0, 196617, 589879, 0, 196617, 589880, 0, 196617, 589881, 0, 196617, 589882, 0, 196617, 589883, 0, 196617, 589884, 0, 196617, 589885, 0, 196617, 589886, 0, 196617, 589887, 0, 196617, 589888, 0, 196619, 720895, 0, 65544, 655360, 0, 131083, 655374, 0, 0, 655386, 0, 0, 655396, 0, 8, 655397, 0, 65541, 655398, 0, 131081, 655399, 0, 131081, 655400, 0, 131081, 655401, 0, 131081, 655402, 0, 131081, 655403, 0, 131081, 655404, 0, 131081, 655405, 0, 131081, 655406, 0, 131081, 655407, 0, 65542, 655408, 0, 11, 786431, 0, 65544, 720896, 0, 65542, 720897, 0, 10, 720898, 0, 10, 720899, 0, 10, 720900, 0, 10, 720901, 0, 10, 720902, 0, 10, 720903, 0, 10, 720904, 0, 10, 720905, 0, 10, 720906, 0, 10, 720907, 0, 10, 720908, 0, 10, 720909, 0, 10, 720910, 0, 9, 720911, 0, 10, 720912, 0, 10, 720913, 0, 10, 720914, 0, 10, 720915, 0, 10, 720916, 0, 10, 720917, 0, 10, 720918, 0, 10, 720919, 0, 10, 720920, 0, 10, 720921, 0, 10, 720922, 0, 9, 720923, 0, 10, 720924, 0, 10, 720925, 0, 10, 720926, 0, 10, 720927, 0, 10, 720928, 0, 10, 720929, 0, 10, 720930, 0, 10, 720931, 0, 10, 720932, 0, 65541, 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, 65542, 720945, 0, 11, 851967, 0, 65544, 786432, 0, 131081, 786433, 0, 131081, 786434, 0, 131081, 786435, 0, 131081, 786436, 0, 131081, 786437, 0, 131081, 786438, 0, 131081, 786439, 0, 131081, 786440, 0, 131081, 786441, 0, 131081, 786442, 0, 131081, 786443, 0, 131081, 786444, 0, 131081, 786445, 0, 131081, 786446, 0, 131081, 786447, 0, 131081, 786448, 0, 131081, 786449, 0, 131081, 786450, 0, 131081, 786451, 0, 131081, 786452, 0, 131081, 786453, 0, 131081, 786454, 0, 131081, 786455, 0, 131081, 786456, 0, 131081, 786457, 0, 131081, 786458, 0, 131081, 786459, 0, 131081, 786460, 0, 131081, 786461, 0, 131081, 786462, 0, 131081, 786463, 0, 131081, 786464, 0, 131081, 786465, 0, 131081, 786466, 0, 131081, 786467, 0, 131081, 786468, 0, 131081, 786469, 0, 131081, 786470, 0, 131081, 786471, 0, 131081, 786472, 0, 131081, 786473, 0, 131081, 786474, 0, 131081, 786475, 0, 131081, 786476, 0, 131081, 786477, 0, 131081, 786478, 0, 131081, 786479, 0, 131081, 786480, 0, 131081, 786481, 0, 65542, 786482, 0, 11, 917503, 0, 196616, 851968, 0, 196617, 851969, 0, 196617, 851970, 0, 196617, 851971, 0, 196617, 851972, 0, 196617, 851973, 0, 196617, 851974, 0, 196617, 851975, 0, 196617, 851976, 0, 196617, 851977, 0, 196617, 851978, 0, 196617, 851979, 0, 196617, 851980, 0, 196617, 851981, 0, 196617, 851982, 0, 196617, 851983, 0, 196617, 851984, 0, 196617, 851985, 0, 196617, 851986, 0, 196617, 851987, 0, 196617, 851988, 0, 196617, 851989, 0, 196617, 851990, 0, 196617, 851991, 0, 196617, 851992, 0, 196617, 851993, 0, 196617, 851994, 0, 196617, 851995, 0, 196617, 851996, 0, 196617, 851997, 0, 196617, 851998, 0, 196617, 851999, 0, 196617, 852000, 0, 196617, 852001, 0, 196617, 852002, 0, 196617, 852003, 0, 196617, 852004, 0, 196617, 852005, 0, 196617, 852006, 0, 196617, 852007, 0, 196617, 852008, 0, 196617, 852009, 0, 196617, 852010, 0, 196617, 852011, 0, 196617, 852012, 0, 196617, 852013, 0, 196617, 852014, 0, 196617, 852015, 0, 196617, 852016, 0, 196617, 852017, 0, 196617, 852018, 0, 131082, 852019, 0, 10, 852020, 0, 10, 852021, 0, 10, 852022, 0, 10, 852023, 0, 10, 852024, 0, 10, 852025, 0, 10, 852026, 0, 10, 852027, 0, 10, 852028, 0, 10, 852029, 0, 10, 852030, 0, 10, 852031, 0, 10, 852032, 0, 11, 917554, 0, 196616, 917555, 0, 196617, 917556, 0, 196617, 917557, 0, 196617, 917558, 0, 196617, 917559, 0, 196617, 917560, 0, 196617, 917561, 0, 196617, 917562, 0, 196617, 917563, 0, 196617, 917564, 0, 196617, 917565, 0, 196617, 917566, 0, 196617, 917567, 0, 196617, 917568, 0, 196619 ) +tile_data = PoolIntArray( 65535, 0, 8, 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, 11, 131071, 0, 65544, 65536, 0, 131078, 65537, 0, 196617, 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, 196617, 65556, 0, 196617, 65557, 0, 196617, 65558, 0, 196617, 65559, 0, 196617, 65560, 0, 196617, 65561, 0, 196617, 65562, 0, 196617, 65563, 0, 196617, 65564, 0, 196617, 65565, 0, 196617, 65566, 0, 196617, 65567, 0, 196617, 65568, 0, 196617, 65569, 0, 196617, 65570, 0, 196617, 65571, 0, 196617, 65572, 0, 196617, 65573, 0, 196617, 65574, 0, 196617, 65575, 0, 196617, 65576, 0, 196617, 65577, 0, 196617, 65578, 0, 196617, 65579, 0, 196617, 65580, 0, 196617, 65581, 0, 196617, 65582, 0, 196617, 65583, 0, 196617, 65584, 0, 196617, 65585, 0, 196617, 65586, 0, 131077, 65587, 0, 131083, 196607, 0, 65544, 131072, 0, 131083, 131122, 0, 65544, 131123, 0, 131083, 262143, 0, 65544, 196608, 0, 131083, 196658, 0, 65544, 196659, 0, 131083, 327679, 0, 65544, 262144, 0, 131083, 262194, 0, 65544, 262195, 0, 131083, 393215, 0, 65544, 327680, 0, 131083, 327730, 0, 65544, 327731, 0, 131083, 458751, 0, 65544, 393216, 0, 131083, 393266, 0, 65544, 393267, 0, 131083, 524287, 0, 65544, 458752, 0, 131083, 458802, 0, 65544, 458803, 0, 131083, 589823, 0, 65544, 524288, 0, 131083, 524308, 0, 196608, 524338, 0, 65544, 524339, 0, 131083, 655359, 0, 65544, 589824, 0, 131083, 589874, 0, 65544, 589875, 0, 131083, 720895, 0, 65544, 655360, 0, 131083, 655374, 0, 0, 655386, 0, 0, 655410, 0, 65544, 655411, 0, 131083, 786431, 0, 65544, 720896, 0, 65542, 720897, 0, 10, 720898, 0, 10, 720899, 0, 10, 720900, 0, 10, 720901, 0, 10, 720902, 0, 10, 720903, 0, 10, 720904, 0, 10, 720905, 0, 10, 720906, 0, 10, 720907, 0, 10, 720908, 0, 10, 720909, 0, 10, 720910, 0, 9, 720911, 0, 10, 720912, 0, 10, 720913, 0, 10, 720914, 0, 10, 720915, 0, 10, 720916, 0, 10, 720917, 0, 10, 720918, 0, 10, 720919, 0, 10, 720920, 0, 10, 720921, 0, 10, 720922, 0, 9, 720923, 0, 10, 720924, 0, 10, 720925, 0, 10, 720926, 0, 10, 720927, 0, 10, 720928, 0, 10, 720929, 0, 10, 720930, 0, 10, 720931, 0, 10, 720932, 0, 10, 720933, 0, 11, 720941, 0, 8, 720942, 0, 10, 720943, 0, 10, 720944, 0, 10, 720945, 0, 10, 720946, 0, 65541, 720947, 0, 131083, 851967, 0, 196616, 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, 196619, 786477, 0, 196616, 786478, 0, 196617, 786479, 0, 196617, 786480, 0, 196617, 786481, 0, 196617, 786482, 0, 196617, 786483, 0, 196619 ) [node name="ParallaxBackground" type="ParallaxBackground" parent="."] @@ -35,3 +42,25 @@ position = Vector2( 33, 170 ) [node name="Demon" parent="." instance=ExtResource( 4 )] position = Vector2( 301, 164 ) + +[node name="Leap" type="Area2D" parent="."] +script = ExtResource( 7 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Leap"] +position = Vector2( 668, 217 ) +shape = SubResource( 1 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/Black = ExtResource( 9 ) +"anims/Black Fade in" = ExtResource( 9 ) +script = ExtResource( 8 ) + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="Sprite" type="Sprite" parent="CanvasLayer"] +modulate = Color( 0, 0, 0, 0.7 ) +position = Vector2( -287, -179 ) +scale = Vector2( 2.025, 2.41667 ) +texture = ExtResource( 6 ) +centered = false +[connection signal="body_entered" from="Leap" to="AnimationPlayer" method="_on_Leap_body_entered"] diff --git a/magic/Projectiles/ExplosiveProjectile.tscn b/magic/Projectiles/ExplosiveProjectile.tscn index 34383ed..7253e84 100644 --- a/magic/Projectiles/ExplosiveProjectile.tscn +++ b/magic/Projectiles/ExplosiveProjectile.tscn @@ -8,7 +8,7 @@ [sub_resource type="CircleShape2D" id=1] radius = 6.0 -[sub_resource type="CircleShape2D" id=5] +[sub_resource type="CircleShape2D" id=2] radius = 50.0 [node name="ExplosiveProjectile" type="KinematicBody2D"] @@ -30,7 +30,7 @@ shape = SubResource( 1 ) visible = false [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -shape = SubResource( 5 ) +shape = SubResource( 2 ) [node name="KillTimer" type="Timer" parent="."] one_shot = true diff --git a/script/player.gd b/script/player.gd index 27cd9e4..58eadb4 100644 --- a/script/player.gd +++ b/script/player.gd @@ -38,6 +38,8 @@ func play_hitsound(): HitSound.play(0.0) $HitAnimation.play("Hit") + + func get_current_conduit(): return Inventory.active_conduit @@ -111,5 +113,7 @@ func get_movement_weight(): else: return 0.07 -func _on_Area2D_body_entered(body): - pass + + +func _on_Leap_body_entered(body): + $AnimationPlayer.play("Black Fade in")