jus: rajout de juyce commes ils disent
Une petit trainée de particules suit la princesse, quand elle marche et change de direction, quand elle saute, quand elle wall kick. C'est fou mais rien que ce petit truc rend le jeu plus agréable à jouer!!
This commit is contained in:
BIN
masks/smoke_particle_6.png
Normal file
BIN
masks/smoke_particle_6.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
34
masks/smoke_particle_6.png.import
Normal file
34
masks/smoke_particle_6.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cfptwn1c03k1b"
|
||||||
|
path="res://.godot/imported/smoke_particle_6.png-be850fe985b6ee6e405abdda6d118021.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://masks/smoke_particle_6.png"
|
||||||
|
dest_files=["res://.godot/imported/smoke_particle_6.png-be850fe985b6ee6e405abdda6d118021.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
11
princesse.gd
11
princesse.gd
@@ -25,6 +25,7 @@ var gravity: int = ProjectSettings.get("physics/2d/default_gravity")
|
|||||||
@onready var death_animation := $"Death player" as AnimationPlayer
|
@onready var death_animation := $"Death player" as AnimationPlayer
|
||||||
|
|
||||||
@onready var nuage_prout := $"GPUParticles2D" as GPUParticles2D
|
@onready var nuage_prout := $"GPUParticles2D" as GPUParticles2D
|
||||||
|
@onready var nuage_jump := $"GPUParticles2DJump" as GPUParticles2D
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
@@ -437,6 +438,8 @@ func read_input() -> void:
|
|||||||
if need_kicking and get_coyote(coyote_grab):
|
if need_kicking and get_coyote(coyote_grab):
|
||||||
if not kicking:
|
if not kicking:
|
||||||
need_kicking=false
|
need_kicking=false
|
||||||
|
nuage_jump.restart()
|
||||||
|
nuage_jump.emitting = true
|
||||||
kicking=true
|
kicking=true
|
||||||
coyote_grab = [false]
|
coyote_grab = [false]
|
||||||
last_kick_key_counter = 0
|
last_kick_key_counter = 0
|
||||||
@@ -450,6 +453,8 @@ func read_input() -> void:
|
|||||||
if need_jump and (is_on_floor() or get_coyote(coyote_ground)):
|
if need_jump and (is_on_floor() or get_coyote(coyote_ground)):
|
||||||
need_jump = false
|
need_jump = false
|
||||||
if not jumping:
|
if not jumping:
|
||||||
|
nuage_jump.restart()
|
||||||
|
nuage_jump.emitting = true
|
||||||
jumping = true
|
jumping = true
|
||||||
jumping_step = JUMP_SPEED_TABLE.size()-1
|
jumping_step = JUMP_SPEED_TABLE.size()-1
|
||||||
|
|
||||||
@@ -472,8 +477,14 @@ func read_input() -> void:
|
|||||||
)
|
)
|
||||||
if not is_zero_approx(axis):
|
if not is_zero_approx(axis):
|
||||||
if axis < 0:
|
if axis < 0:
|
||||||
|
if direction == 1 and is_on_floor():
|
||||||
|
nuage_jump.restart()
|
||||||
|
nuage_jump.emitting = true
|
||||||
direction = -1
|
direction = -1
|
||||||
else:
|
else:
|
||||||
|
if direction == -1 and is_on_floor():
|
||||||
|
nuage_jump.restart()
|
||||||
|
nuage_jump.emitting = true
|
||||||
direction = 1
|
direction = 1
|
||||||
else:
|
else:
|
||||||
if kicking:
|
if kicking:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=71 format=3 uid="uid://dv0mokf4eogm7"]
|
[gd_scene load_steps=73 format=3 uid="uid://dv0mokf4eogm7"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://princesse.gd" id="1_dkp7s"]
|
[ext_resource type="Script" path="res://princesse.gd" id="1_dkp7s"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dr7fyh2rufsyj" path="res://sprite/princess_falling_direction.png" id="2_hholp"]
|
[ext_resource type="Texture2D" uid="uid://dr7fyh2rufsyj" path="res://sprite/princess_falling_direction.png" id="2_hholp"]
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://c2xtcu5ysgi7o" path="res://sprite/princess_jumping.png" id="6_srvje"]
|
[ext_resource type="Texture2D" uid="uid://c2xtcu5ysgi7o" path="res://sprite/princess_jumping.png" id="6_srvje"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d23lmsjrjw1mk" path="res://sprite/princess_wall_stick.png" id="7_8dix4"]
|
[ext_resource type="Texture2D" uid="uid://d23lmsjrjw1mk" path="res://sprite/princess_wall_stick.png" id="7_8dix4"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dgsn3ixn46anc" path="res://sprite/light.png" id="8_8c83t"]
|
[ext_resource type="Texture2D" uid="uid://dgsn3ixn46anc" path="res://sprite/light.png" id="8_8c83t"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cfptwn1c03k1b" path="res://masks/smoke_particle_6.png" id="11_4uqsf"]
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_anx4x"]
|
[sub_resource type="Gradient" id="Gradient_anx4x"]
|
||||||
offsets = PackedFloat32Array(0, 0.99893)
|
offsets = PackedFloat32Array(0, 0.99893)
|
||||||
@@ -51,6 +52,13 @@ collision_mode = 1
|
|||||||
collision_friction = 0.0
|
collision_friction = 0.0
|
||||||
collision_bounce = 0.0
|
collision_bounce = 0.0
|
||||||
|
|
||||||
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_3nyab"]
|
||||||
|
particle_flag_disable_z = true
|
||||||
|
direction = Vector3(0, 0, 0)
|
||||||
|
gravity = Vector3(0, 0, 0)
|
||||||
|
orbit_velocity_min = 0.0
|
||||||
|
orbit_velocity_max = 0.0
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i248f"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i248f"]
|
||||||
atlas = ExtResource("2_hholp")
|
atlas = ExtResource("2_hholp")
|
||||||
region = Rect2(0, 0, 24, 50)
|
region = Rect2(0, 0, 24, 50)
|
||||||
@@ -489,10 +497,19 @@ lifetime = 2.0
|
|||||||
preprocess = 2.0
|
preprocess = 2.0
|
||||||
speed_scale = 4.0
|
speed_scale = 4.0
|
||||||
|
|
||||||
|
[node name="GPUParticles2DJump" type="GPUParticles2D" parent="."]
|
||||||
|
position = Vector2(-1.66667, 25)
|
||||||
|
emitting = false
|
||||||
|
amount = 11
|
||||||
|
process_material = SubResource("ParticleProcessMaterial_3nyab")
|
||||||
|
texture = ExtResource("11_4uqsf")
|
||||||
|
one_shot = true
|
||||||
|
speed_scale = 5.73
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
modulate = Color(0.823529, 0.823529, 0.823529, 1)
|
modulate = Color(0.823529, 0.823529, 0.823529, 1)
|
||||||
sprite_frames = SubResource("SpriteFrames_q52wx")
|
sprite_frames = SubResource("SpriteFrames_q52wx")
|
||||||
animation = &"wall_stick"
|
animation = &"walk"
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="."]
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
zoom = Vector2(2, 2)
|
zoom = Vector2(2, 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user