0d2bccc3a9
Removed the stomp-kill from walker.gd: landing on an enemy now just costs a heart like any other contact, so the only way past is to weave through the pattern or use the key throw + W warp. Enemies fire a fan of bullets every fire_interval whose directions are computed only from the facing and the exported spread, never from the player, so every volley traces the identical path and can be memorised. Bullets are code-generated circles (no art needed), die on hitting terrain via a probe raycast, and are freed after their lifetime. New laser prefab cycles wait -> blinking warmup -> firing, and only damages during the firing phase.
20 lines
564 B
Plaintext
20 lines
564 B
Plaintext
[gd_scene load_steps=3 format=3]
|
|
|
|
[ext_resource type="Script" path="res://scripts/laser.gd" id="1_laser"]
|
|
|
|
[sub_resource type="RectangleShape2D" id="Shape_laser"]
|
|
size = Vector2(90, 6)
|
|
|
|
[node name="Laser" type="Area2D" groups=["hazard"]]
|
|
collision_layer = 4
|
|
collision_mask = 2
|
|
script = ExtResource("1_laser")
|
|
|
|
[node name="Beam" type="Polygon2D" parent="."]
|
|
color = Color(1, 0.25, 0.25, 1)
|
|
polygon = PackedVector2Array(0, -3, 90, -3, 90, 3, 0, 3)
|
|
|
|
[node name="HitBox" type="CollisionShape2D" parent="."]
|
|
position = Vector2(45, 0)
|
|
shape = SubResource("Shape_laser")
|