Added win condition for level 1 and added boss fight for level 5

This commit is contained in:
VoidTwo
2021-12-10 14:23:23 -06:00
parent 3c880d1566
commit e5aafa6cd0
74 changed files with 791 additions and 1300 deletions

View File

@@ -23,6 +23,6 @@ func _physics_process(delta: float) -> void:
return
func _on_tifetime_timeout() -> void:
func _on_lifetime_timeout() -> void:
call_deferred('queue_free')
return

View File

@@ -7,15 +7,13 @@
[sub_resource type="CircleShape2D" id=1]
radius = 12.0
[node name="Creepy Hand" type="Area2D" groups=[
"enemy_projectile_1",
]]
[node name="Creepy Hand" type="Area2D" groups=["enemy_projectile_1"]]
light_mask = 0
scale = Vector2( 0.5, 0.5 )
input_pickable = false
monitoring = false
collision_layer = 0
collision_mask = 2
input_pickable = false
monitoring = false
script = ExtResource( 3 )
[node name="Sprite" type="Sprite" parent="."]
@@ -40,4 +38,4 @@ wait_time = 2.0
one_shot = true
autostart = true
[connection signal="timeout" from="Lifetime" to="." method="_on_tifetime_timeout"]
[connection signal="timeout" from="Lifetime" to="." method="_on_lifetime_timeout"]

View File

@@ -0,0 +1,21 @@
extends Area2D
const SPEED: int = 60
var velocity: Vector2 = Vector2.ZERO
func init(spawn_position: Vector2, shoot_position: Vector2) -> void:
position = spawn_position
velocity = position.direction_to(shoot_position).normalized() * SPEED
return
func _physics_process(delta: float) -> void:
position += velocity * delta
return
func _on_lifetime_timeout() -> void:
call_deferred('queue_free')
return

View File

@@ -0,0 +1,40 @@
[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/Glowing_Blue_Fireball.png" type="Texture" id=2]
[ext_resource path="res://Enemies/Projectiles/Glowing Blue Fireball.gd" type="Script" id=3]
[sub_resource type="CircleShape2D" id=1]
radius = 12.0
[node name="Glowing Blue Fireball" type="Area2D" groups=["enemy_projectile_1"]]
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="."]
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.211765, 0.964706, 0.984314, 1 )
energy = 1.5
range_item_cull_mask = 15
shadow_item_cull_mask = 0
[node name="Lifetime" type="Timer" parent="."]
wait_time = 3.0
one_shot = true
autostart = true
[connection signal="timeout" from="Lifetime" to="." method="_on_lifetime_timeout"]

View File

@@ -16,6 +16,6 @@ func _physics_process(delta: float) -> void:
return
func _on_tifetime_timeout() -> void:
func _on_lifetime_timeout() -> void:
call_deferred('queue_free')
return

View File

@@ -37,4 +37,4 @@ wait_time = 1.5
one_shot = true
autostart = true
[connection signal="timeout" from="Lifetime" to="." method="_on_tifetime_timeout"]
[connection signal="timeout" from="Lifetime" to="." method="_on_lifetime_timeout"]