forked from interstellar_development/freeftf
new work towards M8
This commit is contained in:
parent
5cd0c24223
commit
bb7fd5cb3b
13 changed files with 194 additions and 75 deletions
|
|
@ -79,7 +79,6 @@ func reset():
|
|||
func save_setting(setting_name, value):
|
||||
settings[setting_name] = value
|
||||
Save.saveJSON("user://settings.json", settings)
|
||||
print("saved")
|
||||
|
||||
func apply_settings():
|
||||
players = player_list.size() - 1
|
||||
|
|
@ -105,24 +104,24 @@ func start_game():
|
|||
apply_settings()
|
||||
|
||||
func player_hit(target, beast):
|
||||
target = get_tree().root.get_node("./"+map_name+"/"+target)
|
||||
beast = get_tree().root.get_node("./"+map_name+"/"+beast)
|
||||
target = get_tree().root.get_node(target)
|
||||
beast = get_tree().root.get_node(beast)
|
||||
if !target.is_frozen:
|
||||
target.captured(beast)
|
||||
beast.got_one(target)
|
||||
|
||||
func sync_player(node_name, position, rotation):
|
||||
if get_tree().root.has_node("./"+map_name+"/"+node_name):
|
||||
var current_character = get_tree().root.get_node("./"+map_name+"/"+node_name)
|
||||
func sync_player(node_path, position, rotation):
|
||||
if get_tree().root.has_node(node_path):
|
||||
var current_character = get_tree().root.get_node(node_path)
|
||||
current_character.position = position
|
||||
current_character.rotation = rotation
|
||||
|
||||
func sync_hammer(node_name, rotation):
|
||||
var current_character = get_tree().root.get_node("./"+map_name+"/"+node_name+"/hammer")
|
||||
func sync_hammer(node_path, rotation):
|
||||
var current_character = get_tree().root.get_node(node_path)
|
||||
current_character.rotation = rotation
|
||||
|
||||
func sync_computers(node_name, current):
|
||||
var current_character = get_tree().root.get_node("./"+map_name+"/computers/"+node_name)
|
||||
func sync_computers(node_path, current):
|
||||
var current_character = get_tree().root.get_node(node_path)
|
||||
current_character.current = current
|
||||
|
||||
func sync_beast(player):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue