mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-12 13:32:23 +02:00
Added stomp effect
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=36 format=2]
|
||||
[gd_scene load_steps=37 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=2]
|
||||
@@ -20,6 +20,7 @@
|
||||
[ext_resource path="res://Effects/Charge/ChargeEffect.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://Boss/SlimeBoss/States/ReturnToCenter.gd" type="Script" id=19]
|
||||
[ext_resource path="res://Boss/SlimeBoss/States/Stomp.gd" type="Script" id=20]
|
||||
[ext_resource path="res://Effects/Stomp/StompEffect.tscn" type="PackedScene" id=21]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 60.0
|
||||
@@ -813,6 +814,9 @@ __meta__ = {
|
||||
position = Vector2( 0, -8 )
|
||||
emitting = false
|
||||
|
||||
[node name="StompEffect" parent="Effects" instance=ExtResource( 21 )]
|
||||
visible = false
|
||||
|
||||
[node name="Stats" parent="." instance=ExtResource( 3 )]
|
||||
max_health = 3
|
||||
|
||||
@@ -925,6 +929,7 @@ anims/MoveDown = SubResource( 12 )
|
||||
anims/MoveLeft = SubResource( 13 )
|
||||
anims/MoveRight = SubResource( 14 )
|
||||
anims/MoveUp = SubResource( 15 )
|
||||
[connection signal="animation_finished" from="Effects/StompEffect" to="States/Stomp" method="_on_StompEffect_animation_finished"]
|
||||
[connection signal="health_changed" from="Stats" to="." method="_on_Stats_health_changed"]
|
||||
[connection signal="no_health" from="Stats" to="." method="_on_Stats_no_health"]
|
||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
|
||||
@@ -144,6 +144,30 @@ func _decide_on_next_state():
|
||||
if state_active == $States/ChargeSequence:
|
||||
return $States/Stomp
|
||||
|
||||
if _phase == PHASES.PHASE_THREE:
|
||||
if angry_phases_done < 2:
|
||||
set_invincible(true)
|
||||
if sequence_cycles < 6:
|
||||
if state_active == $States/ChargeSequence:
|
||||
return $States/Stomp
|
||||
if state_active == $States/Stomp:
|
||||
sequence_cycles += 1
|
||||
return $States/ChargeSequence
|
||||
else:
|
||||
angry_phases_done = 2
|
||||
sequence_cycles = 0
|
||||
return $States/ReturnToCenter
|
||||
else:
|
||||
if state_active == $States/ReturnToCenter:
|
||||
return $States/Stomp # TODO: Maybe Stomp.
|
||||
if state_active == $States/Stomp:
|
||||
set_invincible(false)
|
||||
return $States/RoamSequence
|
||||
if state_active == $States/RoamSequence:
|
||||
return $States/ChargeSequence
|
||||
if state_active == $States/ChargeSequence:
|
||||
return $States/Stomp
|
||||
|
||||
# # Death
|
||||
# if state_active == $States/Die:
|
||||
# queue_free()
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
extends "res://Boss/SlimeBoss/States/BossState.gd"
|
||||
|
||||
onready var stomp_hitbox = owner.get_node("StompHitbox/CollisionShape2D")
|
||||
onready var stomp_effect = owner.get_node("Effects/StompEffect")
|
||||
|
||||
func enter():
|
||||
stomp_hitbox.disabled = false
|
||||
stomp_effect.stomp()
|
||||
|
||||
func exit():
|
||||
stomp_hitbox.disabled = true
|
||||
@@ -11,8 +13,5 @@ func exit():
|
||||
func update(delta):
|
||||
play_directional_animation("Charge", owner.last_look)
|
||||
|
||||
func _on_animation_finished(anim_name):
|
||||
anim_name = get_base_anim_name(anim_name)
|
||||
assert(anim_name == "Charge")
|
||||
|
||||
func _on_StompEffect_animation_finished():
|
||||
emit_signal("finished")
|
||||
|
||||
9
src/Effects/Stomp/StompEffect.gd
Normal file
9
src/Effects/Stomp/StompEffect.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends AnimatedSprite
|
||||
|
||||
func stomp():
|
||||
visible = true
|
||||
frame = 0
|
||||
play("stomp")
|
||||
|
||||
func _animation_finished():
|
||||
visible = false
|
||||
138
src/Effects/Stomp/StompEffect.tscn
Normal file
138
src/Effects/Stomp/StompEffect.tscn
Normal file
@@ -0,0 +1,138 @@
|
||||
[gd_scene load_steps=34 format=2]
|
||||
|
||||
[ext_resource path="res://Effects/Stomp/stomp-splash.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Effects/Stomp/StompEffect.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 120, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 240, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 360, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 480, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 600, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=8]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 720, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=9]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 840, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=10]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 960, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=11]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1080, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=12]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1200, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=13]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1320, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=14]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1440, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=15]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1560, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=16]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1680, 0, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=17]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=18]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 120, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=19]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 240, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=20]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 360, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=21]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 480, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=22]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 600, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=23]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 720, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=24]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 840, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=25]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 960, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=26]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1080, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=27]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1200, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=28]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1320, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=29]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1440, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=30]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1560, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=31]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 1680, 120, 120, 120 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=32]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ), SubResource( 31 ) ],
|
||||
"loop": false,
|
||||
"name": "stomp",
|
||||
"speed": 60.0
|
||||
} ]
|
||||
|
||||
[node name="StompEffect" type="AnimatedSprite"]
|
||||
frames = SubResource( 32 )
|
||||
animation = "stomp"
|
||||
script = ExtResource( 2 )
|
||||
[connection signal="animation_finished" from="." to="." method="_animation_finished"]
|
||||
BIN
src/Effects/Stomp/stomp-splash.png
Normal file
BIN
src/Effects/Stomp/stomp-splash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
34
src/Effects/Stomp/stomp-splash.png.import
Normal file
34
src/Effects/Stomp/stomp-splash.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/stomp-splash.png-8255ebc3952d7a9d2ea05b169c877e7f.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Effects/Stomp/stomp-splash.png"
|
||||
dest_files=[ "res://.import/stomp-splash.png-8255ebc3952d7a9d2ea05b169c877e7f.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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
Reference in New Issue
Block a user