diff --git a/src/actors/enemy/Skeleton.tscn b/src/actors/enemy/Skeleton.tscn index 3fdfc0382e4d92af21f2ee5108a7ad95d4cdd02d..16f9bf2562e0bdc4b643673f51874f7cce5518e8 100644 --- a/src/actors/enemy/Skeleton.tscn +++ b/src/actors/enemy/Skeleton.tscn @@ -35,11 +35,11 @@ var is_alive = true var is_moving_right = true const is_stompable = true -var healthpoints +var healthpoints = 10 func _ready(): - healthpoints = 3 + healthpoints = 10 is_alive = true $Control/HealthBar.max_value = healthpoints @@ -124,14 +124,14 @@ func _on_Area2D_body_entered(body): [sub_resource type="SpriteFrames" id=2] animations = [ { -"frames": [ ExtResource( 13 ), ExtResource( 13 ), ExtResource( 13 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ], +"frames": [ ExtResource( 3 ), ExtResource( 5 ), ExtResource( 4 ), ExtResource( 1 ), ExtResource( 6 ), ExtResource( 8 ), ExtResource( 7 ), ExtResource( 2 ) ], "loop": true, -"name": "dead", +"name": "walk", "speed": 5.0 }, { -"frames": [ ExtResource( 3 ), ExtResource( 5 ), ExtResource( 4 ), ExtResource( 1 ), ExtResource( 6 ), ExtResource( 8 ), ExtResource( 7 ), ExtResource( 2 ) ], +"frames": [ ExtResource( 13 ), ExtResource( 13 ), ExtResource( 13 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ], "loop": true, -"name": "walk", +"name": "dead", "speed": 5.0 } ] @@ -141,9 +141,13 @@ extents = Vector2( 13.047, 22.6729 ) [sub_resource type="RectangleShape2D" id=4] extents = Vector2( 15.8205, 22.4895 ) -[node name="Node2D" type="Node2D" groups=["enemy"]] +[node name="Node2D" type="Node2D" groups=[ +"enemy", +]] -[node name="Skeleton" type="KinematicBody2D" parent="." groups=["enemy"]] +[node name="Skeleton" type="KinematicBody2D" parent="." groups=[ +"enemy", +]] collision_layer = 8 collision_mask = 13 script = SubResource( 1 ) @@ -152,7 +156,7 @@ script = SubResource( 1 ) position = Vector2( 0.18729, 0 ) frames = SubResource( 2 ) animation = "walk" -frame = 7 +frame = 3 playing = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Skeleton"] diff --git a/src/actors/enemy/enemy_knight.tscn b/src/actors/enemy/enemy_knight.tscn index 91a80b4f60cc58ca3d7f232b02bb6f519958faa3..a68dc177ddc9af877959a6681ada676b19132ba6 100644 --- a/src/actors/enemy/enemy_knight.tscn +++ b/src/actors/enemy/enemy_knight.tscn @@ -44,7 +44,7 @@ var is_moving_right = true var is_alive = true # Überprüft ob der Gegner noch am leben ist const is_stompable = false -var healthpoints +var healthpoints = 10 var attack_timer : Timer var hurt_timer : Timer @@ -57,7 +57,7 @@ var is_hurt : bool func _ready(): - healthpoints = 5 + healthpoints = 10 is_alive = true $Control/HealthBar.max_value = healthpoints @@ -224,14 +224,14 @@ animations = [ { "name": "idle", "speed": 5.0 }, { -"frames": [ ExtResource( 1 ), ExtResource( 11 ), ExtResource( 2 ), ExtResource( 3 ), ExtResource( 15 ) ], +"frames": [ ExtResource( 8 ), ExtResource( 10 ), ExtResource( 12 ), ExtResource( 13 ) ], "loop": true, -"name": "attack", +"name": "jump", "speed": 5.0 }, { -"frames": [ ExtResource( 8 ), ExtResource( 10 ), ExtResource( 12 ), ExtResource( 13 ) ], +"frames": [ ExtResource( 1 ), ExtResource( 11 ), ExtResource( 2 ), ExtResource( 3 ), ExtResource( 15 ) ], "loop": true, -"name": "jump", +"name": "attack", "speed": 5.0 }, { "frames": [ ExtResource( 14 ), ExtResource( 16 ), ExtResource( 18 ), ExtResource( 20 ), ExtResource( 17 ), ExtResource( 19 ) ], @@ -259,7 +259,9 @@ extents = Vector2( 11.906, 20.5828 ) [sub_resource type="RectangleShape2D" id=5] extents = Vector2( 15.0609, 5.10341 ) -[node name="enemy_knight" type="KinematicBody2D" groups=["enemy"]] +[node name="enemy_knight" type="KinematicBody2D" groups=[ +"enemy", +]] collision_layer = 8 collision_mask = 3 script = SubResource( 1 ) @@ -267,7 +269,7 @@ script = SubResource( 1 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] frames = SubResource( 2 ) animation = "walk" -frame = 2 +frame = 5 playing = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] @@ -284,14 +286,18 @@ modulate = Color( 0.827451, 0, 1, 1 ) position = Vector2( 28.2048, 10.4099 ) shape = SubResource( 4 ) -[node name="SwordHitbox" type="Area2D" parent="." groups=["EnemyWeapon"]] +[node name="SwordHitbox" type="Area2D" parent="." groups=[ +"EnemyWeapon", +]] position = Vector2( 55.3471, -24.3883 ) -collision_layer = 16 -collision_mask = 2 monitoring = false monitorable = false +collision_layer = 16 +collision_mask = 2 -[node name="CollisionShape2D" type="CollisionShape2D" parent="SwordHitbox" groups=["EnemyWeapon"]] +[node name="CollisionShape2D" type="CollisionShape2D" parent="SwordHitbox" groups=[ +"EnemyWeapon", +]] modulate = Color( 0, 0, 0, 1 ) position = Vector2( -23.8406, 27.286 ) shape = SubResource( 5 ) diff --git a/src/actors/enemy/fireball_wizard.tscn b/src/actors/enemy/fireball_wizard.tscn index 27e3c5c9e795a0aa28c7668f97d1055189a0b407..e9928a24d4015a9684bf18fd123bb7b68219fbfb 100644 --- a/src/actors/enemy/fireball_wizard.tscn +++ b/src/actors/enemy/fireball_wizard.tscn @@ -43,11 +43,14 @@ animations = [ { [sub_resource type="RectangleShape2D" id=3] -[node name="Node2D" type="Node2D" groups=["enemy_weapon"]] +[node name="Node2D" type="Node2D" groups=[ +"enemy_weapon", +]] script = SubResource( 1 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] frames = SubResource( 2 ) +frame = 1 playing = true [node name="Area2D" type="Area2D" parent="."] diff --git a/src/actors/enemy/ghost.tscn b/src/actors/enemy/ghost.tscn index 5b0597e7921e6e3aafa68eed5d55d6bf489e7bb6..503eed8eb14d92b0cc7c62ae9085a686beffa8b1 100644 --- a/src/actors/enemy/ghost.tscn +++ b/src/actors/enemy/ghost.tscn @@ -113,7 +113,9 @@ extents = Vector2( 10, 19.2882 ) [sub_resource type="RectangleShape2D" id=11] extents = Vector2( 11.0537, 20.5606 ) -[node name="ghost" type="KinematicBody2D" groups=["enemy"]] +[node name="ghost" type="KinematicBody2D" groups=[ +"enemy", +]] script = SubResource( 1 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="."] diff --git a/src/actors/enemy/wizard.tscn b/src/actors/enemy/wizard.tscn index ed92cf2c53ba8c3c97dc768d0e3ab1313743f164..25e8a67c77ac75b0311b2ab884ccb0cb430afa8e 100644 --- a/src/actors/enemy/wizard.tscn +++ b/src/actors/enemy/wizard.tscn @@ -45,7 +45,7 @@ var velocity = Vector2(0, 1) const is_stompable = true var is_alive = true -var healthpoints +var healthpoints = 10 var attack_timer : Timer var hurt_timer : Timer @@ -60,7 +60,7 @@ var is_hurt : bool func _ready(): - healthpoints = 9 + healthpoints = 10 is_alive = true $Control/HealthBar.max_value = healthpoints @@ -185,7 +185,9 @@ extents = Vector2( 15.9676, 19.6908 ) [sub_resource type="RectangleShape2D" id=5] extents = Vector2( 196.177, 15.9619 ) -[node name="wizard" type="KinematicBody2D" groups=["enemy"]] +[node name="wizard" type="KinematicBody2D" groups=[ +"enemy", +]] collision_layer = 8 collision_mask = 7 script = SubResource( 1 ) diff --git a/src/actors/player/Player.gd b/src/actors/player/Player.gd index 92eb628761f4768ae3dafaa976d8efad9e8cd9ab..f1ec72356d8b69443d8ba0dc9c35aa239acc889c 100644 --- a/src/actors/player/Player.gd +++ b/src/actors/player/Player.gd @@ -53,7 +53,6 @@ const invincible_cooldown : float = .2 const stomp_velocity : int = -300 -export var grey_scale: bool = false """ SECTION OVERRIDE FUNCTIONS """ @@ -69,8 +68,9 @@ func _ready(): $Control/HealthBar.tint_progress = Color.green $MeleeDetector.monitoring = false - set_black_white(grey_scale) + print("ready") + set_black_white(false) func _process(delta): @@ -330,5 +330,5 @@ func _on_StompDetector_body_entered(body): func _on_MeleeDetector_body_entered(body): if body.is_in_group("enemy"): - body.take_damage(3) + body.take_damage(5) diff --git a/src/actors/player/Player.tscn b/src/actors/player/Player.tscn index bbb3f3a18f960de2ee8f0b99bc8e738c1e14c4ed..3335c79e5b2f4f5751bc4f3d02862608d0c52eb4 100644 --- a/src/actors/player/Player.tscn +++ b/src/actors/player/Player.tscn @@ -39,45 +39,65 @@ flags = 4 atlas = ExtResource( 4 ) region = Rect2( 144, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=31] +[sub_resource type="AtlasTexture" id=5] flags = 4 -atlas = ExtResource( 6 ) +atlas = ExtResource( 5 ) region = Rect2( 0, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=32] +[sub_resource type="AtlasTexture" id=6] flags = 4 -atlas = ExtResource( 6 ) +atlas = ExtResource( 5 ) region = Rect2( 48, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=33] +[sub_resource type="AtlasTexture" id=7] flags = 4 -atlas = ExtResource( 6 ) +atlas = ExtResource( 5 ) region = Rect2( 96, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=34] +[sub_resource type="AtlasTexture" id=8] flags = 4 -atlas = ExtResource( 6 ) +atlas = ExtResource( 5 ) region = Rect2( 144, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=35] +[sub_resource type="AtlasTexture" id=9] flags = 4 -atlas = ExtResource( 6 ) -region = Rect2( 192, 0, 48, 48 ) +atlas = ExtResource( 7 ) +region = Rect2( 48, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=36] +[sub_resource type="AtlasTexture" id=10] flags = 4 -atlas = ExtResource( 6 ) -region = Rect2( 240, 0, 48, 48 ) +atlas = ExtResource( 7 ) +region = Rect2( 0, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=37] +[sub_resource type="AtlasTexture" id=11] flags = 4 -atlas = ExtResource( 6 ) -region = Rect2( 288, 0, 48, 48 ) +atlas = ExtResource( 8 ) +region = Rect2( 0, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=38] +[sub_resource type="AtlasTexture" id=12] flags = 4 -atlas = ExtResource( 6 ) -region = Rect2( 336, 0, 48, 48 ) +atlas = ExtResource( 8 ) +region = Rect2( 48, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=13] +flags = 4 +atlas = ExtResource( 8 ) +region = Rect2( 96, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=14] +flags = 4 +atlas = ExtResource( 8 ) +region = Rect2( 144, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=15] +flags = 4 +atlas = ExtResource( 8 ) +region = Rect2( 192, 0, 48, 48 ) + +[sub_resource type="AtlasTexture" id=16] +flags = 4 +atlas = ExtResource( 8 ) +region = Rect2( 240, 0, 48, 48 ) [sub_resource type="AtlasTexture" id=17] flags = 4 @@ -149,65 +169,45 @@ flags = 4 atlas = ExtResource( 3 ) region = Rect2( 240, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=5] +[sub_resource type="AtlasTexture" id=31] flags = 4 -atlas = ExtResource( 5 ) +atlas = ExtResource( 6 ) region = Rect2( 0, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=6] +[sub_resource type="AtlasTexture" id=32] flags = 4 -atlas = ExtResource( 5 ) +atlas = ExtResource( 6 ) region = Rect2( 48, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=7] +[sub_resource type="AtlasTexture" id=33] flags = 4 -atlas = ExtResource( 5 ) +atlas = ExtResource( 6 ) region = Rect2( 96, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=8] +[sub_resource type="AtlasTexture" id=34] flags = 4 -atlas = ExtResource( 5 ) +atlas = ExtResource( 6 ) region = Rect2( 144, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=9] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 48, 0, 48, 48 ) - -[sub_resource type="AtlasTexture" id=10] -flags = 4 -atlas = ExtResource( 7 ) -region = Rect2( 0, 0, 48, 48 ) - -[sub_resource type="AtlasTexture" id=11] -flags = 4 -atlas = ExtResource( 8 ) -region = Rect2( 0, 0, 48, 48 ) - -[sub_resource type="AtlasTexture" id=12] -flags = 4 -atlas = ExtResource( 8 ) -region = Rect2( 48, 0, 48, 48 ) - -[sub_resource type="AtlasTexture" id=13] +[sub_resource type="AtlasTexture" id=35] flags = 4 -atlas = ExtResource( 8 ) -region = Rect2( 96, 0, 48, 48 ) +atlas = ExtResource( 6 ) +region = Rect2( 192, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=14] +[sub_resource type="AtlasTexture" id=36] flags = 4 -atlas = ExtResource( 8 ) -region = Rect2( 144, 0, 48, 48 ) +atlas = ExtResource( 6 ) +region = Rect2( 240, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=15] +[sub_resource type="AtlasTexture" id=37] flags = 4 -atlas = ExtResource( 8 ) -region = Rect2( 192, 0, 48, 48 ) +atlas = ExtResource( 6 ) +region = Rect2( 288, 0, 48, 48 ) -[sub_resource type="AtlasTexture" id=16] +[sub_resource type="AtlasTexture" id=38] flags = 4 -atlas = ExtResource( 8 ) -region = Rect2( 240, 0, 48, 48 ) +atlas = ExtResource( 6 ) +region = Rect2( 336, 0, 48, 48 ) [sub_resource type="SpriteFrames" id=39] animations = [ { @@ -216,21 +216,6 @@ animations = [ { "name": "idle", "speed": 5.0 }, { -"frames": [ SubResource( 31 ), SubResource( 32 ), SubResource( 33 ), SubResource( 34 ), SubResource( 35 ), SubResource( 36 ), SubResource( 37 ), SubResource( 38 ) ], -"loop": true, -"name": "attack1", -"speed": 20.0 -}, { -"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ], -"loop": true, -"name": "melee", -"speed": 17.0 -}, { -"frames": [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ], -"loop": true, -"name": "move", -"speed": 5.0 -}, { "frames": [ SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ], "loop": true, "name": "jump", @@ -245,6 +230,21 @@ animations = [ { "loop": false, "name": "death", "speed": 7.0 +}, { +"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ], +"loop": true, +"name": "melee", +"speed": 17.0 +}, { +"frames": [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ], +"loop": true, +"name": "move", +"speed": 5.0 +}, { +"frames": [ SubResource( 31 ), SubResource( 32 ), SubResource( 33 ), SubResource( 34 ), SubResource( 35 ), SubResource( 36 ), SubResource( 37 ), SubResource( 38 ) ], +"loop": true, +"name": "attack1", +"speed": 20.0 } ] [sub_resource type="RectangleShape2D" id=40] @@ -259,7 +259,9 @@ extents = Vector2( 9.11914, 2.77663 ) [sub_resource type="RectangleShape2D" id=43] extents = Vector2( 12.751, 6.23259 ) -[node name="Player" type="KinematicBody2D" groups=["player"]] +[node name="Player" type="KinematicBody2D" groups=[ +"player", +]] collision_layer = 3 collision_mask = 249 collision/safe_margin = 0.01 @@ -270,7 +272,7 @@ material = ExtResource( 12 ) position = Vector2( 10, -24 ) frames = SubResource( 39 ) animation = "melee" -frame = 4 +frame = 3 playing = true [node name="Camera2D" type="Camera2D" parent="."] diff --git a/src/scenes/Menu.tscn b/src/scenes/Menu.tscn index 6aca5fcb7019c73b803a281347107e19ad4b0850..cf633269b60fb80ef82d533a3488bcf2a87b308e 100644 --- a/src/scenes/Menu.tscn +++ b/src/scenes/Menu.tscn @@ -17,13 +17,6 @@ font_data = ExtResource( 2 ) [sub_resource type="Theme" id=2] -[sub_resource type="DynamicFont" id=6] -size = 32 -outline_size = 4 -outline_color = Color( 0, 0, 0, 1 ) -extra_spacing_bottom = 6 -font_data = ExtResource( 2 ) - [sub_resource type="StyleBoxTexture" id=3] texture = ExtResource( 5 ) region_rect = Rect2( 0, 0, 361, 101 ) @@ -36,12 +29,11 @@ region_rect = Rect2( 0, 0, 361, 101 ) texture = ExtResource( 3 ) region_rect = Rect2( 0, 0, 361, 101 ) -[sub_resource type="DynamicFont" id=10] -size = 22 +[sub_resource type="DynamicFont" id=6] +size = 32 outline_size = 4 outline_color = Color( 0, 0, 0, 1 ) -extra_spacing_bottom = 3 -extra_spacing_char = 2 +extra_spacing_bottom = 6 font_data = ExtResource( 2 ) [sub_resource type="StyleBoxTexture" id=7] @@ -56,12 +48,12 @@ region_rect = Rect2( 0, 0, 361, 101 ) texture = ExtResource( 3 ) region_rect = Rect2( 0, 0, 361, 101 ) -[sub_resource type="DynamicFont" id=14] -size = 32 +[sub_resource type="DynamicFont" id=10] +size = 22 outline_size = 4 outline_color = Color( 0, 0, 0, 1 ) -extra_spacing_bottom = 5 -extra_spacing_char = 5 +extra_spacing_bottom = 3 +extra_spacing_char = 2 font_data = ExtResource( 2 ) [sub_resource type="StyleBoxTexture" id=11] @@ -76,6 +68,14 @@ region_rect = Rect2( 0, 0, 361, 101 ) texture = ExtResource( 3 ) region_rect = Rect2( 0, 0, 361, 101 ) +[sub_resource type="DynamicFont" id=14] +size = 32 +outline_size = 4 +outline_color = Color( 0, 0, 0, 1 ) +extra_spacing_bottom = 5 +extra_spacing_char = 5 +font_data = ExtResource( 2 ) + [sub_resource type="AtlasTexture" id=15] flags = 4 atlas = ExtResource( 4 ) @@ -139,10 +139,10 @@ margin_top = -108.0 margin_right = 449.0 margin_bottom = -40.0 theme = SubResource( 2 ) -custom_fonts/font = SubResource( 6 ) custom_styles/hover = SubResource( 3 ) custom_styles/pressed = SubResource( 4 ) custom_styles/normal = SubResource( 5 ) +custom_fonts/font = SubResource( 6 ) text = "START" __meta__ = { "_edit_use_anchors_": false @@ -153,10 +153,10 @@ margin_left = 130.0 margin_top = 384.0 margin_right = 450.0 margin_bottom = 448.0 -custom_fonts/font = SubResource( 10 ) custom_styles/hover = SubResource( 7 ) custom_styles/pressed = SubResource( 8 ) custom_styles/normal = SubResource( 9 ) +custom_fonts/font = SubResource( 10 ) text = "EINSTELLUNGEN" __meta__ = { "_edit_use_anchors_": false @@ -167,10 +167,10 @@ margin_left = 128.0 margin_top = 512.0 margin_right = 448.0 margin_bottom = 576.0 -custom_fonts/font = SubResource( 14 ) custom_styles/hover = SubResource( 11 ) custom_styles/pressed = SubResource( 12 ) custom_styles/normal = SubResource( 13 ) +custom_fonts/font = SubResource( 14 ) text = "ENDE" __meta__ = { "_edit_use_anchors_": false @@ -180,7 +180,7 @@ __meta__ = { position = Vector2( 1080, 248 ) scale = Vector2( 2.81113, 2.65621 ) frames = SubResource( 18 ) -frame = 1 +frame = 2 speed_scale = 0.8 playing = true diff --git a/src/scenes/coin.tscn b/src/scenes/coin.tscn index 0cfae48d504ff83540b2cecfafec61a65df664ab..6dd855ea1a3ac5215e64eab57024bd7e6dcb1127 100644 --- a/src/scenes/coin.tscn +++ b/src/scenes/coin.tscn @@ -67,7 +67,7 @@ position = Vector2( 0, 8 ) scale = Vector2( 2.09375, 1.5625 ) frames = SubResource( 10 ) animation = "spin" -frame = 2 +frame = 4 playing = true [node name="coinSound" type="AudioStreamPlayer" parent="."] diff --git a/src/scenes/levels/Level1.tscn b/src/scenes/levels/Level1.tscn index 7c2a501545fea0151d4dc520d2b83ca327461fbf..930b0e794a5488e3c1c641b34e48201d30e10439 100644 --- a/src/scenes/levels/Level1.tscn +++ b/src/scenes/levels/Level1.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=45 format=2] +[gd_scene load_steps=46 format=2] [ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=1] +[ext_resource path="res://src/assets/sounds/kristallsound.wav" type="AudioStream" id=2] [ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=3] [ext_resource path="res://src/scenes/Door.tscn" type="PackedScene" id=4] [ext_resource path="res://src/scenes/shards.tscn" type="PackedScene" id=5] @@ -811,7 +812,7 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 ) 23/shapes = [ ] 23/z_index = 0 -[sub_resource type="StyleBoxFlat" id=29] +[sub_resource type="StyleBoxFlat" id=31] bg_color = Color( 0, 0, 0, 0 ) corner_radius_top_left = 15 corner_radius_top_right = 15 @@ -1059,6 +1060,9 @@ position = Vector2( 1982, 183 ) [node name="coin2" parent="Level1/Objects/Coins" instance=ExtResource( 7 )] position = Vector2( 972.106, 298.929 ) +[node name="shards" parent="Level1/Objects/Coins" instance=ExtResource( 5 )] +position = Vector2( 640, 417 ) + [node name="Acid" type="Node" parent="Level1/Objects"] [node name="Acid" parent="Level1/Objects/Acid" instance=ExtResource( 6 )] @@ -1197,7 +1201,6 @@ position = Vector2( 11167, 292 ) [node name="Player" parent="Level1" instance=ExtResource( 1 )] position = Vector2( 499.46, 426.182 ) collision_mask = 16 -grey_scale = true [node name="Level" type="TileMap" parent="Level1"] tile_set = SubResource( 28 ) @@ -1215,7 +1218,7 @@ margin_left = 1096.0 margin_top = 8.0 margin_right = 1272.0 margin_bottom = 72.0 -custom_styles/panel = SubResource( 29 ) +custom_styles/panel = SubResource( 31 ) __meta__ = { "_edit_use_anchors_": false } @@ -1237,8 +1240,8 @@ margin_left = 1144.0 margin_top = 24.0 margin_right = 1264.0 margin_bottom = 56.0 -custom_colors/font_color = Color( 0.988235, 1, 0.321569, 1 ) custom_fonts/font = SubResource( 30 ) +custom_colors/font_color = Color( 0.988235, 1, 0.321569, 1 ) align = 1 valign = 1 __meta__ = { @@ -1249,6 +1252,9 @@ __meta__ = { stream = ExtResource( 15 ) volume_db = -12.0 +[node name="shardSound" type="AudioStreamPlayer" parent="Level1/Score"] +stream = ExtResource( 2 ) + [connection signal="coin_collected" from="Level1/Objects/Coins/coin" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin3" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin7" to="Level1/Score" method="_on_coin_collected"] @@ -1319,3 +1325,4 @@ volume_db = -12.0 [connection signal="coin_collected" from="Level1/Objects/Coins/coin5" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin6" to="Level1/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level1/Objects/Coins/coin2" to="Level1/Score" method="_on_coin_collected"] +[connection signal="shard_collected" from="Level1/Objects/Coins/shards" to="Level1/Score" method="_on_shard_collected"] diff --git a/src/scenes/levels/Level2.tscn b/src/scenes/levels/Level2.tscn index edf052d5cadf167daa1ee9d836dc8c181b0f1e48..c27b26757b2264b2ff4f671c09c252f16f5d7907 100644 --- a/src/scenes/levels/Level2.tscn +++ b/src/scenes/levels/Level2.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=49 format=2] +[gd_scene load_steps=50 format=2] +[ext_resource path="res://src/assets/sounds/kristallsound.wav" type="AudioStream" id=1] [ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=2] [ext_resource path="res://src/scenes/PauseController.tscn" type="PackedScene" id=3] [ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=4] @@ -754,14 +755,14 @@ points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 ) } ] 17/z_index = 0 -[sub_resource type="StyleBoxFlat" id=30] +[sub_resource type="StyleBoxFlat" id=31] bg_color = Color( 0, 0, 0, 0 ) corner_radius_top_left = 15 corner_radius_top_right = 15 corner_radius_bottom_right = 15 corner_radius_bottom_left = 15 -[sub_resource type="DynamicFont" id=31] +[sub_resource type="DynamicFont" id=30] size = 29 font_data = ExtResource( 8 ) @@ -938,9 +939,8 @@ scale = Vector2( 1.41689, 1.43723 ) position = Vector2( 2131, 297 ) [node name="Player" parent="Level0" instance=ExtResource( 4 )] -position = Vector2( 1880, 385 ) +position = Vector2( 528, 422.454 ) collision_mask = 16 -grey_scale = true [node name="Level" type="TileMap" parent="Level0"] tile_set = SubResource( 29 ) @@ -959,7 +959,7 @@ margin_left = 1096.0 margin_top = 8.0 margin_right = 1272.0 margin_bottom = 72.0 -custom_styles/panel = SubResource( 30 ) +custom_styles/panel = SubResource( 31 ) __meta__ = { "_edit_use_anchors_": false } @@ -981,8 +981,8 @@ margin_left = 1144.0 margin_top = 24.0 margin_right = 1264.0 margin_bottom = 56.0 +custom_fonts/font = SubResource( 30 ) custom_colors/font_color = Color( 0.988235, 1, 0.321569, 1 ) -custom_fonts/font = SubResource( 31 ) align = 1 valign = 1 __meta__ = { @@ -991,7 +991,11 @@ __meta__ = { [node name="coinSound" type="AudioStreamPlayer" parent="Level0/Score"] stream = ExtResource( 18 ) -volume_db = 6.058 +volume_db = -12.0 + +[node name="shardSound" type="AudioStreamPlayer" parent="Level0/Score"] +stream = ExtResource( 1 ) [connection signal="coin_collected" from="Level0/Objects/coin" to="Level0/Score" method="_on_coin_collected"] [connection signal="coin_collected" from="Level0/Objects/coin2" to="Level0/Score" method="_on_coin_collected"] +[connection signal="shard_collected" from="Level0/Objects/shards" to="Level0/Score" method="_on_shard_collected"] diff --git a/src/scenes/levels/Level3.tscn b/src/scenes/levels/Level3.tscn index f6965c29589d5b64a11d5e663c45a5480ddb19b0..bd70ca5b6328d2ccde8cccb32788966d4bb5261a 100644 --- a/src/scenes/levels/Level3.tscn +++ b/src/scenes/levels/Level3.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=49 format=2] +[gd_scene load_steps=50 format=2] +[ext_resource path="res://src/assets/tilesets/png-transparent-nebula-atmosphere-sky-nebula-space-astronomy-space-miscellaneous-purple-texture.png" type="Texture" id=1] [ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=2] [ext_resource path="res://src/scenes/PauseController.tscn" type="PackedScene" id=3] [ext_resource path="res://src/actors/player/Player.tscn" type="PackedScene" id=4] @@ -880,6 +881,7 @@ font_data = ExtResource( 8 ) [node name="BackGroundPNG" type="Sprite" parent="Level0/ParallaxBackground"] position = Vector2( 640, 361 ) scale = Vector2( 1.41689, 1.43723 ) +texture = ExtResource( 1 ) [node name="BackGround" type="TileMap" parent="Level0"] tile_set = SubResource( 12 ) @@ -1202,7 +1204,6 @@ position = Vector2( 4240, 66 ) [node name="Player" parent="Level0" instance=ExtResource( 4 )] position = Vector2( 453, 448 ) collision_mask = 16 -grey_scale = true [node name="Level" type="TileMap" parent="Level0"] tile_set = SubResource( 29 ) diff --git a/src/scenes/levels/Level4.tscn b/src/scenes/levels/Level4.tscn index f26a9e6a31292702eb00e778fb7be724f093ab2a..97ef03f9cee3f9dab3f11155fc9691d7dd14bfdb 100644 --- a/src/scenes/levels/Level4.tscn +++ b/src/scenes/levels/Level4.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=53 format=2] +[gd_scene load_steps=54 format=2] [ext_resource path="res://src/scenes/Door.tscn" type="PackedScene" id=1] [ext_resource path="res://src/scenes/spike.tscn" type="PackedScene" id=2] @@ -19,6 +19,7 @@ [ext_resource path="res://src/scenes/Platforms/PFHSlow.tscn" type="PackedScene" id=17] [ext_resource path="res://src/scenes/levels/Score.gd" type="Script" id=18] [ext_resource path="res://src/assets/menu_assets/04B_30__.TTF" type="DynamicFontData" id=19] +[ext_resource path="res://src/assets/tilesets/png-transparent-nebula-atmosphere-sky-nebula-space-astronomy-space-miscellaneous-purple-texture.png" type="Texture" id=20] [ext_resource path="res://src/assets/tilesets/main_scifi_tileset.png" type="Texture" id=21] [ext_resource path="res://src/assets/colleticbles/coin/gold_1.png" type="Texture" id=22] @@ -778,6 +779,7 @@ font_data = ExtResource( 19 ) [node name="BackGroundPNG" type="Sprite" parent="Level0/ParallaxBackground"] position = Vector2( 555.711, 351.167 ) scale = Vector2( 1.61459, 1.86551 ) +texture = ExtResource( 20 ) [node name="BackGround" type="TileMap" parent="Level0"] tile_set = SubResource( 12 ) diff --git a/src/scenes/levels/Score.gd b/src/scenes/levels/Score.gd index 63ef1f9451f8ead8506d4a827f83b670644ca3ea..99fad6713bcd24fa7ad7e602feccae1ed2edafbb 100644 --- a/src/scenes/levels/Score.gd +++ b/src/scenes/levels/Score.gd @@ -9,3 +9,9 @@ func _on_coin_collected(): coins = coins + 10 $coinSound.play() _ready() + +func _on_shard_collected(): + coins = coins + 50 + $shardSound.play() + _ready() + diff --git a/src/scenes/shards.gd b/src/scenes/shards.gd index 0c51719a9dd1c0f5de4a2d4f6c09d1c8f03fa32b..4dfe0ae44fddb8ecd522d03c5e19d228e364f6ac 100644 --- a/src/scenes/shards.gd +++ b/src/scenes/shards.gd @@ -1,7 +1,10 @@ extends Area2D - +signal shard_collected func _on_shards_body_entered(body): queue_free() + emit_signal("shard_collected") + + diff --git a/src/scenes/shards.tscn b/src/scenes/shards.tscn index 5dac47476323f0eaa67c6daf039bfa997ae50ba1..13be72e5160267fdc8c9a20a7f6238808868a874 100644 --- a/src/scenes/shards.tscn +++ b/src/scenes/shards.tscn @@ -66,7 +66,8 @@ position = Vector2( 9.53674e-07, -4.76837e-07 ) scale = Vector2( 1.79688, 1.28125 ) frames = SubResource( 10 ) animation = "spin" -frame = 6 +frame = 5 playing = true [connection signal="body_entered" from="." to="." method="_on_shards_body_entered"] +[connection signal="shard_collected" from="." to="." method="_on_shard_collected"]