Adjustments to horizontal dash
This commit is contained in:
parent
f9075777e8
commit
7265c16a2f
2 changed files with 7 additions and 5 deletions
|
|
@ -1,13 +1,14 @@
|
|||
extends ActiveItem
|
||||
var cooldown = 1.5
|
||||
var dash_time = 0.2
|
||||
var dash_time = 0.15
|
||||
var dashing = 0
|
||||
var dash_dir
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
super(delta)
|
||||
if dashing > 0:
|
||||
dashing -= delta
|
||||
player.reset_to_velocity = Vector2.RIGHT * player.facing * 1600
|
||||
player.reset_to_velocity = player.earth_aligner.local_from_global(dash_dir)
|
||||
|
||||
|
||||
func actually_collect():
|
||||
|
|
@ -18,4 +19,5 @@ func activate():
|
|||
player.activate_cooldown()
|
||||
player.air_jumps_current = min(player.air_jumps_current + 1, player.air_jumps_max)
|
||||
dashing = dash_time
|
||||
dash_dir = player.earth_aligner.global_from_local(Vector2.RIGHT * player.facing * 1600)
|
||||
player.inv_time = max(player.inv_time, dash_time)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://ca5ndobertnp4" path="res://water/water.tscn" id="10_4c57u"]
|
||||
[ext_resource type="Script" uid="uid://cpaskpj67pnaj" path="res://enemies/boss/boss_spawner.gd" id="10_efxa6"]
|
||||
[ext_resource type="PackedScene" uid="uid://cpe4s6vsn0ujd" path="res://enemies/boss/boss.tscn" id="11_efxa6"]
|
||||
[ext_resource type="PackedScene" uid="uid://5nb7pf8g1ck" path="res://enemies/leech/giant_leech.tscn" id="14_w48qg"]
|
||||
[ext_resource type="PackedScene" uid="uid://dy17xhg1yrl0o" path="res://items/active_items/horizontal_dash/horizontal_dash.tscn" id="14_w48qg"]
|
||||
|
||||
[node name="main" type="Node2D"]
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ texture = ExtResource("3_kek77")
|
|||
script = ExtResource("10_efxa6")
|
||||
boss = ExtResource("11_efxa6")
|
||||
|
||||
[node name="Giant_Leech" parent="." instance=ExtResource("14_w48qg")]
|
||||
position = Vector2(-49, -3162)
|
||||
[node name="HorizontalDash" parent="." instance=ExtResource("14_w48qg")]
|
||||
position = Vector2(116, -3150)
|
||||
|
||||
[connection signal="active_item_changed" from="Player" to="UIOverlay/ItemUI" method="_on_player_active_item_changed"]
|
||||
[connection signal="health_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_health_changed"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue