0.1.0
Added a basic test map, options menu, bug fixes, and much more.
This commit is contained in:
parent
d72b5ac57b
commit
2dce012535
34 changed files with 1268 additions and 84 deletions
20
maps/map.gd
20
maps/map.gd
|
@ -4,9 +4,25 @@ extends Node3D
|
|||
func _ready() -> void:
|
||||
if multiplayer.is_server():
|
||||
randomize()
|
||||
Multiplayer.players[randi_range(0, Multiplayer.players.size() - 1)].hunter = true
|
||||
var random_id: int = Multiplayer.players.keys()[randi_range(0, Multiplayer.players.size() - 1)]
|
||||
Multiplayer.players[random_id].hunter = true
|
||||
for i: int in $PlayerSpawners.get_children().size():
|
||||
if i < Multiplayer.players.size():
|
||||
var spawner: PlayerSpawner = $PlayerSpawners.get_child(i)
|
||||
var player: Dictionary = Multiplayer.players[i]
|
||||
var player: Dictionary = Multiplayer.players[Multiplayer.players.keys()[i]]
|
||||
spawner.spawn_player(player)
|
||||
|
||||
func _on_exit_entered(body: Node3D) -> void:
|
||||
if multiplayer.is_server() and (body is Player):
|
||||
var player: Player = body
|
||||
if !player.hunter and Multiplayer.fuseboxes <= 0:
|
||||
Multiplayer.players[player.get_multiplayer_authority()].escaped = true
|
||||
player.get_caught.rpc_id(player.get_multiplayer_authority(), $SpectatorCamera.get_path())
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Multiplayer.fuseboxes <= 0:
|
||||
(($EscapeArea/Light as CSGBox3D).material as StandardMaterial3D).albedo_color.r8 = 0
|
||||
(($EscapeArea/Light as CSGBox3D).material as StandardMaterial3D).albedo_color.g8 = 255
|
||||
else:
|
||||
(($EscapeArea/Light as CSGBox3D).material as StandardMaterial3D).albedo_color.r8 = 255
|
||||
(($EscapeArea/Light as CSGBox3D).material as StandardMaterial3D).albedo_color.g8 = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue