0.0.2
This commit is contained in:
parent
fadea22b9d
commit
d72b5ac57b
14 changed files with 184 additions and 5 deletions
19
entities/fuse_box.gd
Normal file
19
entities/fuse_box.gd
Normal file
|
@ -0,0 +1,19 @@
|
|||
class_name FuseBox
|
||||
extends StaticBody3D
|
||||
|
||||
var done: bool = false
|
||||
|
||||
func _ready() -> void:
|
||||
if multiplayer.is_server():
|
||||
Multiplayer.fuseboxes += 1
|
||||
|
||||
func _on_fixing_started(body: Node3D) -> void:
|
||||
if multiplayer.is_server() and !done and body is Player:
|
||||
var player: Player = body
|
||||
if !player.hunter:
|
||||
complete_fusebox()
|
||||
|
||||
func complete_fusebox() -> void:
|
||||
($Hinge as Node3D).rotation.y = 0
|
||||
done = true
|
||||
Multiplayer.fuseboxes -= 1
|
Loading…
Add table
Add a link
Reference in a new issue