fixed issue #138

This commit is contained in:
pennyrigate 2023-06-30 18:38:57 -04:00
parent 15375271f6
commit 7ea93b421f
2 changed files with 2 additions and 17 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=32 format=2] [gd_scene load_steps=30 format=2]
[ext_resource path="res://objects/enemy/squig.tscn" type="PackedScene" id=1] [ext_resource path="res://objects/enemy/squig.tscn" type="PackedScene" id=1]
[ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2] [ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2]
@ -22,7 +22,6 @@
[ext_resource path="res://graphics/enemy/sawblade.png" type="Texture" id=21] [ext_resource path="res://graphics/enemy/sawblade.png" type="Texture" id=21]
[ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=22] [ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=22]
[ext_resource path="res://objects/enemy/steam.tscn" type="PackedScene" id=23] [ext_resource path="res://objects/enemy/steam.tscn" type="PackedScene" id=23]
[ext_resource path="res://objects/enemy/eel.tscn" type="PackedScene" id=24]
[ext_resource path="res://objects/enemy/cop.tscn" type="PackedScene" id=25] [ext_resource path="res://objects/enemy/cop.tscn" type="PackedScene" id=25]
[ext_resource path="res://objects/environment/turret/turret_bullet.tscn" type="PackedScene" id=26] [ext_resource path="res://objects/environment/turret/turret_bullet.tscn" type="PackedScene" id=26]
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=27] [ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=27]
@ -48,11 +47,6 @@ animations = [ {
"speed": 20.0 "speed": 20.0
} ] } ]
[sub_resource type="Curve2D" id=8]
_data = {
"points": PoolVector2Array( -8.02293, 7.78696, 8.02293, -7.78696, 152, 32, -3.00339, -17.0192, 3.00339, 17.0192, 184, 24, -7.90495, -7.66898, 7.90495, 7.66898, 200, 32, 7.81354, -7.68111, -7.81354, 7.68111, 200, 72, 7.68111, 7.81354, -7.68111, -7.81354, 152, 72, -7.66898, 8.02293, 7.66898, -8.02293, 152, 32 )
}
[node name="Map2" type="Node2D" groups=["map"]] [node name="Map2" type="Node2D" groups=["map"]]
pause_mode = 1 pause_mode = 1
script = ExtResource( 11 ) script = ExtResource( 11 )
@ -137,7 +131,6 @@ position = Vector2( 48, 120 )
[node name="AnimatedSprite" parent="RollingFiend" index="0"] [node name="AnimatedSprite" parent="RollingFiend" index="0"]
visible = false visible = false
frame = 1
[node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"] [node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"]
material = SubResource( 4 ) material = SubResource( 4 )
@ -152,9 +145,6 @@ position = Vector2( 27, 128 )
[node name="StaticBody2D" type="StaticBody2D" parent="."] [node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
polygon = PoolVector2Array( 136, 176, 144, 160, 160, 160, 168, 176 )
[node name="Hatch" parent="." instance=ExtResource( 14 )] [node name="Hatch" parent="." instance=ExtResource( 14 )]
position = Vector2( 40, 120 ) position = Vector2( 40, 120 )
@ -215,9 +205,4 @@ left_up_boundary = 2.0
right_down_boundary = 4.0 right_down_boundary = 4.0
speed = 10 speed = 10
[node name="Eel" parent="." instance=ExtResource( 24 )]
position = Vector2( -64, 104 )
curve = SubResource( 8 )
segments = 8
[editable path="RollingFiend"] [editable path="RollingFiend"]

View file

@ -16,7 +16,7 @@ func _process(delta):
if not is_instance_valid(player): if not is_instance_valid(player):
player = get_tree().get_nodes_in_group("player").pop_front() player = get_tree().get_nodes_in_group("player").pop_front()
else: else:
var current_sector = Game.get_sector(player.global_position + Vector2(0.0, -10.0)) var current_sector = Game.get_sector(player.global_position + Vector2(0.0, -5.0))
if scroll_h && current_sector.x != last_sector.x: if scroll_h && current_sector.x != last_sector.x:
position.x = current_sector.x * Game.resolution.x position.x = current_sector.x * Game.resolution.x
if respawn_h: if respawn_h: