A bit more polish to movement. wall_slide will start with grvity 0. Also dash particals tweaks

This commit is contained in:
Sagi Dayan 2020-09-17 15:19:46 -04:00
parent 87b25dccd0
commit 9bdaef2d86
12 changed files with 238 additions and 84 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/background_0.png-4ee0c085d5adb657be23c1916c16f97d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Tiles/background_0.png"
dest_files=[ "res://.import/background_0.png-4ee0c085d5adb657be23c1916c16f97d.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=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/background_1.png-ad81242cf231e04586d95282e297729a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Tiles/background_1.png"
dest_files=[ "res://.import/background_1.png-ad81242cf231e04586d95282e297729a.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=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/background_2.png-1c20408bcd8a40d9ba7b1a6ad88eec0b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Tiles/background_2.png"
dest_files=[ "res://.import/background_2.png-1c20408bcd8a40d9ba7b1a6ad88eec0b.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=true
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/tileset_tree.png-959ba2050ae87a2252fa0418b0c95e9b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Tiles/tileset_tree.png"
dest_files=[ "res://.import/tileset_tree.png-959ba2050ae87a2252fa0418b0c95e9b.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=true
svg/scale=1.0

View file

@ -3,13 +3,13 @@
[ext_resource path="res://assets/Player/herochar_dash_partical_left.png" type="Texture" id=1]
[sub_resource type="Gradient" id=1]
colors = PoolColorArray( 0, 1, 1, 0.694118, 0.862745, 0.866667, 0.901961, 0 )
colors = PoolColorArray( 0.964706, 1, 0.521569, 0.694118, 0.862745, 0.866667, 0.901961, 0 )
[sub_resource type="GradientTexture" id=2]
gradient = SubResource( 1 )
[sub_resource type="Curve" id=3]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.475 ), 0.0, 0.0, 0, 0 ]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.836806, 0.0795455 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=4]
curve = SubResource( 3 )

View file

@ -3,13 +3,13 @@
[ext_resource path="res://assets/Player/herochar_dash_partical.png" type="Texture" id=1]
[sub_resource type="Gradient" id=1]
colors = PoolColorArray( 0, 1, 1, 0.694118, 0.862745, 0.866667, 0.901961, 0 )
colors = PoolColorArray( 0.964706, 1, 0.521569, 0.694118, 0.862745, 0.866667, 0.901961, 0 )
[sub_resource type="GradientTexture" id=2]
gradient = SubResource( 1 )
[sub_resource type="Curve" id=3]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.475 ), 0.0, 0.0, 0, 0 ]
_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.777778, 0.229545 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=4]
curve = SubResource( 3 )

View file

@ -35,8 +35,11 @@ func _physics_process(delta: float) -> void:
if _alive:
var is_jump_canceled: = Input.is_action_just_released("jump") and !_is_wall_jumping and _velocity.y < 0.0
var direction: = get_direction()
var prev_wall_slide_state = _is_wall_sliding
_is_wall_sliding = _velocity.y >=0 and _is_next_to_wall() and _in_air
_velocity = calculate_move_velocity(direction,is_jump_canceled, delta)
if _is_wall_sliding and not prev_wall_slide_state:
_velocity.y=0
_velocity = move_and_slide(_velocity, Vector2.UP)
update_sprite(direction)
if is_on_floor() and !_is_dashing: _can_dash = true;

File diff suppressed because one or more lines are too long