public void UnTriggerNextObject()
    {
        GameObject      o  = toUnTrigger.Pop();
        RestoringObject ro = o.GetComponent <RestoringObject>();

        ro.UnTriggerObject();
        ro.Key.SetActive(false);
        runtimeKeyData.Add(ro.currKeyData);
        toTrigger.AddFirst(o);
    }
    void SetKey(RestoringObject ro)
    {
        ro.Key.SetActive(true);
        int i = Random.Range(0, runtimeKeyData.Count);

        ro.buttonPress = runtimeKeyData[i].code;
        ro.Key.GetComponent <SpriteRenderer>().sprite = runtimeKeyData[i].sprite;
        ro.Key.GetComponent <Animator>().runtimeAnimatorController = runtimeKeyData[i].anim;
        ro.currKeyData = runtimeKeyData[i];
        runtimeKeyData.Remove(runtimeKeyData[i]);
    }
/*
 *  public void TriggerRandomRestorableObject(){ //triggers a random object that can restore screen space
 *      int i = Random.Range(0, restoringObjects.Count);
 *      restoringObjects[i].GetComponent<RestoringObject>().TriggerObject();
 *  }
 *
 *  public void TriggerRestorableObject(int index)
 *  {
 *      restoringObjects[index].GetComponent<RestoringObject>().TriggerObject();
 *  }
 */
    public void TriggerNextObject()
    {
        if (toTrigger.Count == 0)
        {
            Debug.Log("tried to trigger when no objects are left");
            return;
        }
        GameObject o = toTrigger.First.Value;

        toTrigger.RemoveFirst();
        RestoringObject ro = o.GetComponent <RestoringObject>();

        ro.TriggerObject();
        ro.PlayTriggerSFX();
        SetKey(ro);
        toUnTrigger.Push(o);
        Debug.Log("triggered with " + o.GetComponent <RestoringObject>().buttonPress);
    }