fix some bug and new export

This commit is contained in:
2025-09-09 23:52:08 +02:00
parent c0bf7b0fb8
commit 09c0dfe072
24 changed files with 261 additions and 49 deletions

View File

@@ -5,7 +5,9 @@ var player_name := ""
@export var label_name := Label
func _ready() -> void:
label_name.text = "Score:" + str(GameController.actual_score) + "\n"
if GameController.is_multiplayer:
label_name.text += "Team Name 0/8:"
@@ -13,6 +15,8 @@ func _ready() -> void:
label_name.text += "Player Name 0/8:"
func _on_item_list_item_activated(index: int) -> void:
var temp = $Control/ItemList.get_item_text(index)
var nbr = player_name.length()

View File

@@ -35,8 +35,8 @@ func _physics_process(delta: float) -> void:
else:
animation.play("RESET")
if ! player_2:
horizontal = Input.get_axis("ui_up", "ui_down")
vertical = Input.get_axis("ui_left", "ui_right")
horizontal = Input.get_axis("up", "down")
vertical = Input.get_axis("left", "right")
else:
horizontal = Input.get_axis("up_player_2", "down_player_2")
vertical = Input.get_axis("left_player_2", "right_player_2")
@@ -65,6 +65,7 @@ func _physics_process(delta: float) -> void:
func shoot()->void:
$AudioStreamPlayer.play()
var new = SHOOT_NODE.instantiate()
new.direction = (target.global_position - global_position).normalized()
new.position = target.global_position
@@ -76,4 +77,5 @@ func is_inv() -> bool:
func start_inv(type : bool)->void:
if type == player_2 :
$AudioStreamPlayer2.play()
delay_inv = 0.0

View File

@@ -68,7 +68,7 @@ func spawn():
var new_global_position = Vector2(distance,0).rotated(randf_range(0.0, 360))
new.global_position = new_global_position
new.direction = (player.global_position - new_global_position).normalized()
new.SPEED = randf() * 50 + 50 * ( 1 + (global_time / 200))
new.SPEED = (randf() * 50 + 50) * ( 1 + (global_time / 200))
add_child(new)

View File

@@ -15,10 +15,11 @@ func _process(delta: float) -> void:
time += delta
func update_score(add : int, ast_pos: Vector2)->void:
var temp = 1.5 ** (5-add) * (1 + (time / 100))
$AudioStreamPlayer.play()
var temp = 1.5 ** (5-add) * (7 + (time / 100))
spawn_score(temp,ast_pos)
score += temp
label_score.text = str(score)
label_score.text = GameController.display_score(score)
func update_player(_type:bool) -> void:
player_life -= 1