splash particlesgit status
This commit is contained in:
parent
002737706b
commit
bd12aa68c1
9 changed files with 87 additions and 4 deletions
BIN
graphics/particles/splash.png
Normal file
BIN
graphics/particles/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
35
graphics/particles/splash.png.import
Normal file
35
graphics/particles/splash.png.import
Normal file
|
@ -0,0 +1,35 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/splash.png-a6ada3bebf5580104e880db2dd2dd744.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://graphics/particles/splash.png"
|
||||
dest_files=[ "res://.import/splash.png-a6ada3bebf5580104e880db2dd2dd744.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
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=29 format=2]
|
||||
[gd_scene load_steps=30 format=2]
|
||||
|
||||
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://maps/map.gd" type="Script" id=2]
|
||||
|
@ -27,6 +27,7 @@
|
|||
[ext_resource path="res://objects/lore/canopy/sabrespighter.tscn" type="PackedScene" id=25]
|
||||
[ext_resource path="res://objects/lore/canopy/shady_canopy.tscn" type="PackedScene" id=26]
|
||||
[ext_resource path="res://shaders/can_stain.tres" type="Material" id=27]
|
||||
[ext_resource path="res://scripts/has_splash.gd" type="Script" id=28]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 4, 128 )
|
||||
|
@ -72,6 +73,8 @@ cell_size = Vector2( 8, 8 )
|
|||
collision_layer = 32
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 1441824, 0, 0, 1441825, 0, 0, 1441826, 0, 0, 1441827, 0, 0, 1441828, 0, 0, 1441829, 0, 0, 1441830, 0, 0, 1441831, 0, 0, 1441832, 0, 0, 1441833, 0, 0, 1441834, 0, 0, 1441835, 0, 0, 1441864, 0, 0, 1441865, 0, 0, 1441866, 0, 0, 1441869, 0, 0, 1441870, 0, 0, 1441871, 0, 0, 1441883, 0, 0, 1441884, 0, 0, 1441885, 0, 0, 1441886, 0, 0, 1441887, 0, 0, 1507360, 3, 0, 1507361, 3, 0, 1507362, 3, 0, 1507363, 3, 0, 1507364, 3, 0, 1507365, 3, 0, 1507366, 3, 0, 1507367, 3, 0, 1507368, 3, 0, 1507369, 3, 0, 1507370, 3, 0, 1507371, 3, 0, 1507400, 3, 0, 1507401, 3, 0, 1507402, 3, 0, 1507405, 3, 0, 1507406, 3, 0, 1507407, 3, 0, 1507419, 3, 0, 1507420, 3, 0, 1507421, 3, 0, 1507422, 3, 0, 1507423, 3, 0 )
|
||||
script = ExtResource( 28 )
|
||||
splash_color = Color( 0.227451, 0.627451, 1, 1 )
|
||||
|
||||
[node name="Platforms" type="Node2D" parent="."]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=22 format=2]
|
||||
[gd_scene load_steps=23 format=2]
|
||||
|
||||
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://maps/map.gd" type="Script" id=2]
|
||||
|
@ -21,6 +21,7 @@
|
|||
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=20]
|
||||
[ext_resource path="res://shaders/can_stain.tres" type="Material" id=21]
|
||||
[ext_resource path="res://scripts/has_splash.gd" type="Script" id=22]
|
||||
|
||||
[node name="Map" type="Node2D" groups=["map"]]
|
||||
pause_mode = 1
|
||||
|
@ -74,6 +75,8 @@ collision_layer = 32
|
|||
collision_mask = 0
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 1441831, 8, 0, 1441832, 8, 0, 1441833, 8, 0, 1441834, 8, 0, 1441835, 8, 0, 1441846, 8, 0, 1441847, 8, 0, 1441848, 8, 0, 1441849, 8, 0, 1441850, 8, 0, 1441865, 8, 0, 1441866, 8, 0, 1441867, 8, 0, 1441868, 8, 0, 1441869, 8, 0, 1507367, 9, 0, 1507368, 9, 0, 1507369, 9, 0, 1507370, 9, 0, 1507371, 9, 0, 1507382, 9, 0, 1507383, 9, 0, 1507384, 9, 0, 1507385, 9, 0, 1507386, 9, 0, 1507401, 9, 0, 1507402, 9, 0, 1507403, 9, 0, 1507404, 9, 0, 1507405, 9, 0 )
|
||||
script = ExtResource( 22 )
|
||||
splash_color = Color( 0.552941, 0.14902, 0.180392, 1 )
|
||||
|
||||
[node name="DeathBackground" type="TileMap" parent="DeathNoBlood"]
|
||||
z_index = -11
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=28 format=2]
|
||||
[gd_scene load_steps=29 format=2]
|
||||
|
||||
[ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=2]
|
||||
|
@ -27,6 +27,7 @@
|
|||
[ext_resource path="res://objects/lore/hills/verdant_hills.tscn" type="PackedScene" id=25]
|
||||
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=26]
|
||||
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=27]
|
||||
[ext_resource path="res://scripts/has_splash.gd" type="Script" id=28]
|
||||
|
||||
[node name="Map" type="Node2D" groups=["map"]]
|
||||
pause_mode = 1
|
||||
|
@ -71,6 +72,8 @@ cell_size = Vector2( 8, 8 )
|
|||
collision_layer = 32
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65515, 11, 0, 131050, 11, 0, 131052, 11, 0, 196586, 11, 0, 196587, 11, 0, 196588, 11, 0, 196589, 11, 0, 262122, 11, 0, 327658, 11, 0, 327661, 11, 0, 327662, 11, 0, 327663, 11, 0, 327664, 11, 0, 393194, 11, 0, 393196, 11, 0, 393201, 11, 0, 458730, 11, 0, 458732, 11, 0, 458734, 11, 0, 458736, 11, 0, 458737, 11, 0, 458739, 11, 0, 524265, 11, 0, 524266, 11, 0, 524267, 11, 0, 524268, 11, 0, 524273, 11, 0, 524274, 11, 0, 524275, 11, 0, 589800, 11, 0, 589801, 11, 0, 589811, 11, 0, 655336, 11, 0, 655337, 11, 0, 655338, 11, 0, 655340, 11, 0, 655343, 11, 0, 655344, 11, 0, 655345, 11, 0, 655346, 11, 0, 655347, 11, 0, 720872, 11, 0, 720873, 11, 0, 720874, 11, 0, 720875, 11, 0, 720879, 11, 0, 786408, 11, 0, 786409, 11, 0, 786410, 11, 0, 786411, 11, 0, 786415, 11, 0, 851944, 11, 0, 851945, 11, 0, 851946, 11, 0, 851951, 11, 0, 917482, 11, 0, 917484, 11, 0, 917487, 11, 0, 983018, 11, 0, 983021, 11, 0, 983024, 11, 0, 1048554, 11, 0, 1048555, 11, 0, 1048556, 11, 0, 1048557, 11, 0, 1048558, 11, 0, 1048559, 11, 0, 1048560, 11, 0, 1441814, 10, 0, 1441815, 10, 0, 1441816, 10, 0, 1441837, 10, 0, 1441838, 10, 0, 1441839, 10, 0, 1441840, 10, 0, 1441841, 10, 0, 1441842, 10, 0, 1441843, 10, 0, 1441844, 10, 0, 1441864, 10, 0, 1441865, 10, 0, 1441866, 10, 0, 1507350, 11, 0, 1507351, 11, 0, 1507352, 11, 0, 1507373, 11, 0, 1507374, 11, 0, 1507375, 11, 0, 1507376, 11, 0, 1507377, 11, 0, 1507378, 11, 0, 1507379, 11, 0, 1507380, 11, 0, 1507400, 11, 0, 1507401, 11, 0, 1507402, 11, 0 )
|
||||
script = ExtResource( 28 )
|
||||
splash_color = Color( 0.368627, 0.784314, 0.94902, 1 )
|
||||
|
||||
[node name="Ladder" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 21 )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=28 format=2]
|
||||
[gd_scene load_steps=29 format=2]
|
||||
|
||||
[ext_resource path="res://maps/map.gd" type="Script" id=1]
|
||||
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=2]
|
||||
|
@ -26,6 +26,7 @@
|
|||
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=24]
|
||||
[ext_resource path="res://audio/music/cryokiller.ogg" type="AudioStream" id=25]
|
||||
[ext_resource path="res://shaders/can_stain.tres" type="Material" id=26]
|
||||
[ext_resource path="res://scripts/has_splash.gd" type="Script" id=27]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 4, 112 )
|
||||
|
@ -74,6 +75,8 @@ cell_size = Vector2( 8, 8 )
|
|||
collision_layer = 32
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 1441838, 7, 0, 1441839, 7, 0, 1441840, 7, 0, 1441841, 7, 0, 1441842, 7, 0, 1441847, 7, 0, 1441848, 7, 0, 1441849, 7, 0, 1441850, 7, 0, 1441851, 7, 0, 1441852, 7, 0, 1441868, 7, 0, 1441869, 7, 0, 1441870, 7, 0, 1441871, 7, 0, 1441872, 7, 0, 1441873, 7, 0, 1441874, 7, 0, 1441875, 7, 0, 1441876, 7, 0, 1441877, 7, 0, 1441878, 7, 0, 1441879, 7, 0, 1441880, 7, 0, 1441881, 7, 0, 1507374, 6, 0, 1507375, 6, 0, 1507376, 6, 0, 1507377, 6, 0, 1507378, 6, 0, 1507383, 6, 0, 1507384, 6, 0, 1507385, 6, 0, 1507386, 6, 0, 1507387, 6, 0, 1507388, 6, 0, 1507404, 6, 0, 1507405, 6, 0, 1507406, 6, 0, 1507407, 6, 0, 1507408, 6, 0, 1507409, 6, 0, 1507410, 6, 0, 1507411, 6, 0, 1507412, 6, 0, 1507413, 6, 0, 1507414, 6, 0, 1507415, 6, 0, 1507416, 6, 0, 1507417, 6, 0 )
|
||||
script = ExtResource( 27 )
|
||||
splash_color = Color( 0.12549, 0.133333, 0.227451, 1 )
|
||||
|
||||
[node name="DeathBackground" type="TileMap" parent="DeathNoBlood" groups=["death", "no_blood"]]
|
||||
z_index = -11
|
||||
|
|
23
objects/environment/splash/splash_particles.tscn
Normal file
23
objects/environment/splash/splash_particles.tscn
Normal file
|
@ -0,0 +1,23 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/particles/splash.png" type="Texture" id=1]
|
||||
|
||||
[node name="SplashParticles" type="CPUParticles2D"]
|
||||
pause_mode = 2
|
||||
z_index = -5
|
||||
emitting = false
|
||||
amount = 16
|
||||
lifetime = 2.0
|
||||
one_shot = true
|
||||
explosiveness = 0.9
|
||||
texture = ExtResource( 1 )
|
||||
emission_shape = 2
|
||||
emission_rect_extents = Vector2( 2, 0 )
|
||||
flag_align_y = true
|
||||
direction = Vector2( 0, -1 )
|
||||
spread = 10.0
|
||||
gravity = Vector2( 0, 120 )
|
||||
initial_velocity = 100.0
|
||||
initial_velocity_random = 0.5
|
||||
scale_amount = 0.25
|
||||
scale_amount_random = 0.5
|
|
@ -7,6 +7,7 @@ signal teleport_finished()
|
|||
# CONSTANTS #
|
||||
const ArrowProjectile = preload("res://objects/player/arrow_projectile.tscn")
|
||||
const DeathSplatter = preload("res://objects/player/player_death_particles.tscn")
|
||||
const SplashParticles = preload("res://objects/environment/splash/splash_particles.tscn")
|
||||
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||
|
||||
# EXPORTS #
|
||||
|
@ -490,6 +491,12 @@ func _on_Hitbox_body_entered(body: Node) -> void:
|
|||
if body.is_in_group("death"):
|
||||
if body.is_in_group("no_blood"):
|
||||
skip_blood = true
|
||||
if body.is_in_group("has_splash"):
|
||||
var particles = SplashParticles.instance()
|
||||
particles.global_position = death_splatter_position.global_position
|
||||
particles.color = body.splash_color
|
||||
particles.emitting = true
|
||||
get_parent().add_child(particles)
|
||||
die()
|
||||
|
||||
|
||||
|
|
6
scripts/has_splash.gd
Normal file
6
scripts/has_splash.gd
Normal file
|
@ -0,0 +1,6 @@
|
|||
extends Node
|
||||
|
||||
export var splash_color: Color = Color.white
|
||||
|
||||
func _init() -> void:
|
||||
add_to_group("has_splash")
|
Loading…
Add table
Add a link
Reference in a new issue