From fa8cee351ec5238b760d1ff651be095a64b4357b Mon Sep 17 00:00:00 2001 From: Logan Date: Tue, 21 Jul 2020 23:22:33 -0500 Subject: [PATCH] Player sprite changed --- Player/Player.tscn | 28 ++++++++++++--- ai/{Hell.tscn => Scenes/Demon.tscn} | 4 ++- .../DemonFireball.tscn} | 4 ++- ai/{ => Scenes}/Skeleton Enemy.tscn | 3 +- ai/{ => Scenes}/SpinningBone.tscn | 3 +- ai/{ => Scenes}/ogre.tscn | 3 +- .../Demon Fireball.gd} | 0 ai/{Hell.gd => Script/Demon.gd} | 0 ai/{ => Script}/Enemy.gd | 0 ai/{ => Script}/EnemyProjectile.gd | 0 ai/{ => Script}/Skeleton Enemy.gd | 0 ai/{ => Script}/SpinningBone.gd | 0 ai/{ => Script}/ogre.gd | 0 art/Elf.png | Bin 0 -> 1306 bytes art/Elf.png.import | 34 ++++++++++++++++++ levels/test.tscn | 20 ++--------- project.godot | 4 +-- script/player.gd | 1 + 18 files changed, 75 insertions(+), 29 deletions(-) rename ai/{Hell.tscn => Scenes/Demon.tscn} (96%) rename ai/{BadFireball.tscn => Scenes/DemonFireball.tscn} (91%) rename ai/{ => Scenes}/Skeleton Enemy.tscn (96%) rename ai/{ => Scenes}/SpinningBone.tscn (93%) rename ai/{ => Scenes}/ogre.tscn (95%) rename ai/{Hell Projectile.gd => Script/Demon Fireball.gd} (100%) rename ai/{Hell.gd => Script/Demon.gd} (100%) rename ai/{ => Script}/Enemy.gd (100%) rename ai/{ => Script}/EnemyProjectile.gd (100%) rename ai/{ => Script}/Skeleton Enemy.gd (100%) rename ai/{ => Script}/SpinningBone.gd (100%) rename ai/{ => Script}/ogre.gd (100%) create mode 100644 art/Elf.png create mode 100644 art/Elf.png.import diff --git a/Player/Player.tscn b/Player/Player.tscn index 147490b..9b371ef 100644 --- a/Player/Player.tscn +++ b/Player/Player.tscn @@ -1,11 +1,11 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=16 format=2] [ext_resource path="res://script/player.gd" type="Script" id=1] [ext_resource path="res://ui/PlayerStats.tscn" type="PackedScene" id=2] [ext_resource path="res://meta/BoundedCamera.tscn" type="PackedScene" id=3] [ext_resource path="res://script/PlayerStateMachine.gd" type="Script" id=4] [ext_resource path="res://ui/Inventory.tscn" type="PackedScene" id=5] -[ext_resource path="res://art/WizardM.png" type="Texture" id=6] +[ext_resource path="res://art/Elf.png" type="Texture" id=6] [ext_resource path="res://script/WandPosition.gd" type="Script" id=7] [ext_resource path="res://art/Paralax Dungeon.png" type="Texture" id=8] [ext_resource path="res://Sound Effects/Enemy Hit.wav" type="AudioStream" id=9] @@ -66,6 +66,23 @@ tracks/0/keys = { "values": [ 4, 5, 6, 7 ] } +[sub_resource type="Animation" id=6] +resource_name = "Hit" +length = 0.1 +step = 0.05 +tracks/0/type = "value" +tracks/0/path = NodePath("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, 0.1 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ Color( 10, 10, 10, 1 ), Color( 1, 1, 1, 1 ) ] +} + [node name="Player" type="KinematicBody2D"] collision_mask = 2 script = ExtResource( 1 ) @@ -91,7 +108,7 @@ position = Vector2( 0, -9 ) script = ExtResource( 7 ) [node name="Sprite" type="Sprite" parent="."] -position = Vector2( 0, -12 ) +position = Vector2( 0, -16 ) texture = ExtResource( 6 ) vframes = 3 hframes = 4 @@ -111,6 +128,9 @@ anims/Idle = SubResource( 3 ) anims/Jumping = SubResource( 4 ) anims/Running = SubResource( 5 ) +[node name="HitAnimation" type="AnimationPlayer" parent="."] +anims/Hit = SubResource( 6 ) + [node name="CoyoteTimer" type="Timer" parent="."] wait_time = 0.1 one_shot = true @@ -138,4 +158,4 @@ texture = ExtResource( 8 ) [node name="Enemy Hit" type="AudioStreamPlayer2D" parent="."] stream = ExtResource( 9 ) -volume_db = -8.077 +volume_db = 1.0 diff --git a/ai/Hell.tscn b/ai/Scenes/Demon.tscn similarity index 96% rename from ai/Hell.tscn rename to ai/Scenes/Demon.tscn index ef8ec09..b336253 100644 --- a/ai/Hell.tscn +++ b/ai/Scenes/Demon.tscn @@ -1,10 +1,12 @@ [gd_scene load_steps=7 format=2] [ext_resource path="res://art/Hell Dude.png" type="Texture" id=1] -[ext_resource path="res://ai/Hell.gd" type="Script" id=2] +[ext_resource path="res://ai/Script/Demon.gd" type="Script" id=2] [ext_resource path="res://Music and Fonts(Misc.)/Hell Hit.tres" type="Animation" id=3] [ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=4] + + [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 5.06709, 5.78183 ) diff --git a/ai/BadFireball.tscn b/ai/Scenes/DemonFireball.tscn similarity index 91% rename from ai/BadFireball.tscn rename to ai/Scenes/DemonFireball.tscn index 9d9dea6..577202b 100644 --- a/ai/BadFireball.tscn +++ b/ai/Scenes/DemonFireball.tscn @@ -1,10 +1,12 @@ [gd_scene load_steps=6 format=2] -[ext_resource path="res://ai/Hell Projectile.gd" type="Script" id=1] +[ext_resource path="res://ai/Script/Demon Fireball.gd" type="Script" id=1] [ext_resource path="res://art/Fireball.png" type="Texture" id=2] [ext_resource path="res://Sound Effects/Enemy Hit Wall.wav" type="AudioStream" id=3] [ext_resource path="res://Sound Effects/Enemy Hit.wav" type="AudioStream" id=4] + + [sub_resource type="CircleShape2D" id=1] radius = 4.54199 diff --git a/ai/Skeleton Enemy.tscn b/ai/Scenes/Skeleton Enemy.tscn similarity index 96% rename from ai/Skeleton Enemy.tscn rename to ai/Scenes/Skeleton Enemy.tscn index c3b3e43..4db4229 100644 --- a/ai/Skeleton Enemy.tscn +++ b/ai/Scenes/Skeleton Enemy.tscn @@ -1,10 +1,11 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://ai/Skeleton Enemy.gd" type="Script" id=1] +[ext_resource path="res://ai/Script/Skeleton Enemy.gd" type="Script" id=1] [ext_resource path="res://Music and Fonts(Misc.)/Skeleton Hit.tres" type="Animation" id=2] [ext_resource path="res://art/Skeleton.png" type="Texture" id=3] [ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=4] + [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 5, 7 ) diff --git a/ai/SpinningBone.tscn b/ai/Scenes/SpinningBone.tscn similarity index 93% rename from ai/SpinningBone.tscn rename to ai/Scenes/SpinningBone.tscn index 048e6b1..a7c944e 100644 --- a/ai/SpinningBone.tscn +++ b/ai/Scenes/SpinningBone.tscn @@ -1,7 +1,8 @@ [gd_scene load_steps=5 format=2] [ext_resource path="res://art/SpinningBone.png" type="Texture" id=1] -[ext_resource path="res://ai/SpinningBone.gd" type="Script" id=2] +[ext_resource path="res://ai/Script/SpinningBone.gd" type="Script" id=2] + [sub_resource type="Animation" id=1] resource_name = "Bone Throw" diff --git a/ai/ogre.tscn b/ai/Scenes/ogre.tscn similarity index 95% rename from ai/ogre.tscn rename to ai/Scenes/ogre.tscn index a6b6b8f..f9ae230 100644 --- a/ai/ogre.tscn +++ b/ai/Scenes/ogre.tscn @@ -1,10 +1,11 @@ [gd_scene load_steps=7 format=2] -[ext_resource path="res://ai/ogre.gd" type="Script" id=1] +[ext_resource path="res://ai/Script/ogre.gd" type="Script" id=1] [ext_resource path="res://art/Ogre_Run.png" type="Texture" id=2] [ext_resource path="res://Music and Fonts(Misc.)/Ogre Hit.tres" type="Animation" id=3] [ext_resource path="res://Music and Fonts(Misc.)/Ogre Run.tres" type="Animation" id=4] + [sub_resource type="CapsuleShape2D" id=1] height = 4.0 diff --git a/ai/Hell Projectile.gd b/ai/Script/Demon Fireball.gd similarity index 100% rename from ai/Hell Projectile.gd rename to ai/Script/Demon Fireball.gd diff --git a/ai/Hell.gd b/ai/Script/Demon.gd similarity index 100% rename from ai/Hell.gd rename to ai/Script/Demon.gd diff --git a/ai/Enemy.gd b/ai/Script/Enemy.gd similarity index 100% rename from ai/Enemy.gd rename to ai/Script/Enemy.gd diff --git a/ai/EnemyProjectile.gd b/ai/Script/EnemyProjectile.gd similarity index 100% rename from ai/EnemyProjectile.gd rename to ai/Script/EnemyProjectile.gd diff --git a/ai/Skeleton Enemy.gd b/ai/Script/Skeleton Enemy.gd similarity index 100% rename from ai/Skeleton Enemy.gd rename to ai/Script/Skeleton Enemy.gd diff --git a/ai/SpinningBone.gd b/ai/Script/SpinningBone.gd similarity index 100% rename from ai/SpinningBone.gd rename to ai/Script/SpinningBone.gd diff --git a/ai/ogre.gd b/ai/Script/ogre.gd similarity index 100% rename from ai/ogre.gd rename to ai/Script/ogre.gd diff --git a/art/Elf.png b/art/Elf.png new file mode 100644 index 0000000000000000000000000000000000000000..2738a21b2f108ac44471f74500618eb2a41ebf27 GIT binary patch literal 1306 zcmV+#1?BpQP)Px()Ja4^RCt{2oIh(6K^VrLlN5r7XLBHz5MjWO6amqsRPq(BNx%&))#?#w&0w|j9O2)WyxdH>Da-0l8$ z7YGUp3JMAe3JMAe3i=P#@@-HE5tp@zqR6{nuIADkToMpM#G~!DvaS92PNv=R7UCis zT>l&?hRhTAkqJWXtLtNHqs%{`FNA3Ug%EKRMXh88*d*}fV4-jn$A{;W|I349+uiQ_ zWZ&BUIAg=sKaibCHZzd?XFdYl1OQ-de~i&~JL%W!c9Q-lXPW?kjr})>qNwFsKtP=V z_5(PXfl2{v5&#yGsV0PozaG56($;f~mj_BeQhJ*%c{~64GASV0xFIJ%oqF9)CgAio z`7<0vQEO@IImiY8JpH(Wryo}o8|n8Xj(?qKW{j5yik)7!gVVE3oStne$tMNiB#<`> zWkKpxX8~{cNPu*C_&RyLw|IoT#Uo{Z`n^umE}&8XZUXWGbaHk9Kwt4*w}a7kJNK)q zjsngB*#z>Y3nj3&FET4Qef~Q4J}7;TU-hADC(DO_U{b)_kDmdMi}laW-r^B9Qhkzd z0ha{i@ABT@m$GktXNcoheXQ>cGwpSDr(M7~UkT)?H~5A1ogv8X#csAuodwkX5VB3c z#Ky_nTSzBo+PBIAX1)cA5^#}=4cER@K-~b8&H&pWE=M zD}kTGPs;oG{;E+wu74p!yz=sXZeJ=w=iUPdKwSiN;wC_S(+4WL?PWG>{TCGvm=q9z zQpC*hIK9>-klvmawbLEvm-Th^Z*m?$R+G+31qB5K1qB5K1qIchK!<%Avte^UGYY|` ztGa$RbQs7d#3ufU?ix8NkTL^&@O^*>H*Njr5o+53WYN`05I?lX?D=qW0!%ix^>B0A z*B2C?5wgYO96DSi8@fy4Uf;mR)+-224xN4&{dKP-1Om}WLv;w4R9I3D2iHCQ9@Ak zM@(*gXPCS$TEVA%eSsG|UL;evdTsGIP)>)hJsu}J9JpCE9ydA~wBh?z(BUetFEF}3 zKn@~LLWtM|V9xhfwToEUK}=QG7kJ0xX{u`?xp$1O@Ok%J zrfrdJZ2`223{f~mT~1CI_qB=Psx1}5$cGRjw&mC@3f>h^znlm!S|M z{(bx;`FZS(4mU-nqf2*>vgt6;yh519FN;lwfoAZ1*)NAKv*|F<48G5epKQ!L-*=6l zO^1s#K0L?x@H`>1r&nm3_L)3@f&O&*a*V{c@q3}e={B}7YmNM(%Cw1e|L@F8y#-K^8+~Xd!fTkcz%FQ z{PK;Q-fy1P^_#}?1Lpgyg$z)RUv693&C@#PRXsm|G~Zt>rOWMyDqvL}rDe+ZF|?Q-FQF7*7Wuxbrg}!l^fr3AEiG70JNq;>Rn7PR0_Z_1s$Wcp Q9RL6T07*qoM6N<$f>MKS-v9sr literal 0 HcmV?d00001 diff --git a/art/Elf.png.import b/art/Elf.png.import new file mode 100644 index 0000000..5276717 --- /dev/null +++ b/art/Elf.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Elf.png-be8b8a01896b4861e3df7c9d33c5f98e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/Elf.png" +dest_files=[ "res://.import/Elf.png-be8b8a01896b4861e3df7c9d33c5f98e.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/levels/test.tscn b/levels/test.tscn index 06267cd..e99fcea 100644 --- a/levels/test.tscn +++ b/levels/test.tscn @@ -1,12 +1,8 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://meta/DungeonTilemap.tscn" type="PackedScene" id=2] -[ext_resource path="res://ai/ogre.tscn" type="PackedScene" id=3] -[ext_resource path="res://Items/Wand Pickups/ChargeWandPickup.tscn" type="PackedScene" id=4] -[ext_resource path="res://Items/Wand Pickups/TripleWandPickup.tscn" type="PackedScene" id=5] -[ext_resource path="res://Items/Wand Pickups/BounceWandCollectable.tscn" type="PackedScene" id=6] -[ext_resource path="res://Items/Wand Pickups/PrismWandPickup.tscn" type="PackedScene" id=7] +[ext_resource path="res://ai/Scenes/ogre.tscn" type="PackedScene" id=3] [node name="Node2D" type="Node2D"] @@ -21,15 +17,3 @@ position = Vector2( 286, 170 ) [node name="Ogre2" parent="." instance=ExtResource( 3 )] position = Vector2( 347, 159 ) - -[node name="PrismWandPickup" parent="." instance=ExtResource( 7 )] -position = Vector2( 189, 151 ) - -[node name="ChargeWandPickup" parent="PrismWandPickup" instance=ExtResource( 4 )] -position = Vector2( -98, -9 ) - -[node name="TripleWand" parent="PrismWandPickup" instance=ExtResource( 5 )] -position = Vector2( -64, -9 ) - -[node name="BounceWandPickup" parent="PrismWandPickup" instance=ExtResource( 6 )] -position = Vector2( -33, -6 ) diff --git a/project.godot b/project.godot index 55dfb60..c91b3ea 100644 --- a/project.godot +++ b/project.godot @@ -22,12 +22,12 @@ _global_script_classes=[ { "base": "KinematicBody2D", "class": "Enemy", "language": "GDScript", -"path": "res://ai/Enemy.gd" +"path": "res://ai/Script/Enemy.gd" }, { "base": "KinematicBody2D", "class": "EnemyProjectile", "language": "GDScript", -"path": "res://ai/EnemyProjectile.gd" +"path": "res://ai/Script/EnemyProjectile.gd" }, { "base": "KinematicBody2D", "class": "Projectile", diff --git a/script/player.gd b/script/player.gd index 8168b60..27cd9e4 100644 --- a/script/player.gd +++ b/script/player.gd @@ -36,6 +36,7 @@ onready var energy = Stats.energy setget set_energy, get_energy func play_hitsound(): HitSound.play(0.0) + $HitAnimation.play("Hit") func get_current_conduit(): return Inventory.active_conduit