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

//Designed by Jacob Weedman
//Belongs to the "GameData" GameObject

public class GameData : MonoBehaviour
{
    public static GameData Instance;

    // Game Variables
    public string CharacterName; //
    public string CurrentSector;
    public string CurrentLevel;
    public float MaxHealth;
    public float CurrentHealth;
    public int LevelsCompleted;
    public int BossesDefeated;
    public int EnemiesKilled;
    public int TotalSkillPoints = 0;
    public int AvailableSkillPoints = 0;

    // Sector transfer refrence for main endings
    public Dictionary<string, string> SectorTransferRefrence = new Dictionary<string, string>();


    //Changable setting while playing
    public static float CameraOffset = 5f;

    private void Awake()
    {
        Instance = this;
        DontDestroyOnLoad(gameObject);

        // Set up refrence (names of the scenes) WIP
        SectorTransferRefrence.Add("Sector1Level1","Sector1Boss");
        SectorTransferRefrence.Add("Sector1Boss","Sector6Level1");
        SectorTransferRefrence.Add("Sector6Level1","Sector6Boss");
        SectorTransferRefrence.Add("Sector6Boss","Sector9Level1");
        SectorTransferRefrence.Add("Sector9Level1","Sector9Boss");
        SectorTransferRefrence.Add("Sector9Boss","Plane"); // From the plane the player chooses where to go
        SectorTransferRefrence.Add("Sector2Level1","Sector2Boss");
        SectorTransferRefrence.Add("Sector2Boss","Sector3Level1");
        SectorTransferRefrence.Add("Sector3Level1","Sector3Boss");
        SectorTransferRefrence.Add("Sector3Boss","Sector8Level1");
        SectorTransferRefrence.Add("Sector8Level1","Sector8Boss");
        SectorTransferRefrence.Add("Sector8Boss","Sector5Level1");
        SectorTransferRefrence.Add("Sector5Level1","Sector5Boss");
        SectorTransferRefrence.Add("Sector5Boss","Sector4Level1");
        SectorTransferRefrence.Add("Sector4Level1","Sector4Boss");
        SectorTransferRefrence.Add("Sector4Boss","Sector7Level1");
        SectorTransferRefrence.Add("Sector7Level1","Sector7Boss");
        SectorTransferRefrence.Add("SectorsS1Level1","SectorS1Boss");
        SectorTransferRefrence.Add("SectorsS1Boss","SectorS2Level1");
        SectorTransferRefrence.Add("SectorsS2Boss","Sector8Level1");
        

        //Initialize Variables
        CharacterName = null;
        CurrentLevel = null;
        MaxHealth = 100;
        CurrentHealth = 100;
        TotalSkillPoints = 0;
        AvailableSkillPoints = 0;
        LevelsCompleted = 0;
        BossesDefeated = 0;
        EnemiesKilled = 0;
    }
}
