class_name Player extends Node3D const PLAYER_SIZE: float = 0.4 const SPEED: float = 25. var game: Game var position_ = Vector2(0, 0) var mesh = preload("res://scenes/player.tscn").instantiate() func _init(id: int, new_name: String, pos: Vector2, _character: int, new_game: Game): add_child(mesh) position_ = pos name = new_name game = new_game func update_position(new_position: Vector2, new_rotation: float): position_ = new_position rotation.y = new_rotation func _process(delta): position.x = position_.x position.z = position_.y