mirror of
https://github.com/Dariasteam/Cows-Revenge.git
synced 2026-01-23 02:15:17 +00:00
Arreglado subir rampas
This commit is contained in:
parent
5911166d0b
commit
eac94906be
2 changed files with 6 additions and 6 deletions
|
|
@ -19,11 +19,9 @@ func _ready():
|
|||
connect("damage", get_tree().get_root().get_node("Node2D"), "on_damage")
|
||||
set_fixed_process(true)
|
||||
|
||||
func _fixed_process(delta):
|
||||
|
||||
func _fixed_process(delta):
|
||||
var motion = v * delta
|
||||
motion = move(motion)
|
||||
|
||||
motion = move(motion)
|
||||
v.y += delta * GRAVITY
|
||||
|
||||
if (is_colliding()):
|
||||
|
|
@ -42,9 +40,11 @@ func _fixed_process(delta):
|
|||
if (normal.y < 0):
|
||||
if (normal.y > -1):
|
||||
v.y = -velocity
|
||||
var aux = v.x
|
||||
motion = normal.slide(motion)
|
||||
v = normal.slide(v)
|
||||
move(motion)
|
||||
v.x = aux
|
||||
if (normal.x < -0.75):
|
||||
sprite.set_flip_h(false)
|
||||
v = Vector2(-velocity,0)
|
||||
|
|
|
|||
4
top.tscn
4
top.tscn
|
|
@ -35,12 +35,12 @@ __meta__ = {
|
|||
] instance=ExtResource( 2 )]
|
||||
|
||||
editor/display_folded = true
|
||||
transform/pos = Vector2( 640, -736 )
|
||||
transform/pos = Vector2( -1216, -928 )
|
||||
JUMP_SPEED = 500
|
||||
|
||||
[node name="Enemy3" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
transform/pos = Vector2( 384, -704 )
|
||||
transform/pos = Vector2( -1472, -896 )
|
||||
velocity = 200
|
||||
|
||||
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue