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 0000000..2738a21 Binary files /dev/null and b/art/Elf.png differ 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