mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-13 05:52:24 +02:00
setup for ai
This commit is contained in:
@@ -6,6 +6,7 @@ This is an example player controller script created by Paul
|
||||
var velocity := Vector2.ZERO
|
||||
var rollvector := Vector2.ZERO
|
||||
# This is how you export variables with ranges to the editor window
|
||||
export(bool) var debug := false
|
||||
export(int, 0, 500) var ROLL_SPEED := 150
|
||||
export(int, 0, 500) var FRICTION := 200 # Speed at which the player deaccelarates
|
||||
export(int, 0, 500) var ACCELERATION := 450
|
||||
@@ -45,13 +46,14 @@ func _physics_process(delta):
|
||||
totaldamage+=1
|
||||
player_stats.health+=1
|
||||
_debug_update()
|
||||
match movementState:
|
||||
moveState.MOVE:
|
||||
movement_move(delta)
|
||||
moveState.ROLL:
|
||||
movement_roll()
|
||||
moveState.HIT:
|
||||
movement_hit()
|
||||
if debug == true:
|
||||
match movementState:
|
||||
moveState.MOVE:
|
||||
movement_move(delta)
|
||||
moveState.ROLL:
|
||||
movement_roll()
|
||||
moveState.HIT:
|
||||
movement_hit()
|
||||
|
||||
move()
|
||||
|
||||
@@ -104,6 +106,7 @@ func roll_finished():
|
||||
|
||||
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
print("Hallo")
|
||||
player_stats.health-=area.damage
|
||||
damage_per_second = damage_per_second + area.damage
|
||||
|
||||
|
||||
@@ -700,7 +700,7 @@ margin_top = -21.2223
|
||||
margin_right = 8.98804
|
||||
margin_bottom = -9.22228
|
||||
custom_fonts/font = SubResource( 49 )
|
||||
text = "Ahh"
|
||||
text = "Held"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user