forked from team-sg/hero-mark-2
fixed collapse bug
This commit is contained in:
parent
4b7db186c7
commit
398e39ff1b
7 changed files with 103 additions and 46 deletions
Binary file not shown.
BIN
graphics/npc/intelli_head.png
Normal file
BIN
graphics/npc/intelli_head.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 234 B |
35
graphics/npc/intelli_head.png.import
Normal file
35
graphics/npc/intelli_head.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/intelli_head.png-9f4bf937d24c38cc981e0b0aff9115cf.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/npc/intelli_head.png"
|
||||
dest_files=[ "res://.import/intelli_head.png-9f4bf937d24c38cc981e0b0aff9115cf.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
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=true
|
||||
svg/scale=1.0
|
Binary file not shown.
Before Width: | Height: | Size: 301 B |
|
@ -15,7 +15,7 @@
|
|||
[ext_resource path="res://objects/environment/death tile/death_tile.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://tilesets/t_ladders.tres" type="TileSet" id=14]
|
||||
[ext_resource path="res://objects/enemy/boss/2600.tscn" type="PackedScene" id=15]
|
||||
[ext_resource path="res://objects/enemy/boss/collapse_blocks.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=16]
|
||||
|
||||
[node name="Map" type="Node2D" groups=["map"]]
|
||||
pause_mode = 1
|
||||
|
@ -35,17 +35,16 @@ __meta__ = {
|
|||
[node name="Ground" type="Node2D" parent="."]
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="Ground"]
|
||||
visible = false
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 8, 8 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65535, 0, 0, 131071, 0, 0, 196607, 0, 0, 262143, 0, 0, 327679, 0, 0, 393215, 0, 0, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 458751, 0, 0, 524287, 0, 0, 458763, 0, 131074, 458764, 0, 131074, 458765, 0, 131074, 458766, 0, 131074, 589823, 0, 0, 524298, 0, 131074, 524299, 0, 131074, 524300, 0, 131074, 524301, 0, 131074, 524302, 0, 131074, 655359, 0, 0, 589829, 0, 0, 589830, 0, 0, 589834, 0, 0, 589839, 0, 131074, 589840, 0, 131074, 720895, 0, 0, 655376, 0, 131074, 786431, 0, 0, 720909, 0, 131074, 720910, 0, 131074, 720911, 0, 131074, 720912, 0, 131074, 851967, 0, 0, 786447, 0, 131074, 917503, 0, 0, 851972, 0, 0, 851973, 0, 0, 851974, 0, 0, 851977, 0, 0, 851978, 0, 0, 851979, 0, 0, 983039, 0, 0, 917504, 0, 0, 1048575, 0, 0, 983040, 0, 0, 1114111, 0, 0, 1048576, 0, 0, 1048577, 0, 0, 1048583, 0, 131074, 1179647, 0, 0, 1114112, 0, 0, 1114113, 0, 0, 1114114, 0, 0, 1114119, 0, 131074, 1245183, 0, 0, 1179650, 0, 0, 1179651, 0, 0, 1179654, 0, 0, 1179655, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1310719, 0, 0, 1376255, 0, 0, 1310734, 0, 0, 1310735, 0, 0, 1441791, 0, 0, 1507327, 0, 0, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 3, 1572863, 0, 0, 1507328, 0, 65536, 1507329, 0, 0, 1507330, 0, 65536, 1507331, 0, 0, 1507332, 0, 65536, 1507333, 0, 0, 1507334, 0, 65536, 1507335, 0, 0, 1507336, 0, 65536, 1507337, 0, 0, 1507338, 0, 65536, 1507339, 0, 0, 1507340, 0, 65536, 1507341, 0, 0, 1507342, 0, 65536, 1507343, 0, 0, 1507344, 0, 65536, 1507345, 0, 0, 1507346, 0, 65536, 1507347, 0, 0, 1507348, 0, 65536, 1507349, 0, 0, 1507350, 0, 65536, 1507351, 0, 0, 1507352, 0, 65536, 1507353, 0, 0, 1507354, 0, 65536, 1507355, 0, 0, 1507356, 0, 65536, 1507357, 0, 0, 1507358, 0, 65536, 1507359, 0, 0 )
|
||||
tile_data = PoolIntArray( 65535, 0, 0, 131071, 0, 0, 196607, 0, 0, 262143, 0, 0, 327679, 0, 0, 393215, 0, 0, 327692, 0, 0, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 458751, 0, 0, 524287, 0, 0, 458763, 0, 131074, 458764, 0, 131074, 458765, 0, 131074, 458766, 0, 131074, 589823, 0, 0, 524298, 0, 131074, 524299, 0, 131074, 524300, 0, 131074, 524301, 0, 131074, 524302, 0, 131074, 655359, 0, 0, 589829, 0, 0, 589830, 0, 0, 589833, 0, 0, 589839, 0, 131074, 589840, 0, 131074, 720895, 0, 0, 655376, 0, 131074, 786431, 0, 0, 720909, 0, 131074, 720910, 0, 131074, 720911, 0, 131074, 720912, 0, 131074, 851967, 0, 0, 786447, 0, 131074, 917503, 0, 0, 851971, 0, 0, 851972, 0, 0, 851973, 0, 0, 851974, 0, 0, 851977, 0, 0, 851978, 0, 0, 851979, 0, 0, 983039, 0, 0, 1048575, 0, 0, 983040, 0, 0, 1114111, 0, 0, 1048576, 0, 0, 1048577, 0, 0, 1048583, 0, 131074, 1179647, 0, 0, 1114112, 0, 0, 1114113, 0, 0, 1114114, 0, 0, 1114119, 0, 131074, 1245183, 0, 0, 1179650, 0, 0, 1179651, 0, 0, 1179652, 0, 0, 1179653, 0, 0, 1179654, 0, 0, 1179655, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1310719, 0, 0, 1376255, 0, 0, 1310734, 0, 0, 1310735, 0, 0, 1441791, 0, 0, 1507327, 0, 0, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 3, 1572863, 0, 0, 1507328, 0, 65536, 1507329, 0, 0, 1507330, 0, 65536, 1507331, 0, 0, 1507332, 0, 65536, 1507333, 0, 0, 1507334, 0, 65536, 1507335, 0, 0, 1507336, 0, 65536, 1507337, 0, 0, 1507338, 0, 65536, 1507339, 0, 0, 1507340, 0, 65536, 1507341, 0, 0, 1507342, 0, 65536, 1507343, 0, 0, 1507344, 0, 65536, 1507345, 0, 0, 1507346, 0, 65536, 1507347, 0, 0, 1507348, 0, 65536, 1507349, 0, 0, 1507350, 0, 65536, 1507351, 0, 0, 1507352, 0, 65536, 1507353, 0, 0, 1507354, 0, 65536, 1507355, 0, 0, 1507356, 0, 65536, 1507357, 0, 0, 1507358, 0, 65536, 1507359, 0, 0 )
|
||||
|
||||
[node name="Collapse" type="TileMap" parent="Ground" groups=["delete_on_collapse"]]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 8, 8 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 851975, 0, 0, 851976, 0, 0, 1179652, 0, 0, 1179653, 0, 0 )
|
||||
tile_data = PoolIntArray( 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589831, 0, 0, 589832, 0, 0, 851975, 0, 0, 851976, 0, 0 )
|
||||
|
||||
[node name="Ladder" type="TileMap" parent="Ground"]
|
||||
tile_set = ExtResource( 14 )
|
||||
|
@ -53,11 +52,18 @@ cell_size = Vector2( 8, 8 )
|
|||
format = 1
|
||||
tile_data = PoolIntArray( 655372, 0, 196609, 720908, 0, 196609, 786444, 0, 196609, 851980, 0, 196609 )
|
||||
|
||||
[node name="Death" type="TileMap" parent="Ground" groups=["death"]]
|
||||
tile_set = ExtResource( 16 )
|
||||
cell_size = Vector2( 8, 8 )
|
||||
collision_layer = 32
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 1048578, 1, 0, 1114118, 1, 0, 1179658, -1610612735, 0 )
|
||||
|
||||
[node name="FallingBlock" parent="Ground" instance=ExtResource( 3 )]
|
||||
position = Vector2( 96, 152 )
|
||||
|
||||
[node name="FallingBlock3" parent="Ground" instance=ExtResource( 3 )]
|
||||
position = Vector2( 72, 40 )
|
||||
position = Vector2( 64, 40 )
|
||||
|
||||
[node name="FallingBlock5" parent="Ground" instance=ExtResource( 3 )]
|
||||
position = Vector2( 8, 56 )
|
||||
|
@ -72,9 +78,6 @@ speed = 40
|
|||
left_up_boundary = 2.0
|
||||
right_down_boundary = 2.0
|
||||
|
||||
[node name="CollapseBlocks" parent="Ground" instance=ExtResource( 16 )]
|
||||
visible = false
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 2 )]
|
||||
position = Vector2( 24, 176 )
|
||||
use_iframes = true
|
||||
|
|
|
@ -14,13 +14,11 @@ onready var shoot_timer = $ShootTimer
|
|||
onready var anims = $AnimationPlayer
|
||||
onready var head_sprite = $Body/Head
|
||||
|
||||
#func _ready():
|
||||
# for node in get_tree().get_nodes_in_group("collapse_block"):
|
||||
# if node.has_method("_on_collapse"):
|
||||
# connect("collapse", node, "_on_collapse")
|
||||
|
||||
func _on_ShootTimer_timeout():
|
||||
if can_shoot:
|
||||
if can_shoot: shoot()
|
||||
|
||||
func shoot():
|
||||
Audio.play_sound(Audio.a_bullet_barrage,Audio.ac_boss)
|
||||
for pos in positions.get_children():
|
||||
var bullet = Bullet.instance()
|
||||
|
@ -30,8 +28,12 @@ func _on_ShootTimer_timeout():
|
|||
get_parent().add_child(bullet)
|
||||
shoot_timer.wait_time = fire_rate
|
||||
|
||||
func _play_laser_sound():
|
||||
func _play_laser_sound(play: bool):
|
||||
if play:
|
||||
Audio.play_sound(Audio.a_rainbow_laser,Audio.ac_boss)
|
||||
else:
|
||||
Audio.ac_boss.playing = false
|
||||
|
||||
|
||||
func die():
|
||||
hp -= 1
|
||||
|
@ -45,6 +47,7 @@ func die():
|
|||
shot_speed = 70
|
||||
fire_rate = 0.8
|
||||
emit_signal("entered_phase", 3)
|
||||
$Body/Head/Intelli.visible = true
|
||||
head_sprite.texture = load("res://graphics/enemy/boss/stg2600_head_broken.png")
|
||||
0:
|
||||
queue_free()
|
||||
|
|
|
@ -43,7 +43,7 @@ tracks/1/loop_wrap = true
|
|||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/keys = {
|
||||
"times": PoolRealArray( 0, 1.5, 5.5 ),
|
||||
"times": PoolRealArray( 0, 1.3, 3.1 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true, true ]
|
||||
|
@ -55,7 +55,7 @@ tracks/2/loop_wrap = true
|
|||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/keys = {
|
||||
"times": PoolRealArray( 0, 1.5, 1.6, 5.5, 5.6, 5.9 ),
|
||||
"times": PoolRealArray( 0, 1.3, 1.4, 3.1, 3.2, 3.5 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ 0.0, 15.0, 15.0, -15.0, -15.0, 0.0 ]
|
||||
|
@ -67,10 +67,10 @@ tracks/3/loop_wrap = true
|
|||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/keys = {
|
||||
"times": PoolRealArray( 0, 1.5, 1.6 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
"times": PoolRealArray( 0, 1.3, 1.4, 3.1, 3.2 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 13.4376, 1 ), Vector2( 0, 1 ), Vector2( 14, 1 ) ]
|
||||
"values": [ Vector2( 13.4376, 1 ), Vector2( 14, 0 ), Vector2( 14, 1 ), Vector2( 14, 1 ), Vector2( 14, 0 ) ]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/path = NodePath("Body/Head/Beam:position")
|
||||
|
@ -79,10 +79,10 @@ tracks/4/loop_wrap = true
|
|||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/keys = {
|
||||
"times": PoolRealArray( 0, 5.5, 5.6, 5.9 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"times": PoolRealArray( 0, 3.1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( -70, -8 ), Vector2( -70, -8 ), Vector2( -500, -8 ), Vector2( -500, -8 ) ]
|
||||
"values": [ Vector2( -70, -8 ), Vector2( -70, -8 ) ]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/path = NodePath(".:can_shoot")
|
||||
|
@ -91,7 +91,7 @@ tracks/5/loop_wrap = true
|
|||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/keys = {
|
||||
"times": PoolRealArray( 0, 5.9 ),
|
||||
"times": PoolRealArray( 0, 3.5 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ false, true ]
|
||||
|
@ -115,10 +115,10 @@ tracks/7/loop_wrap = true
|
|||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/keys = {
|
||||
"times": PoolRealArray( 0, 1.5 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"times": PoolRealArray( 0, 1.3, 3.2 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ true, false ]
|
||||
"values": [ true, false, true ]
|
||||
}
|
||||
tracks/8/type = "method"
|
||||
tracks/8/path = NodePath(".")
|
||||
|
@ -127,30 +127,37 @@ tracks/8/loop_wrap = true
|
|||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/keys = {
|
||||
"times": PoolRealArray( 1.6 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"times": PoolRealArray( 1.4, 3.2 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"values": [ {
|
||||
"args": [ ],
|
||||
"args": [ true ],
|
||||
"method": "_play_laser_sound"
|
||||
}, {
|
||||
"args": [ false ],
|
||||
"method": "_play_laser_sound"
|
||||
} ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=5]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:can_shoot")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0 ),
|
||||
"transitions": PoolRealArray( 1 ),
|
||||
"update": 1,
|
||||
"values": [ true ]
|
||||
}
|
||||
|
||||
[node name="2600" type="Node2D"]
|
||||
position = Vector2( 0, -16 )
|
||||
script = ExtResource( 1 )
|
||||
can_shoot = true
|
||||
|
||||
[node name="Intelli" type="Sprite" parent="."]
|
||||
position = Vector2( 32, 41 )
|
||||
rotation = 3.14159
|
||||
scale = Vector2( 1, -1 )
|
||||
texture = ExtResource( 5 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 0, 0, 20, 14 )
|
||||
|
||||
[node name="Body" type="Node2D" parent="."]
|
||||
position = Vector2( 1, 0 )
|
||||
|
||||
|
@ -180,6 +187,15 @@ position = Vector2( 0.0139904, 0 )
|
|||
shape = SubResource( 6 )
|
||||
disabled = true
|
||||
|
||||
[node name="Intelli" type="Sprite" parent="Body/Head"]
|
||||
visible = false
|
||||
position = Vector2( -42, -31 )
|
||||
rotation = 3.14159
|
||||
scale = Vector2( 1, -1 )
|
||||
texture = ExtResource( 5 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 0, 0, 20, 14 )
|
||||
|
||||
[node name="LegL" type="Sprite" parent="Body"]
|
||||
position = Vector2( 67, 112 )
|
||||
texture = ExtResource( 3 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue