fuck it, jump particles while we are at it haha

This commit is contained in:
Haze Weathers 2023-01-16 07:52:08 -05:00
parent 8212e44044
commit 1d76d93aed
2 changed files with 41 additions and 1 deletions

View file

@ -8,6 +8,7 @@ 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 onready var death_particles = $DeathSplatter
onready var dust_particles = $DustParticles
#Map #Map
onready var map = get_owner() onready var map = get_owner()
##States ##States
@ -193,6 +194,8 @@ func check_jump():
if current_state == State.CLIMB: if current_state == State.CLIMB:
Game.ac_climb.set_stream(null) # stop climb sound Game.ac_climb.set_stream(null) # stop climb sound
position.x -= sprite.scale.x * 5 position.x -= sprite.scale.x * 5
else:
dust_particles.restart()
anims.set_speed_scale(1) anims.set_speed_scale(1)
# Jump # Jump
can_doublejump = true can_doublejump = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=32 format=2] [gd_scene load_steps=36 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]
@ -15,6 +15,7 @@
[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] [ext_resource path="res://graphics/particles/blood.png" type="Texture" id=15]
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=16]
[sub_resource type="ShaderMaterial" id=38] [sub_resource type="ShaderMaterial" id=38]
resource_local_to_scene = true resource_local_to_scene = true
@ -625,6 +626,30 @@ scale = 0.5
scale_random = 1.0 scale_random = 1.0
scale_curve = SubResource( 42 ) scale_curve = SubResource( 42 )
[sub_resource type="Curve" id=43]
_data = [ Vector2( 0, 1 ), 0.0, -0.0636948, 0, 0, Vector2( 1, 0 ), -3.43886, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=44]
width = 32
curve = SubResource( 43 )
[sub_resource type="ParticlesMaterial" id=45]
emission_shape = 2
emission_box_extents = Vector3( 5, 0, 0 )
flag_disable_z = true
direction = Vector3( 0, -1, 0 )
spread = 60.0
gravity = Vector3( 0, 0, 0 )
initial_velocity = 10.0
initial_velocity_random = 0.8
orbit_velocity = 0.0
orbit_velocity_random = 0.0
angle = 720.0
angle_random = 1.0
scale = 0.25
scale_random = 0.5
scale_curve = SubResource( 44 )
[node name="Player" type="KinematicBody2D"] [node name="Player" type="KinematicBody2D"]
collision_layer = 2 collision_layer = 2
collision_mask = 5 collision_mask = 5
@ -691,4 +716,16 @@ local_coords = false
process_material = SubResource( 40 ) process_material = SubResource( 40 )
texture = ExtResource( 15 ) texture = ExtResource( 15 )
[node name="DustParticles" type="Particles2D" parent="."]
position = Vector2( 0, 12 )
emitting = false
amount = 5
lifetime = 0.3
one_shot = true
explosiveness = 0.9
fract_delta = false
local_coords = false
process_material = SubResource( 45 )
texture = ExtResource( 16 )
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"] [connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]