setup for ai

This commit is contained in:
Jonas Mucke
2020-04-18 21:17:13 +02:00
parent b75cdf7a76
commit e7d5d9eacc
11 changed files with 345 additions and 94 deletions

View File

@@ -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

View File

@@ -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
}