fixed camera script and restructured ui folder

This commit is contained in:
Luca 2024-09-27 21:31:03 +02:00
parent 877ebafc74
commit 5748d34b34
32 changed files with 781 additions and 162 deletions

View file

@ -1,8 +1,6 @@
class_name Monster
extends CharacterBody3D
signal level_up
@export var data: MonsterData = MonsterData.new()
var spawn_point: Vector3 = Vector3(0, 0, 0)
@ -28,8 +26,9 @@ func _physics_process(delta: float) -> void:
time += delta
var x_movement = sin(time * frequency) * amplitude
var y_movement = sin(time * 25) * 4.0
var z_movement = cos(time * frequency) * amplitude
velocity = Vector3(x_movement, 0, z_movement)
velocity = Vector3(x_movement, y_movement, z_movement)
# if move_and_slide reports collisions
if move_and_slide():

View file

@ -81,9 +81,13 @@ func start_battle(enemy: Node3D, player_position: Vector3) -> void:
in_battle = true
velocity = Vector3.ZERO
animated_mesh.idle()
UI.show_battle_ui(true)
UI.show_ingame_controls(false)
await get_tree().create_timer(2.0).timeout
print("timer over")
print("Battle over")
in_battle = false
func save() -> Dictionary: