adds new font, adapts debug level and monster spawning
This commit is contained in:
parent
e8f06e7b99
commit
6ce579026b
15 changed files with 279 additions and 30 deletions
|
|
@ -2,10 +2,15 @@ extends CharacterBody3D
|
|||
|
||||
@onready var animated_mesh = $GobotSkin
|
||||
|
||||
var in_battle: bool = false
|
||||
|
||||
const SPEED = 5.0
|
||||
const JUMP_VELOCITY = 4.5
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if in_battle == true:
|
||||
return
|
||||
|
||||
animated_mesh.idle()
|
||||
|
||||
# Add the gravity.
|
||||
|
|
@ -53,14 +58,19 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
move_and_slide()
|
||||
|
||||
if velocity.length() < 0.01:
|
||||
if velocity.length() < 0.05:
|
||||
animated_mesh.idle()
|
||||
|
||||
# what happens when a battle starts?
|
||||
# the player is positioned (mostly elsewhere than where he currently stands)
|
||||
# the player is positioned (mostly somewhere else than the current position)
|
||||
# ui changes
|
||||
# music changes
|
||||
func start_battle(player_position: Vector3) -> void:
|
||||
func start_battle(enemy: Node3D, player_position: Vector3) -> void:
|
||||
position = Vector3(player_position.x, position.y, player_position.z)
|
||||
print("düdelüdelüdelüdelü")
|
||||
print("start battle")
|
||||
in_battle = true
|
||||
velocity = Vector3.ZERO
|
||||
animated_mesh.idle()
|
||||
|
||||
await get_tree().create_timer(2.0).timeout
|
||||
print("timer over")
|
||||
in_battle = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue