// Start is called before the first frame update
    void Start()
    {
        Enemy = FindObjectOfType <Enemy>();
        Enemy.EnemySelected += EndGame;

        User myUser = JSONManager.DeserealizeData <User>(Path.Combine(Application.persistentDataPath, "UserInfo.json"));

        PlayerProfile.GetComponentInChildren <Text>().text = myUser.Name;

        PlayerProfile.GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprites/zodiac/" + myUser.Star);

        gameMode = (Gamemodes)PlayerPrefs.GetInt("Multi");

        if (gameMode == Gamemodes.Multi)
        {
            MultiManager.Inctance.EnemySelected     += Multimanager_EnemySelected;
            MultiManager.Inctance.EnemyInfoReceived += Multimanager_EnemyInfoReceived;
        }
    }
 private void SetUserVariable()
 {
     user = JSONManager.DeserealizeData <User>(Path.Combine(Application.persistentDataPath, "Userinfo.json"));
 }