/*
     * Function: SaveBetweenScenes
     *
     * Description: stores all player and quest data in global control just before scenes
     * are changed.
     * Creator: Myles Hagen
     */
    public void SaveBetweenScenes()
    {
        sceneNum                    = SceneManager.GetActiveScene().buildIndex;
        SceneChange                 = true;
        SceneChangeItems            = true;
        savedPlayerData.level       = Player.instance.playerStats.level;
        savedPlayerData.HP          = Player.instance.playerStats.currentHealth;
        savedPlayerData.currentXP   = Player.instance.playerStats.currentExperience;
        savedPlayerData.targetExp   = Player.instance.playerStats.targetExperience;
        savedPlayerData.currentRage = Player.instance.playerStats.currentRage;
        savedPlayerData.currentgold = Player.instance.playerStats.gold;
        savedItems.Clear();

        foreach (Item i in Inventory.instance.items)
        {
            savedItems.Add(i);
        }
        for (int i = 0; i < EquipmentManager.instance.Potions.Length; i++)
        {
            savedPotions[i] = EquipmentManager.instance.Potions[i];
        }
        for (int i = 0; i < EquipmentManager.instance.currentEquipment.Length; i++)
        {
            savedEquipment[i] = EquipmentManager.instance.currentEquipment[i];
            savedSKillDash[i] = EquipmentManager.instance.Skill_Dash[i];
            if (i < 5)
            {
                savedSkillProjectile[i] = EquipmentManager.instance.Skill_Projectile[i];
            }
            if (i < 4)
            {
                savedSkillAOE[i] = EquipmentManager.instance.Skill_AOE[i];
            }
        }
        int sceneID = SceneManager.GetActiveScene().buildIndex;

        foreach (KeyValuePair <int, SaveDroppableList> itemList in SceneItemsLists)
        {
            if (itemList.Key == sceneID && SaveEvent != null)
            {
                for (int i = 0; i < SaveEvent.GetInvocationList().Length; i++)
                {
                    itemList.Value.SavedItems.Add((SaveDroppableItem)SaveEvent.GetInvocationList()[i].DynamicInvoke());
                }
                //Debug.Log("size of SavedItems" + itemList.Value.SavedItems.Count);
            }
        }
        FindNPCSaveBool();
        FindQuestObjectSave();
    }