Improved animation performance
This commit is contained in:
@ -10,7 +10,8 @@ func _ready():
|
||||
timer.timeout.connect(tick)
|
||||
|
||||
func tick():
|
||||
PerformanceComponent.update_all_animations()
|
||||
var visible_players := PerformanceComponent.get_visible_players_sorted_by_distance()
|
||||
AnimationPerformance.update_animation_quality(visible_players)
|
||||
|
||||
func add(player: Player):
|
||||
if has(player.id):
|
||||
@ -20,7 +21,7 @@ func add(player: Player):
|
||||
id_to_player[player.id] = player
|
||||
|
||||
func get_player(id: String) -> Player:
|
||||
return id_to_player[id] as Player
|
||||
return id_to_player.get(id) as Player
|
||||
|
||||
func has(id: String) -> bool:
|
||||
return id_to_player.has(id)
|
||||
|
Reference in New Issue
Block a user