forked from team-sg/hero-mark-2
inflict upon SG a bloody death
This commit is contained in:
parent
da03fddf2d
commit
2166d4443f
4 changed files with 77 additions and 1 deletions
BIN
graphics/particles/blood.png
Normal file
BIN
graphics/particles/blood.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 616 B |
35
graphics/particles/blood.png.import
Normal file
35
graphics/particles/blood.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/blood.png-2921f4c0eb6cf89241668dc90972855f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/particles/blood.png"
|
||||||
|
dest_files=[ "res://.import/blood.png-2921f4c0eb6cf89241668dc90972855f.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
|
|
@ -7,6 +7,7 @@ onready var climb_ray = $ClimbRay
|
||||||
onready var anims = $AnimationPlayer
|
onready var anims = $AnimationPlayer
|
||||||
onready var sword_sprite = $SwordSprite
|
onready var sword_sprite = $SwordSprite
|
||||||
onready var sword_hitbox = $SwordArea
|
onready var sword_hitbox = $SwordArea
|
||||||
|
onready var death_particles = $DeathSplatter
|
||||||
#Map
|
#Map
|
||||||
onready var map = get_owner()
|
onready var map = get_owner()
|
||||||
##States
|
##States
|
||||||
|
@ -244,6 +245,10 @@ func check_ladder():
|
||||||
#climb_ray.position.x = 4 * sprite.scale.x
|
#climb_ray.position.x = 4 * sprite.scale.x
|
||||||
|
|
||||||
func die():
|
func die():
|
||||||
|
var new_particles = death_particles.duplicate()
|
||||||
|
get_parent().add_child(new_particles)
|
||||||
|
new_particles.global_position = global_position
|
||||||
|
new_particles.emitting = true
|
||||||
position = Game.respawn_point
|
position = Game.respawn_point
|
||||||
Game.lives -= 1
|
Game.lives -= 1
|
||||||
Game.play_sound(Game.a_die,Game.ac_die)
|
Game.play_sound(Game.a_die,Game.ac_die)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=28 format=2]
|
[gd_scene load_steps=32 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://objects/player/player.gd" type="Script" id=1]
|
[ext_resource path="res://objects/player/player.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://graphics/player/sg_walk.png" type="Texture" id=2]
|
[ext_resource path="res://graphics/player/sg_walk.png" type="Texture" id=2]
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
[ext_resource path="res://graphics/player/sg_shoot_air.png" type="Texture" id=12]
|
[ext_resource path="res://graphics/player/sg_shoot_air.png" type="Texture" id=12]
|
||||||
[ext_resource path="res://scripts/recolor.tres" type="Shader" id=13]
|
[ext_resource path="res://scripts/recolor.tres" type="Shader" id=13]
|
||||||
[ext_resource path="res://graphics/player/sg_doublejump.png" type="Texture" id=14]
|
[ext_resource path="res://graphics/player/sg_doublejump.png" type="Texture" id=14]
|
||||||
|
[ext_resource path="res://graphics/particles/blood.png" type="Texture" id=15]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=38]
|
[sub_resource type="ShaderMaterial" id=38]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
|
@ -599,6 +600,31 @@ tracks/4/keys = {
|
||||||
[sub_resource type="RectangleShape2D" id=34]
|
[sub_resource type="RectangleShape2D" id=34]
|
||||||
extents = Vector2( 6, 7 )
|
extents = Vector2( 6, 7 )
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id=41]
|
||||||
|
_data = [ Vector2( 0, 1 ), 0.0, -0.113537, 0, 0, Vector2( 1, 0 ), -3.35032, 0.0, 0, 0 ]
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id=42]
|
||||||
|
width = 128
|
||||||
|
curve = SubResource( 41 )
|
||||||
|
|
||||||
|
[sub_resource type="ParticlesMaterial" id=40]
|
||||||
|
emission_shape = 2
|
||||||
|
emission_box_extents = Vector3( 4, 4, 0 )
|
||||||
|
flag_disable_z = true
|
||||||
|
direction = Vector3( 0, -1, 0 )
|
||||||
|
spread = 180.0
|
||||||
|
gravity = Vector3( 0, 50, 0 )
|
||||||
|
initial_velocity = 60.0
|
||||||
|
initial_velocity_random = 0.9
|
||||||
|
orbit_velocity = 0.0
|
||||||
|
orbit_velocity_random = 0.0
|
||||||
|
damping = 2.0
|
||||||
|
angle = 720.0
|
||||||
|
angle_random = 1.0
|
||||||
|
scale = 0.5
|
||||||
|
scale_random = 1.0
|
||||||
|
scale_curve = SubResource( 42 )
|
||||||
|
|
||||||
[node name="Player" type="KinematicBody2D"]
|
[node name="Player" type="KinematicBody2D"]
|
||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
collision_mask = 5
|
collision_mask = 5
|
||||||
|
@ -655,4 +681,14 @@ position = Vector2( 0, 3 )
|
||||||
shape = SubResource( 34 )
|
shape = SubResource( 34 )
|
||||||
disabled = true
|
disabled = true
|
||||||
|
|
||||||
|
[node name="DeathSplatter" type="Particles2D" parent="."]
|
||||||
|
emitting = false
|
||||||
|
amount = 16
|
||||||
|
lifetime = 0.3
|
||||||
|
one_shot = true
|
||||||
|
explosiveness = 0.9
|
||||||
|
local_coords = false
|
||||||
|
process_material = SubResource( 40 )
|
||||||
|
texture = ExtResource( 15 )
|
||||||
|
|
||||||
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
|
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue