More file reorganizing and fixed some inconsistencies
This commit is contained in:
@@ -8,7 +8,7 @@ extends Node2D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -17,8 +17,8 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _on_AnimationPlayer_animation_finished(anim_name: String) -> void:
|
||||
$GemSprite.visible = false
|
||||
$GemSprite.visible = false
|
||||
|
||||
|
||||
func _on_AnimationPlayer_animation_started(anim_name: String) -> void:
|
||||
$GemSprite.visible = true
|
||||
$GemSprite.visible = true
|
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Assets/resources_basic.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Levels/Objects/Gem.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Sprites/Assets/Resources_Basic.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Levels/Interactables/Gem.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
resource_name = "rise"
|
@@ -13,7 +13,7 @@ signal gem_collected
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -22,12 +22,12 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _on_Player_Detector_area_entered(area: Area2D) -> void:
|
||||
if area.get_parent().name == 'Player':
|
||||
if is_opened == false:
|
||||
$chestClosed.visible = false
|
||||
$chestOpened.visible = true
|
||||
$Gem.visible = true
|
||||
$Gem/AnimationPlayer.play("rise")
|
||||
is_opened = true
|
||||
has_gem = false
|
||||
emit_signal("gem_collected")
|
||||
if area.get_parent().name == 'Player':
|
||||
if is_opened == false:
|
||||
$chestClosed.visible = false
|
||||
$chestOpened.visible = true
|
||||
$Gem.visible = true
|
||||
$Gem/AnimationPlayer.play('rise')
|
||||
is_opened = true
|
||||
has_gem = false
|
||||
emit_signal('gem_collected')
|
@@ -1,9 +1,9 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Levels/Interactables/treasureChestOpen.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Interactables/treasureChest.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Levels/Objects/Gem.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Levels/Objects/TreasureChest.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Sprites/Levels/Interactables/Treasure_Chest_Open.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Interactables/Treasure_Chest_Closed.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Levels/Interactables/Gem.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Levels/Interactables/Treasure Chest.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 21.3333, 17.3333 )
|
@@ -1,25 +1,25 @@
|
||||
[gd_scene load_steps=31 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_12.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_12.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Enemies/Hellhound.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_3.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_9.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_03.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_09.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Levels/Objects/Door.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_10.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_4.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_6.png" type="Texture" id=8]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_10.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_04.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_06.png" type="Texture" id=8]
|
||||
[ext_resource path="res://Levels/Level 4.gd" type="Script" id=9]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_1.png" type="Texture" id=10]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_13.png" type="Texture" id=11]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_14.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_11.png" type="Texture" id=13]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_8.png" type="Texture" id=14]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_01.png" type="Texture" id=10]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_13.png" type="Texture" id=11]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_14.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_11.png" type="Texture" id=13]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_08.png" type="Texture" id=14]
|
||||
[ext_resource path="res://Resources/Level_4_Tileset.tres" type="TileSet" id=15]
|
||||
[ext_resource path="res://Levels/Objects/TreasureChest.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_2.png" type="Texture" id=17]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_7.png" type="Texture" id=18]
|
||||
[ext_resource path="res://Sprites/Assets/transparent16x16.png" type="Texture" id=19]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_5.png" type="Texture" id=20]
|
||||
[ext_resource path="res://Levels/Interactables/Treasure Chest.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_02.png" type="Texture" id=17]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_07.png" type="Texture" id=18]
|
||||
[ext_resource path="res://Sprites/Assets/Transparent_16x16.png" type="Texture" id=19]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_05.png" type="Texture" id=20]
|
||||
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=21]
|
||||
[ext_resource path="res://GUI/Pause Screen.tscn" type="PackedScene" id=22]
|
||||
[ext_resource path="res://GUI/HUD.tscn" type="PackedScene" id=23]
|
||||
@@ -86,21 +86,21 @@ tile_data = PoolIntArray( -2359292, 0, 5, -2359291, 0, 196610, -2359290, 0, 1966
|
||||
[node name="Fire3" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -607.628, -210.601 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 1
|
||||
frame = 2
|
||||
playing = true
|
||||
offset = Vector2( 679.819, 333.222 )
|
||||
|
||||
[node name="Fire2" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -543.25, -212.563 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 4
|
||||
frame = 5
|
||||
playing = true
|
||||
offset = Vector2( 679.819, 333.222 )
|
||||
|
||||
[node name="Fire1" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -479.806, -214.167 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 11
|
||||
frame = 12
|
||||
playing = true
|
||||
offset = Vector2( 679.819, 333.222 )
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Levels/Objects/DoorOpen.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Objects/DoorClosed.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Sprites/Levels/Objects/Gate_Open.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Objects/Gate_Closed.png" type="Texture" id=2]
|
||||
|
||||
[node name="Door" type="Sprite"]
|
||||
|
||||
|
Reference in New Issue
Block a user