public override void OnStartServer() { if (IsAI == false) { return; } PlayerAnimationController = gameObject.AddComponent <PlayerAnimationController>(); Input = RAGInput.AttachInput(this); IsAuthorityResponsible = true; }
public override void OnStartLocalPlayer() { LocalPlayer = this; Config.Instance.SelectedPlayerType = characterType; Input = RAGInput.AttachInput(this); UIManager.Instance.OnLocalPlayerStarted(this, Input.InputType); MusicManager.Instance.RegisterPlayer(this); Camera.main.GetComponent <PlayerCamera>().ToFollow = transform; PlayerAnimationController = gameObject.AddComponent <PlayerAnimationController>(); gameObject.AddComponent <StudioListener>(); IsAuthorityResponsible = true; }