Added locked barriers and a new ghost enemy
This commit is contained in:
21 files changed
+472
-41
No files matched your search
@@ -17,12 +17,12 @@ func _physics_process(_delta: float) -> void:
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node) -> void:
|
||||
if 'player' in body.get_groups():
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_exited(body: Node) -> void:
|
||||
if 'player' in body.get_groups():
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
[ext_resource path="res://Resources/Level_5_Enemy_Glowing_Ghost_Occluder.tres" type="OccluderPolygon2D" id=1]
|
||||
[ext_resource path="res://Sprites/Assets/Light.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Sprites/Enemies/Glowing_Ghost.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Enemies/Glowing Ghost.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Sprites/Enemies/Chasing_Glowing_Ghost.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Enemies/Chasing Glowing Ghost.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=3]
|
||||
radius = 1.5
|
||||
@@ -16,7 +16,7 @@ height = 2.0
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
radius = 50.0
|
||||
|
||||
[node name="Glowing Ghost" type="KinematicBody2D" groups=["enemy"]]
|
||||
[node name="Chasing Glowing Ghost" type="KinematicBody2D" groups=["enemy"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 5
|
||||
script = ExtResource( 4 )
|
||||
@@ -0,0 +1,41 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
const SPEED: int = 35
|
||||
|
||||
export var creepy_hand: PackedScene
|
||||
|
||||
var player: KinematicBody2D = null
|
||||
var velocity: Vector2 = Vector2.ZERO
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
if player:
|
||||
if position.distance_to(player.position) < 40:
|
||||
velocity = position.direction_to(player.position).normalized() * -SPEED
|
||||
elif position.distance_to(player.position) > 41:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_exited(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
|
||||
|
||||
func _on_projectile_timer_timeout() -> void:
|
||||
if player:
|
||||
var projectile: Node = creepy_hand.instance()
|
||||
projectile.init($Sprite.global_position, player.position)
|
||||
get_tree().get_current_scene().get_node('Projectiles').add_child(projectile)
|
||||
return
|
||||
@@ -0,0 +1,82 @@
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://Resources/Level_5_Enemy_Glowing_Ghost_Occluder.tres" type="OccluderPolygon2D" id=1]
|
||||
[ext_resource path="res://Sprites/Assets/Light.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Sprites/Enemies/Creepy_Glowing_Ghost.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Enemies/Creepy Glowing Ghost.gd" type="Script" id=4]
|
||||
[ext_resource path="res://Enemies/Projectiles/Creepy Hand.tscn" type="PackedScene" id=5]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=3]
|
||||
radius = 1.5
|
||||
height = 3.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 3.0
|
||||
height = 2.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
radius = 60.0
|
||||
|
||||
[node name="Creepy Glowing Ghost" type="KinematicBody2D" groups=["enemy"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 5
|
||||
script = ExtResource( 4 )
|
||||
creepy_hand = ExtResource( 5 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
light_mask = 4
|
||||
position = Vector2( 0, -3 )
|
||||
texture = ExtResource( 3 )
|
||||
offset = Vector2( 0, 0.5 )
|
||||
|
||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
light_mask = 0
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["enemy_hitbox"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
visible = false
|
||||
light_mask = 0
|
||||
position = Vector2( 0, -2.5 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Player Detector" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
input_pickable = false
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"]
|
||||
visible = false
|
||||
light_mask = 0
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Light" type="Light2D" parent="."]
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
texture = ExtResource( 2 )
|
||||
color = Color( 0.698039, 0.211765, 0.984314, 0.392157 )
|
||||
energy = 2.0
|
||||
range_item_cull_mask = 11
|
||||
|
||||
[node name="Eyes" type="Light2D" parent="."]
|
||||
scale = Vector2( 0.1, 0.1 )
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( 5, -35 )
|
||||
range_item_cull_mask = 4
|
||||
|
||||
[node name="Occluder" type="LightOccluder2D" parent="."]
|
||||
show_behind_parent = true
|
||||
occluder = ExtResource( 1 )
|
||||
|
||||
[node name="Projectile Timer" type="Timer" parent="."]
|
||||
wait_time = 2.0
|
||||
autostart = true
|
||||
|
||||
[connection signal="body_entered" from="Player Detector" to="." method="_on_player_detector_body_entered"]
|
||||
[connection signal="body_exited" from="Player Detector" to="." method="_on_player_detector_body_exited"]
|
||||
[connection signal="timeout" from="Projectile Timer" to="." method="_on_projectile_timer_timeout"]
|
||||
@@ -0,0 +1,28 @@
|
||||
extends Area2D
|
||||
|
||||
const SPEED: int = 35
|
||||
|
||||
var player_position: Vector2
|
||||
var velocity: Vector2 = Vector2.ZERO
|
||||
|
||||
|
||||
func init(spawn_position: Vector2, shoot_position: Vector2) -> void:
|
||||
position = spawn_position
|
||||
player_position = shoot_position
|
||||
$Sprite.rotation = player_position.angle_to_point(position) + deg2rad(90)
|
||||
return
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
if position.distance_to(player_position) > 1:
|
||||
velocity = position.direction_to(player_position).normalized() * SPEED * delta
|
||||
|
||||
position += velocity
|
||||
return
|
||||
|
||||
|
||||
func _on_tifetime_timeout() -> void:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
@@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Assets/Light.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Enemies/Projectiles/Creepy_Hand.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Enemies/Projectiles/Creepy Hand.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 12.0
|
||||
|
||||
[node name="Creepy Hand" type="Area2D" groups=["enemy_hitbox"]]
|
||||
light_mask = 0
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
input_pickable = false
|
||||
monitoring = false
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
light_mask = 0
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
light_mask = 0
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Light" type="Light2D" parent="."]
|
||||
texture = ExtResource( 1 )
|
||||
texture_scale = 0.3
|
||||
color = Color( 0.698039, 0.211765, 0.984314, 1 )
|
||||
energy = 1.5
|
||||
range_item_cull_mask = 15
|
||||
shadow_item_cull_mask = 0
|
||||
|
||||
[node name="Lifetime" type="Timer" parent="."]
|
||||
wait_time = 2.0
|
||||
one_shot = true
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="Lifetime" to="." method="_on_tifetime_timeout"]
|
||||
@@ -0,0 +1,23 @@
|
||||
extends StaticBody2D
|
||||
|
||||
export var alignment: String = 'V'
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if not alignment in ['V', 'H']:
|
||||
print('Silver Barrier rotation needs to be "V" or "H"')
|
||||
elif alignment == 'H':
|
||||
rotation_degrees = 90
|
||||
return
|
||||
|
||||
|
||||
func _on_unlock_body_entered(body: Node) -> void:
|
||||
if not 'player' in body.get_groups():
|
||||
return
|
||||
|
||||
if body.has_item('Silver Key'):
|
||||
body.remove_item('Silver Key')
|
||||
$Sprite.animation = 'open'
|
||||
$Collision.set_deferred('disabled', true)
|
||||
$Unlock.set_deferred('monitoring', false)
|
||||
return
|
||||
@@ -0,0 +1,51 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Levels/Interactables/Silver_Barrier_Open.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Interactables/Silver_Barrier_Closed.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Levels/Interactables/Silver Barrier.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "open",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "closed",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 6, 8 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
extents = Vector2( 12, 10 )
|
||||
|
||||
[node name="Silver Barrier" type="StaticBody2D"]
|
||||
collision_mask = 0
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Sprite" type="AnimatedSprite" parent="."]
|
||||
light_mask = 8
|
||||
frames = SubResource( 1 )
|
||||
animation = "closed"
|
||||
|
||||
[node name="Collision" type="CollisionShape2D" parent="."]
|
||||
light_mask = 0
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Unlock" type="Area2D" parent="."]
|
||||
light_mask = 0
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
input_pickable = false
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Unlock"]
|
||||
visible = false
|
||||
light_mask = 0
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[connection signal="body_entered" from="Unlock" to="." method="_on_unlock_body_entered"]
|
||||
+30
-9
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=14 format=2]
|
||||
|
||||
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Levels/Level 5.gd" type="Script" id=2]
|
||||
@@ -8,20 +8,25 @@
|
||||
[ext_resource path="res://Music/Level_5.mp3" type="AudioStream" id=6]
|
||||
[ext_resource path="res://GUI/Pause Screen.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://Resources/Level_5_Walls_Tileset.tres" type="TileSet" id=8]
|
||||
[ext_resource path="res://Enemies/Glowing Ghost.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://Enemies/Chasing Glowing Ghost.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://Levels/Traps/Spawn Trap.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://Levels/Interactables/Silver Key Pickup.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://Levels/Interactables/Silver Barrier.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://Enemies/Creepy Glowing Ghost.tscn" type="PackedScene" id=13]
|
||||
|
||||
[node name="Void Level" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||
[node name="Darkness" type="CanvasModulate" parent="."]
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
|
||||
[node name="Floor" type="TileMap" parent="."]
|
||||
self_modulate = Color( 0.627451, 0.627451, 0.627451, 1 )
|
||||
tile_set = ExtResource( 4 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
occluder_light_mask = 0
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -393225, 0, 0, -393224, 0, 1, -393223, 0, 1, -393222, 0, 1, -393221, 0, 1, -393220, 0, 1, -393219, 0, 1, -393218, 0, 1, -393217, 0, 1, -458752, 0, 1, -458751, 0, 1, -458750, 0, 1, -458749, 0, 1, -458748, 0, 1, -458747, 0, 1, -458746, 0, 1, -458745, 0, 1, -458744, 0, 1, -458743, 0, 1, -458742, 0, 1, -458741, 0, 1, -458740, 0, 1, -458739, 0, 1, -458738, 0, 1, -458737, 0, 1, -458736, 0, 1, -458735, 0, 1, -458734, 0, 1, -458733, 0, 1, -458732, 0, 1, -458731, 0, 1, -458730, 0, 1, -458729, 0, 1, -458728, 0, 1, -458727, 0, 1, -458726, 0, 1, -458725, 0, 1, -458724, 0, 1, -458723, 0, 1, -458722, 0, 1, -458721, 0, 1, -458720, 0, 1, -458719, 0, 1, -458718, 0, 1, -458717, 0, 1, -458716, 0, 2, -327689, 0, 65536, -327688, 0, 65537, -327687, 0, 65537, -327686, 0, 65537, -327685, 0, 65537, -327684, 0, 65537, -327683, 0, 65537, -327682, 0, 65537, -327681, 0, 65537, -393216, 0, 65537, -393215, 0, 65537, -393214, 0, 65537, -393213, 0, 65537, -393212, 0, 65537, -393211, 0, 65537, -393210, 0, 65537, -393209, 0, 65537, -393208, 0, 65537, -393207, 0, 65537, -393206, 0, 65537, -393205, 0, 65537, -393204, 0, 65537, -393203, 0, 65537, -393202, 0, 65537, -393201, 0, 65537, -393200, 0, 65537, -393199, 0, 65537, -393198, 0, 65537, -393197, 0, 65537, -393196, 0, 65537, -393195, 0, 65537, -393194, 0, 65537, -393193, 0, 65537, -393192, 0, 65537, -393191, 0, 65537, -393190, 0, 65537, -393189, 0, 65537, -393188, 0, 65537, -393187, 0, 65537, -393186, 0, 65537, -393185, 0, 65537, -393184, 0, 65537, -393183, 0, 65537, -393182, 0, 65537, -393181, 0, 65537, -393180, 0, 65538, -262153, 0, 65536, -262152, 0, 65537, -262151, 0, 65537, -262150, 0, 65537, -262149, 0, 65537, -262148, 0, 65537, -262147, 0, 65537, -262146, 0, 65537, -262145, 0, 65537, -327680, 0, 65537, -327679, 0, 65537, -327678, 0, 65537, -327677, 0, 65537, -327676, 0, 65537, -327675, 0, 65537, -327674, 0, 65537, -327673, 0, 65537, -327672, 0, 65537, -327671, 0, 65537, -327670, 0, 65537, -327669, 0, 65537, -327668, 0, 65537, -327667, 0, 65537, -327666, 0, 65537, -327665, 0, 65537, -327664, 0, 65537, -327663, 0, 65537, -327662, 0, 65537, -327661, 0, 65537, -327660, 0, 65537, -327659, 0, 65537, -327658, 0, 65537, -327657, 0, 65537, -327656, 0, 65537, -327655, 0, 65537, -327654, 0, 65537, -327653, 0, 65537, -327652, 0, 65537, -327651, 0, 65537, -327650, 0, 65537, -327649, 0, 65537, -327648, 0, 65537, -327647, 0, 65537, -327646, 0, 65537, -327645, 0, 65537, -327644, 0, 65538, -196617, 0, 65536, -196616, 0, 65537, -196615, 0, 65537, -196614, 0, 65537, -196613, 0, 65537, -196612, 0, 65537, -196611, 0, 65537, -196610, 0, 65537, -196609, 0, 65537, -262144, 0, 65537, -262143, 0, 65537, -262142, 0, 65537, -262141, 0, 65537, -262140, 0, 65537, -262139, 0, 65537, -262138, 0, 65537, -262137, 0, 65537, -262136, 0, 65537, -262135, 0, 65537, -262134, 0, 65537, -262133, 0, 65537, -262132, 0, 65537, -262131, 0, 65537, -262130, 0, 65537, -262129, 0, 65537, -262128, 0, 65537, -262127, 0, 65537, -262126, 0, 65537, -262125, 0, 65537, -262124, 0, 65537, -262123, 0, 65537, -262122, 0, 65537, -262121, 0, 65537, -262120, 0, 65537, -262119, 0, 65537, -262118, 0, 65537, -262117, 0, 65537, -262116, 0, 65537, -262115, 0, 65537, -262114, 0, 65537, -262113, 0, 65537, -262112, 0, 65537, -262111, 0, 65537, -262110, 0, 65537, -262109, 0, 65537, -262108, 0, 65538, -131081, 0, 65536, -131080, 0, 65537, -131079, 0, 65537, -131078, 0, 65537, -131077, 0, 65537, -131076, 0, 65537, -131075, 0, 65537, -131074, 0, 65537, -131073, 0, 65537, -196608, 0, 65537, -196607, 0, 65537, -196606, 0, 65537, -196605, 0, 65537, -196604, 0, 65537, -196603, 0, 65537, -196602, 0, 65537, -196601, 0, 65537, -196600, 0, 65537, -196599, 0, 65537, -196598, 0, 65537, -196597, 0, 65537, -196596, 0, 65537, -196595, 0, 65537, -196594, 0, 65537, -196593, 0, 65537, -196592, 0, 65537, -196591, 0, 65537, -196590, 0, 65537, -196589, 0, 65537, -196588, 0, 65537, -196587, 0, 65537, -196586, 0, 65537, -196585, 0, 65537, -196584, 0, 65537, -196583, 0, 65537, -196582, 0, 65537, -196581, 0, 65537, -196580, 0, 65537, -196579, 0, 65537, -196578, 0, 65537, -196577, 0, 65537, -196576, 0, 65537, -196575, 0, 65537, -196574, 0, 65537, -196573, 0, 65537, -196572, 0, 65538, -65545, 0, 65536, -65544, 0, 65537, -65543, 0, 65537, -65542, 0, 65537, -65541, 0, 65537, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65537, -131072, 0, 65537, -131071, 0, 65537, -131070, 0, 65537, -131069, 0, 65537, -131068, 0, 65537, -131067, 0, 65537, -131066, 0, 65537, -131065, 0, 65537, -131064, 0, 65537, -131063, 0, 65537, -131062, 0, 65537, -131061, 0, 65537, -131060, 0, 65537, -131059, 0, 65537, -131058, 0, 65537, -131057, 0, 65537, -131056, 0, 65537, -131055, 0, 65537, -131054, 0, 65537, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537Line truncated
|
||||
|
||||
@@ -29,43 +34,59 @@ tile_data = PoolIntArray( -393225, 0, 0, -393224, 0, 1, -393223, 0, 1, -393222,
|
||||
light_mask = 8
|
||||
tile_set = ExtResource( 8 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
collision_mask = 0
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -196589, 0, 0, -196588, 0, 1, -196587, 0, 1, -196586, 0, 1, -196585, 0, 1, -196584, 0, 1, -196583, 0, 2, -131055, 0, 0, -131054, 0, 1, -131053, 0, 131078, -131052, 0, 65541, -131051, 0, 131073, -131050, 0, 131073, -131049, 0, 131073, -131048, 0, 65542, -131047, 0, 65538, -65524, 0, 0, -65523, 0, 1, -65522, 0, 1, -65521, 0, 1, -65520, 0, 1, -65519, 0, 65545, -65518, 0, 131073, -65517, 0, 131073, -65516, 0, 131074, -65512, 0, 65536, -65511, 0, 65538, 12, 0, 65536, 13, 0, 65541, 14, 0, 131073, 15, 0, 131073, 16, 0, 131073, 17, 0, 131074, 24, 0, 65536, 25, 0, 65538, 65548, 0, 65536, 65549, 0, 65538, 65560, 0, 65536, 65561, 0, 65538, 131078, 0, 0, 131079, 0, 1, 131080, 0, 1, 131081, 0, 1, 131082, 0, 1, 131083, 0, 1, 131084, 0, 131078, 131085, 0, 65538, 131089, 0, 3, 131096, 0, 65536, 131097, 0, 65538, 196614, 0, 65536, 196615, 0, 65541, 196616, 0, 131073, 196617, 0, 131073, 196618, 0, 131073, 196619, 0, 131073, 196620, 0, 65542, 196621, 0, 65538, 196625, 0, 65539, 196632, 0, 65536, 196633, 0, 65538, 262150, 0, 65536, 262151, 0, 65538, 262156, 0, 65536, 262157, 0, 65538, 262161, 0, 65539, 262163, 0, 0, 262164, 0, 2, 262167, 0, 0, 262168, 0, 131078, 262169, 0, 65538, 327686, 0, 65536, 327687, 0, 65538, 327692, 0, 65536, 327693, 0, 65538, 327696, 0, 4, 327697, 0, 196615, 327699, 0, 131072, 327700, 0, 65543, 327703, 0, 65536, 327704, 0, 65541, 327705, 0, 131074, 393222, 0, 65536, 393223, 0, 65538, 393228, 0, 65536, 393229, 0, 131077, 393230, 0, 5, 393231, 0, 196609, 393232, 0, 196615, 393236, 0, 131075, 393239, 0, 65536, 393240, 0, 65538, 458758, 0, 131072, 458759, 0, 131074, 458761, 0, 0, 458762, 0, 2, 458764, 0, 131072, 458765, 0, 131073, 458766, 0, 131074, 458774, 0, 0, 458775, 0, 131078, 458776, 0, 65538, 524297, 0, 65536, 524298, 0, 65538, 524309, 0, 0, 524310, 0, 131078, 524311, 0, 65541, 524312, 0, 131074, 589833, 0, 65536, 589834, 0, 131077, 589835, 0, 1, 589836, 0, 1, 589837, 0, 1, 589838, 0, 1, 589839, 0, 1, 589840, 0, 1, 589841, 0, 1, 589842, 0, 1, 589843, 0, 1, 589844, 0, 1, 589845, 0, 131078, 589846, 0, 65541, 589847, 0, 131074, 655369, 0, 131072, 655370, 0, 131073, 655371, 0, 131073, 655372, 0, 131073, 655373, 0, 131073, 655374, 0, 131073, 655375, 0, 131073, 655376, 0, 131073, 655377, 0, 131073, 655378, 0, 131073, 655379, 0, 131073, 655380, 0, 131073, 655381, 0, 131073, 655382, 0, 131074 )
|
||||
tile_data = PoolIntArray( -196589, 0, 0, -196588, 0, 1, -196587, 0, 1, -196586, 0, 1, -196585, 0, 1, -196584, 0, 1, -196583, 0, 2, -131055, 0, 0, -131054, 0, 1, -131053, 0, 131078, -131052, 0, 65541, -131051, 0, 131073, -131050, 0, 131073, -131049, 0, 131073, -131048, 0, 65542, -131047, 0, 65538, -65524, 0, 0, -65523, 0, 1, -65522, 0, 1, -65521, 0, 1, -65520, 0, 1, -65519, 0, 65545, -65518, 0, 131073, -65517, 0, 131073, -65516, 0, 131074, -65512, 0, 65536, -65511, 0, 65538, 12, 0, 65536, 13, 0, 65541, 14, 0, 131073, 15, 0, 131073, 16, 0, 131073, 17, 0, 131074, 24, 0, 65536, 25, 0, 65538, 65548, 0, 65536, 65549, 0, 65538, 65560, 0, 65536, 65561, 0, 65538, 131078, 0, 0, 131079, 0, 1, 131080, 0, 1, 131081, 0, 1, 131082, 0, 1, 131083, 0, 1, 131084, 0, 131078, 131085, 0, 65538, 131089, 0, 3, 131096, 0, 65536, 131097, 0, 65538, 196614, 0, 65536, 196615, 0, 65541, 196616, 0, 131073, 196617, 0, 131073, 196618, 0, 131073, 196619, 0, 131073, 196620, 0, 65542, 196621, 0, 65538, 196625, 0, 65539, 196632, 0, 65536, 196633, 0, 65538, 262150, 0, 65536, 262151, 0, 65538, 262156, 0, 65536, 262157, 0, 65538, 262161, 0, 65539, 262163, 0, 0, 262164, 0, 2, 262167, 0, 0, 262168, 0, 131078, 262169, 0, 65538, 327686, 0, 65536, 327687, 0, 65538, 327692, 0, 65536, 327693, 0, 65538, 327696, 0, 4, 327697, 0, 196615, 327699, 0, 131072, 327700, 0, 65543, 327703, 0, 65536, 327704, 0, 65541, 327705, 0, 131074, 393222, 0, 65536, 393223, 0, 65538, 393228, 0, 65536, 393229, 0, 131077, 393230, 0, 5, 393231, 0, 196609, 393232, 0, 196615, 393236, 0, 131075, 393239, 0, 65536, 393240, 0, 65538, 458755, 0, 0, 458756, 0, 2, 458758, 0, 65536, 458759, 0, 65538, 458761, 0, 0, 458762, 0, 2, 458764, 0, 131072, 458765, 0, 131073, 458766, 0, 131074, 458774, 0, 0, 458775, 0, 131078, 458776, 0, 65538, 524291, 0, 65536, 524292, 0, 65538, 524294, 0, 65536, 524295, 0, 65538, 524297, 0, 65536, 524298, 0, 65538, 524309, 0, 0, 524310, 0, 131078, 524311, 0, 65541, 524312, 0, 131074, 589827, 0, 65536, 589828, 0, 65538, 589830, 0, 131072, 589831, 0, 131074, 589833, 0, 65536, 589834, 0, 131077, 589835, 0, 1, 589836, 0, 1, 589837, 0, 1, 589838, 0, 1, 589839, 0, 1, 589840, 0, 1, 589841, 0, 1, 589842, 0, 1, 589843, 0, 1, 589844, 0, 1, 589845, 0, 131078, 589846, 0, 65541, 589847, 0, 131074, 655363, 0, 65536, 655364, 0, 65538, 655369, 0, 65536, 655370, 0, 65541, 655371, 0, 131073, 655372, 0, 131073, 655373, 0, 131073, 655374, 0, 131073, 655375, 0, 131073, 655376, 0, 131073, 655377, 0, 131073, 655378, 0, 131073, 655379, 0, 131073, 655380, 0, 131073, 655381, 0, 131073, 655382, 0, 131074, 720899, 0, 65536, 720900, 0, 65538, 720905, 0, 65536, 720906, 0, 65538, 786435, 0, 65536, 786436, 0, 65538, 786441, 0, 65536, 786442, 0, 65538, 851971, 0, 65536, 851972, 0, 65538, 851977, 0, 65536, 851978, 0, 65538, 917507, 0, 65536, 917508, 0, 65538, 917513, 0, 65536, 917514, 0, 65538, 983043, 0, 65536, 983044, 0, 131077, 983045, 0, 1, 983046, 0, 1, 983047, 0, 1, 983048, 0, 1, 983049, 0, 131078, 983050, 0, 65538, 1048579, 0, 131072, 1048580, 0, 131073, 1048581, 0, 131073, 1048582, 0, 131073, 1048583, 0, 131073, 1048584, 0, 131073, 1048585, 0, 131073, 1048586, 0, 131074 )
|
||||
|
||||
[node name="YSort" type="YSort" parent="."]
|
||||
|
||||
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
|
||||
position = Vector2( 160, 90 )
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="YSort/Player"]
|
||||
[node name="Camera" type="Camera2D" parent="YSort/Player"]
|
||||
current = true
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="YSort/Player"]
|
||||
[node name="Light" type="Light2D" parent="YSort/Player"]
|
||||
texture = ExtResource( 5 )
|
||||
range_item_cull_mask = 15
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="Enemies" type="YSort" parent="YSort"]
|
||||
|
||||
[node name="Glowing Ghost 0" parent="YSort/Enemies" instance=ExtResource( 9 )]
|
||||
[node name="Chasing Glowing Ghost 0" parent="YSort/Enemies" instance=ExtResource( 9 )]
|
||||
position = Vector2( 281, 109 )
|
||||
|
||||
[node name="Glowing Ghost 1" parent="YSort/Enemies" instance=ExtResource( 9 )]
|
||||
[node name="Chasing Glowing Ghost 1" parent="YSort/Enemies" instance=ExtResource( 9 )]
|
||||
position = Vector2( 328.5, 20 )
|
||||
|
||||
[node name="Creepy Glowing Ghost 00" parent="YSort/Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 310, 40 )
|
||||
|
||||
[node name="Creepy Glowing Ghost 01" parent="YSort/Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 90, 175 )
|
||||
|
||||
[node name="Creepy Glowing Ghost 02" parent="YSort/Enemies" instance=ExtResource( 13 )]
|
||||
position = Vector2( 100, 220 )
|
||||
|
||||
[node name="Interactables" type="Node2D" parent="."]
|
||||
|
||||
[node name="Silver Key Pickup" parent="Interactables" instance=ExtResource( 11 )]
|
||||
position = Vector2( 240, 80 )
|
||||
|
||||
[node name="Silver Barrier" parent="Interactables" instance=ExtResource( 12 )]
|
||||
position = Vector2( 136, 120 )
|
||||
alignment = "H"
|
||||
|
||||
[node name="Traps" type="Node2D" parent="."]
|
||||
|
||||
[node name="Spawn Trap" parent="Traps" instance=ExtResource( 10 )]
|
||||
position = Vector2( 256, 16 )
|
||||
enemy_path = "res://Enemies/Glowing Ghost.tscn"
|
||||
enemy_path = "res://Enemies/Chasing Glowing Ghost.tscn"
|
||||
relative_x_tiles = -1
|
||||
relative_y_tiles = 2
|
||||
|
||||
[node name="Projectiles" type="Node2D" parent="."]
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="Pause Screen" parent="." instance=ExtResource( 7 )]
|
||||
|
||||
+18
-23
@@ -3,43 +3,38 @@ extends Node
|
||||
signal update_currency(amount)
|
||||
|
||||
var __currency: int
|
||||
|
||||
var __weapons: Array
|
||||
var __accessories: Array
|
||||
var __categories: Dictionary
|
||||
var __items: Array
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
self.__currency = 100
|
||||
|
||||
self.__weapons = []
|
||||
self.__accessories = []
|
||||
self.__categories = {
|
||||
'Weapon': self.__weapons,
|
||||
'Accessory': self.__accessories}
|
||||
__currency = 100
|
||||
__items = []
|
||||
return
|
||||
|
||||
|
||||
func get_currency() -> int:
|
||||
return self.__currency
|
||||
return __currency
|
||||
|
||||
|
||||
func add_currency(amount: int) -> void:
|
||||
self.__currency += amount
|
||||
emit_signal('update_currency', self.__currency)
|
||||
__currency += amount
|
||||
emit_signal('update_currency', __currency)
|
||||
return
|
||||
|
||||
|
||||
func add(item) -> void:
|
||||
self.__categories[item.type].append(item)
|
||||
func contains(item: String) -> bool:
|
||||
if item in __items:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func add(item: String) -> void:
|
||||
__items.append(item)
|
||||
return
|
||||
|
||||
|
||||
func discard(item) -> void:
|
||||
var index: int = 0
|
||||
for itr in self.__categories[item.type]:
|
||||
if itr.equals(item):
|
||||
self.__categories[item.type].remove(index)
|
||||
break
|
||||
index += 1
|
||||
func remove(item: String) -> void:
|
||||
for k in range(len(__items)):
|
||||
if __items[k] == item:
|
||||
__items.remove(k)
|
||||
return
|
||||
+10
-1
@@ -45,8 +45,17 @@ func add_currency(amount: int) -> void:
|
||||
return
|
||||
|
||||
|
||||
func has_item(item: String) -> bool:
|
||||
return $Inventory.contains(item)
|
||||
|
||||
|
||||
func add_item(item: String) -> void:
|
||||
print('%s added to inventory' % [item])
|
||||
$Inventory.add(item)
|
||||
return
|
||||
|
||||
|
||||
func remove_item(item: String) -> void:
|
||||
$Inventory.remove(item)
|
||||
return
|
||||
|
||||
|
||||
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 141 B |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Chasing_Glowing_Ghost.png-058a2155c6f21646fb4dbe49b2572e1a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Enemies/Chasing_Glowing_Ghost.png"
|
||||
dest_files=[ "res://.import/Chasing_Glowing_Ghost.png-058a2155c6f21646fb4dbe49b2572e1a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=2
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=0
|
||||
process/fix_alpha_border=false
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 141 B |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Creepy_Glowing_Ghost.png-a6711d66d268c21b09d75a78af11cb3c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Enemies/Creepy_Glowing_Ghost.png"
|
||||
dest_files=[ "res://.import/Creepy_Glowing_Ghost.png-a6711d66d268c21b09d75a78af11cb3c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=2
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=false
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 162 B |
+3
-3
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Glowing_Ghost.png-46379ff53bc263370d2e0d62c670229c.stex"
|
||||
path="res://.import/Creepy_Hand.png-08a92e3a11f7b6f5409d8d2c9c2390a5.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Enemies/Glowing_Ghost.png"
|
||||
dest_files=[ "res://.import/Glowing_Ghost.png-46379ff53bc263370d2e0d62c670229c.stex" ]
|
||||
source_file="res://Sprites/Enemies/Projectiles/Creepy_Hand.png"
|
||||
dest_files=[ "res://.import/Creepy_Hand.png-08a92e3a11f7b6f5409d8d2c9c2390a5.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 171 B |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Silver_Barrier_Closed.png-f21af0f8676e345e4c4665869fd9b81c.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Interactables/Silver_Barrier_Closed.png"
|
||||
dest_files=[ "res://.import/Silver_Barrier_Closed.png-f21af0f8676e345e4c4665869fd9b81c.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=2
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=0
|
||||
process/fix_alpha_border=false
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 127 B |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Silver_Barrier_Open.png-98c2210bfdfd797f9554a71cb67cfeee.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Interactables/Silver_Barrier_Open.png"
|
||||
dest_files=[ "res://.import/Silver_Barrier_Open.png-98c2210bfdfd797f9554a71cb67cfeee.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=2
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=0
|
||||
process/fix_alpha_border=false
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
Reference in new issue
Block a user