using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class Party : MonoBehaviour
{

    [Header("Players")]
    [SerializeField]
    private SimpleCharacter player1;
    [SerializeField]
    private SimpleCharacter
        player2,
        player3;

    [SerializeField] private GameObject otherCamera;
    public void Initiate()
    {
        otherCamera.SetActive(false);
        StartCoroutine(WaitForSceneTransition(15));
    }

    public void SetPlayerVisuals(CharacterRandomizer.Character character1, CharacterRandomizer.Character character2, CharacterRandomizer.Character character3)
    {

        player1.SetHeadSprites(character1);

        player2.SetHeadSprites(character2);

        player3.SetHeadSprites(character3);

    }

    private IEnumerator WaitForSceneTransition(float seconds)
    {
        yield return new WaitForSeconds(seconds);
        NextScene();
    }

    private void NextScene()
    {
        SceneManager.LoadScene(0);
    }
}
