Ejemplo n.º 1
0
 public void AutoHoover(bool on)
 {
     autoHooverOn = on;
     autoHooverOff.SetActive(!autoHooverOn);
     PlayerPrefsExt.SetBool(SaveStrings.sAutoHoover, autoHooverOn);
     autoHooveDialog.SetActive(false);
 }
Ejemplo n.º 2
0
    public void SwitchRankedMode()
    {
        if (isLoggingIn)
        {
            Popup.Make(this, "Now signing in, please wait...");
            return;
        }

        if (OnlinePlayer.Authenticated)
        {
            var ranked = PlayerPrefsExt.GetBool("ranked", false);
            ranked = !ranked;
            PlayerPrefsExt.SetBool("ranked", ranked);
            rankStatusText.text = ranked ? "On" : "Off";
            UpdateBestText();
            if (ranked && !PlayerPrefsExt.GetBool("dont_show_what_is_ranked_mode_again", false))
            {
                UIManager.ShowUiElement("WhatIsRankedModeBackground", "MusicSelection");
                UIManager.ShowUiElement("WhatIsRankedModeRoot", "MusicSelection");
            }

            if (ranked)
            {
                EventKit.Broadcast("reload rankings");
            }
        }
        else
        {
            UIManager.ShowUiElement("LoginRoot", "MusicSelection");
            UIManager.ShowUiElement("LoginBackground", "MusicSelection");
        }
    }
Ejemplo n.º 3
0
    void Awake()
    {
        instance = this;
        DontDestroyOnLoad(gameObject);

        //Set music on or off
        if (PlayerPrefs.HasKey(SaveStrings.sMusic))
        {
            musicMuted = PlayerPrefsExt.GetBool(SaveStrings.sMusic);
        }
        else
        {
            musicMuted = false;
            PlayerPrefsExt.SetBool(SaveStrings.sMusic, musicMuted);
        }

        //Set sounds on or off
        if (PlayerPrefs.HasKey(SaveStrings.sSounds))
        {
            soundMuted = PlayerPrefsExt.GetBool(SaveStrings.sSounds);
        }
        else
        {
            soundMuted = false;
            PlayerPrefsExt.SetBool(SaveStrings.sSounds, soundMuted);
        }
    }
 public void SwitchRankedMode()
 {
     if (isLoggingIn)
     {
         Popup.Make(this, "Now signing in, please wait...");
         return;
     }
     if (LocalProfile.Exists())
     {
         var ranked = PlayerPrefsExt.GetBool(PreferenceKeys.RankedMode(), false);
         ranked = !ranked;
         PlayerPrefsExt.SetBool(PreferenceKeys.RankedMode(), ranked);
         rankStatusText.text = ranked ? "On" : "Off";
         UpdateBestText();
         if (ranked && !PlayerPrefsExt.GetBool("dont_show_what_is_ranked_mode_again", false))
         {
             UIManager.ShowUiElement("WhatIsRankedModeBackground", "MusicSelection");
             UIManager.ShowUiElement("WhatIsRankedModeRoot", "MusicSelection");
         }
     }
     else
     {
         UIManager.ShowUiElement("LoginRoot", "MusicSelection");
         UIManager.ShowUiElement("LoginBackground", "MusicSelection");
     }
 }
Ejemplo n.º 5
0
    void OnLevelWasLoaded(int level)
    {
        if (GameObject.Find("LoadImage") != null)
        {
            GameObject.Find("LoadImage").transform.localScale = new Vector3(1f, 0f, 1f);
        }
        if (GameObject.Find("EventSystem") != null)
        {
            GameObject.Find("EventSystem").GetComponent <EventSystem>().pixelDragThreshold = (int)(pixelDragThresholdMultiplier * ((float)Screen.width / (float)Screen.height));
        }

        //Quit the game when player press back button
        if (level == 1)
        {
            EventManager.StartListening(SaveStrings.eEscape, Application.Quit);
        }
        else
        {
            EventManager.StopListening(SaveStrings.eEscape, Application.Quit);
        }

        Time.timeScale = 1;

        if (level == 1 && !PlayerPrefs.HasKey("FirstLogin"))
        {
            PlayerPrefsExt.SetBool("FirstLogin", true);
            GameManager.LoadLevel("GameStory");
            return;
        }
        if (level == 1 && showLevelEnd)
        {
            GameObject.Find("LevelEnd").GetComponent <LevelEndManager>().UpdateLevelEnd(this);
            SaveLoad.SaveWallet(wallet);
        }
    }
Ejemplo n.º 6
0
 public void SetChannelMaskOn(int channel, bool isOn)
 {
     if (this.ChannelMaskOnList.ContainsKey(channel))
     {
         this.ChannelMaskOnList.set_Item(channel, isOn);
         PlayerPrefsExt.SetBool("CHANNEL_MASK_TAG" + channel, isOn);
     }
 }
Ejemplo n.º 7
0
 public static void Save(Level level)
 {
     PlayerPrefsExt.SetBool(level.name + "Star1", level.star1);
     PlayerPrefsExt.SetBool(level.name + "Star2", level.star2);
     PlayerPrefsExt.SetBool(level.name + "Star3", level.star3);
     PlayerPrefsExt.SetBool(level.name + "Ruby", level.rubyFound);
     PlayerPrefsExt.SetBool(level.name + "Unlocked", level.unlocked);
     PlayerPrefs.SetFloat(level.name + "BestTime", level.bestTime);
 }
Ejemplo n.º 8
0
 public void SetBulletCurtainOn(int channel, bool isOn)
 {
     if (this.IsBulletCurtainOnList.ContainsKey(channel))
     {
         this.IsBulletCurtainOnList.set_Item(channel, isOn);
         PlayerPrefsExt.SetBool("IsBulletCurtainOn" + channel, isOn);
         this.ShowBulletCurtainUnits(channel, isOn);
     }
 }
Ejemplo n.º 9
0
    public void LoadInfo()
    {
        if (PlayerPrefs.HasKey(name + "Star1"))
        {
            star1 = PlayerPrefsExt.GetBool(name + "Star1");
        }
        else
        {
            PlayerPrefsExt.SetBool(name + "Star1", false);
        }

        if (PlayerPrefs.HasKey(name + "Star2"))
        {
            star2 = PlayerPrefsExt.GetBool(name + "Star2");
        }
        else
        {
            PlayerPrefsExt.SetBool(name + "Star2", false);
        }

        if (PlayerPrefs.HasKey(name + "Star3"))
        {
            star3 = PlayerPrefsExt.GetBool(name + "Star3");
        }
        else
        {
            PlayerPrefsExt.SetBool(name + "Star3", false);
        }

        if (PlayerPrefs.HasKey(name + "Ruby"))
        {
            rubyFound = PlayerPrefsExt.GetBool(name + "Ruby");
        }
        else
        {
            PlayerPrefsExt.SetBool(name + "Ruby", false);
        }

        if (PlayerPrefs.HasKey(name + "Unlocked"))
        {
            unlocked = PlayerPrefsExt.GetBool(name + "Unlocked");
        }
        else
        {
            PlayerPrefsExt.SetBool(name + "Unlocked", false);
        }

        if (PlayerPrefs.HasKey(name + "BestTime"))
        {
            bestTime = PlayerPrefs.GetFloat(name + "BestTime");
        }
        else
        {
            PlayerPrefs.SetFloat(name + "BestTime", 999f);
        }
    }
Ejemplo n.º 10
0
 public static void MuteSounds(bool mute)
 {
     instance.soundMuted = mute;
     SoundObject[] so = GameObject.FindObjectsOfType <SoundObject>();
     foreach (SoundObject s in so)
     {
         s.Mute(mute);
     }
     PlayerPrefsExt.SetBool(SaveStrings.sSounds, mute);
 }
Ejemplo n.º 11
0
        private void Awake()
        {
            toggle = GetComponentInChildren <Toggle>();
            toggle.onValueChanged.AddListener(OnValueChanged);
            if (!PlayerPrefs.HasKey(Key))
            {
                PlayerPrefsExt.SetBool(Key, toggle.isOn);
            }

            toggle.isOn = PlayerPrefsExt.GetBool(Key);
        }
Ejemplo n.º 12
0
 public void SetChannelTipOn(int channel, bool isOn)
 {
     if (this.ChannelTipOnList.ContainsKey(channel))
     {
         this.ChannelTipOnList.set_Item(channel, isOn);
         PlayerPrefsExt.SetBool("CHANNEL_TIP_TAG" + channel, isOn);
         if (channel == 4 && !isOn)
         {
             ChatManager.Instance.SetChannelPrivateTip(false);
         }
     }
 }
    public void Logout()
    {
        CancelLogin();
        PlayerPrefs.DeleteKey(PreferenceKeys.LastUsername());
        PlayerPrefs.DeleteKey(PreferenceKeys.LastPassword());
        CloseProfileWindows();
        avatarImage.overrideSprite = null;
        LocalProfile.reset();
        Popup.Make(this, "Signed out.");

        PlayerPrefsExt.SetBool(PreferenceKeys.RankedMode(), false);
        rankStatusText.text = "Off";
    }
Ejemplo n.º 14
0
 public void SaveSetting()
 {
     PlayerPrefsExt.SetBool("IsGuideOnName", SystemConfig.IsGuideSystemOn);
     PlayerPrefsExt.SetBool("IsPostProcessOnName", SystemConfig.IsPostProcessOn);
     PlayerPrefsExt.SetBool("PP_MotionBlurOnName", SystemConfig.PP_MotionBlurOn);
     PlayerPrefsExt.SetBool("PP_BloomOnName", SystemConfig.PP_BloomOn);
     PlayerPrefsExt.SetBool("IsResolutionOnName", SystemConfig.IsSetHardwareResolutionOn);
     PlayerPrefs.SetInt("ResolutionWidthName", SystemConfig.RESOLUTION_WIDTH);
     PlayerPrefs.SetInt("PeopleNumName", GameLevelManager.GameLevelVariable.PeopleNum);
     PlayerPrefs.SetInt("QualityOfLODName", GameLevelManager.GameLevelVariable.LODLEVEL);
     PlayerPrefs.SetInt("AAName", QualitySettings.get_antiAliasing());
     PlayerPrefsExt.SetBool("IsMusicOnName", SystemConfig.IsMusicOn);
     PlayerPrefsExt.SetBool("IsHeadInfoOnName", SystemConfig.IsHeadInfoOn);
     PlayerPrefsExt.SetBool("IsManNumOnName", SystemConfig.IsManNumOn);
 }
Ejemplo n.º 15
0
    public void Logout()
    {
        CancelLogin();
        PlayerPrefs.DeleteKey(PreferenceKeys.LastUsername());
        PlayerPrefs.DeleteKey(PreferenceKeys.LastPassword());
        CloseProfileWindows();

        OnlinePlayer.Invalidate();
        LoadedAvatar = false;
        Popup.Make(this, "Signed out.");

        PlayerPrefsExt.SetBool("ranked", false);
        rankStatusText.text = "Off";

        UpdateBestText();
    }
Ejemplo n.º 16
0
    public void DoAction()
    {
        switch (action)
        {
        case Action.Go:
            print("Loading Game scene.");

            PlayerPrefsExt.SetBool("early_late_indicator", earlyLateIndicatorToggle.isOn);
            PlayerPrefsExt.SetBool("larger_hitboxes", largerHitboxesToggle.isOn);

            BackgroundCanvasHelper.PersistBackgroundCanvas();

            SceneManager.LoadScene("CytusGame");
            break;
        }
    }
Ejemplo n.º 17
0
 public static void MuteMusic(bool mute)
 {
     instance.musicMuted = mute;
     MusicObject[] mo = GameObject.FindObjectsOfType <MusicObject>();
     foreach (MusicObject m in mo)
     {
         m.Mute(mute);
         if (instance.musicSource.isPlaying == false && mute == false)
         {
             AudioClip c = m.clips;
             if (c != null)
             {
                 PlayMusic(c);
             }
         }
     }
     PlayerPrefsExt.SetBool(SaveStrings.sMusic, mute);
 }
Ejemplo n.º 18
0
    public void DoAction()
    {
        switch (action)
        {
        case Action.Go:
            print("Loading Game scene.");

            PlayerPrefs.SetFloat("user_offset", float.Parse(userOffsetInput.text));
            PlayerPrefsExt.SetBool("show_scanner", showScannerToggle.isOn);
            PlayerPrefsExt.SetBool("inverse", isInversedToggle.isOn);
            PlayerPrefs.SetString("ring_color", ringColorInput.text);
            PlayerPrefs.SetString("ring_color_alt", ringColorAltInput.text);
            PlayerPrefs.SetString("fill_color", fillColorInput.text);
            PlayerPrefs.SetString("fill_color_alt", fillColorAltInput.text);

            BackgroundCanvasHelper.PersistBackgroundCanvas();
            SceneManager.LoadScene("Game");
            break;
        }
    }
Ejemplo n.º 19
0
    void Start()
    {
        //Set autohoover on or off
        if (PlayerPrefs.HasKey(SaveStrings.sAutoHoover))
        {
            autoHooverOn = PlayerPrefsExt.GetBool(SaveStrings.sAutoHoover);
        }
        else
        {
            autoHooverOn = true;
            PlayerPrefsExt.SetBool(SaveStrings.sAutoHoover, autoHooverOn);
        }

        manager          = GameObject.FindObjectOfType <GameManager>();
        settingsAnimator = GetComponent <Animator>();
        showSettings     = false;

        musicMuted = SoundMusic.MusicMuted;
        soundMuted = SoundMusic.SoundMuted;
        InitButtons();
    }
Ejemplo n.º 20
0
 private void SetDefaultPref(string key, object value)
 {
     if (!PlayerPrefs.HasKey(key))
     {
         if (value is bool)
         {
             PlayerPrefsExt.SetBool(key, (bool)value);
         }
         else if (value is float)
         {
             PlayerPrefs.SetFloat(key, (float)value);
         }
         else if (value is int)
         {
             PlayerPrefs.SetInt(key, (int)value);
         }
         else if (value is string)
         {
             PlayerPrefs.SetString(key, (string)value);
         }
     }
 }
Ejemplo n.º 21
0
 public void CheckMarkToggle()
 {
     clicked = !clicked;
     if (!clicked)
     {
         sfx.SetActive(false);
         PlayerPrefsExt.SetBool("SFXToggle", false);
         if (sfx.activeSelf == false)
         {
             checkmark.SetActive(false);
         }
     }
     else
     {
         sfx.SetActive(true);
         PlayerPrefsExt.SetBool("SFXToggle", true);
         if (sfx.activeSelf == true)
         {
             checkmark.SetActive(true);
         }
     }
 }
Ejemplo n.º 22
0
	public void CheckMarkToggle()
	{
		clicked = !clicked;
		if (!clicked)
		{
			checkmark.SetActive(true);
			PlayerPrefsExt.SetBool("MusicToggle", true);
			if(checkmark.activeSelf == true)
			{
				audioSource.Play();
			}
		}
		else
		{
			checkmark.SetActive(false);
			PlayerPrefsExt.SetBool("MusicToggle", false);
			if (checkmark.activeSelf == false)
			{
				audioSource.Pause();
			}
		}
	}
Ejemplo n.º 23
0
 public void DontShowWhatIsRankedModeAgain()
 {
     PlayerPrefsExt.SetBool("dont_show_what_is_ranked_mode_again", true);
 }
Ejemplo n.º 24
0
    protected override void Awake()
    {
        base.Awake();

        CytoidApplication.SetAutoRotation(true);
        CytoidApplication.ResetResolution();

        var ringColorDef    = "#FFFFFF";
        var ringColorAltDef = "#FFFFFF";
        var fillColorDef    = "#6699CC";
        var fillColorAltDef = "#FF3C38";

        SetDefaultPref("main offset", Application.platform == RuntimePlatform.Android ? 0f : 0.1f);
        SetDefaultPref("headset offset", -0.05f);
        SetDefaultPref("show_scanner", true);
        SetDefaultPref("inverse", false);
        SetDefaultPref("ring_color", ringColorDef);
        SetDefaultPref("ring_color_alt", ringColorAltDef);
        SetDefaultPref("fill_color", fillColorDef);
        SetDefaultPref("fill_color_alt", fillColorAltDef);
        SetDefaultPref("hit_sound", "None");

        var list = HitSounds.ToList();

        list.Insert(0, new HitSound {
            Name = "None"
        });
        HitSounds = list.ToArray();
        UpdateHitSound(HitSounds[1], save: false);

        var userHitSound = PlayerPrefs.GetString("hit_sound");

        for (var index = 0; index < HitSounds.Length; index++)
        {
            if (HitSounds[index].Name == userHitSound)
            {
                UpdateHitSound(HitSounds[index]);
                HitSoundIndex = index;
            }
        }

        mainOffsetInput.text          = PlayerPrefs.GetFloat("main offset").ToString();
        headsetOffsetInput.text       = PlayerPrefs.GetFloat("headset offset").ToString();
        earlyLateIndicatorToggle.isOn = PlayerPrefsExt.GetBool("early_late_indicator");
        largerHitboxesToggle.isOn     = PlayerPrefsExt.GetBool("larger_hitboxes");

        mainOffsetInput.onEndEdit.AddListener(text =>
        {
            float offset;
            if (!float.TryParse(text, out offset))
            {
                mainOffsetInput.text = PlayerPrefs.GetFloat("main offset").ToString();
            }
            else
            {
                PlayerPrefs.SetFloat("main offset", offset);
            }
        });
        chartRelativeOffsetInput.onEndEdit.AddListener(text =>
        {
            float offset;
            if (!float.TryParse(text, out offset))
            {
                chartRelativeOffsetInput.text = ZPlayerPrefs.GetFloat(PreferenceKeys.ChartRelativeOffset(CytoidApplication.CurrentLevel.id)).ToString();
            }
            else
            {
                ZPlayerPrefs.SetFloat(PreferenceKeys.ChartRelativeOffset(CytoidApplication.CurrentLevel.id), offset);
            }
        });
        headsetOffsetInput.onEndEdit.AddListener(text =>
        {
            float offset;
            if (!float.TryParse(text, out offset))
            {
                headsetOffsetInput.text = PlayerPrefs.GetFloat("headset offset").ToString();
            }
            else
            {
                PlayerPrefs.SetFloat("headset offset", offset);
            }
        });

        usernameInput.text = PlayerPrefs.GetString(PreferenceKeys.LastUsername());
        passwordInput.text = PlayerPrefs.GetString(PreferenceKeys.LastPassword());

        if (!PlayerPrefs.HasKey("ranked"))
        {
            PlayerPrefsExt.SetBool("ranked", false);
        }

        rankStatusText.text = OnlinePlayer.Authenticated && PlayerPrefsExt.GetBool("ranked") ? "On" : "Off";

        // Initialize background
        blackout.SetActive(false);

        var backgrounds = GameObject.FindGameObjectsWithTag("Background");

        if (backgrounds.Length > 1) // Already have persisted background? (i.e. returning from Game/GameResult scene)
        {
            var localBackground = backgrounds.ToList().Find(it => it.scene == gameObject.scene);
            // Destroy local background
            Destroy(localBackground);
            // Setup the persisted background
            BackgroundCanvasHelper.SetupBackgroundCanvas(gameObject.scene);
        }
        else // Setup the local background
        {
            BackgroundCanvasHelper.SetupBackgroundCanvas(gameObject.scene);
        }

        if (OnlinePlayer.Authenticated && OnlinePlayer.AvatarTexture != null)
        {
            LoadedAvatar = true;
        }

        if (Application.platform == RuntimePlatform.Android)
        {
            headsetOffsetInput.gameObject.SetActive(false);
            LayoutRebuilder.ForceRebuildLayoutImmediate(headsetOffsetInput.transform.parent.GetComponent <RectTransform>());
        }

        EventKit.Subscribe <string>("meta reloaded", OnLevelMetaReloaded);
    }
Ejemplo n.º 25
0
 private void OnValueChanged(bool on)
 {
     PlayerPrefsExt.SetBool(Key, on);
 }
Ejemplo n.º 26
0
    public float[] levelTimeChallenges;     //Array that contains the time limits for each level in the set

    public void Save()
    {
        PlayerPrefsExt.SetBool(levelSetName + "Set", unlocked);
        PlayerPrefsExt.SetBool(levelSetName + "Animation", animated);
        PlayerPrefsExt.SetBool(levelSetName + "Completed", completed);
    }
    protected override void Awake()
    {
        base.Awake();

        CytoidApplication.SetAutoRotation(true);

        var userOffsetDef   = Application.platform == RuntimePlatform.Android ? 0.12f : 0.2f;
        var ringColorDef    = "#FFFFFF";
        var ringColorAltDef = "#FFFFFF";
        var fillColorDef    = "#6699CC";
        var fillColorAltDef = "#FF3C38";

        SetDefaultPref("user_offset", userOffsetDef);
        SetDefaultPref("show_scanner", true);
        SetDefaultPref("inverse", false);
        SetDefaultPref("ring_color", ringColorDef);
        SetDefaultPref("ring_color_alt", ringColorAltDef);
        SetDefaultPref("fill_color", fillColorDef);
        SetDefaultPref("fill_color_alt", fillColorAltDef);
        SetDefaultPref("hit_sound", "None");

        var list = HitSounds.ToList();

        list.Insert(0, new HitSound {
            Name = "None", Clip = null
        });
        HitSounds = list.ToArray();
        UpdateHitSound(HitSounds[1], save: false);

        var userHitSound = PlayerPrefs.GetString("hit_sound");

        for (var index = 0; index < HitSounds.Length; index++)
        {
            if (HitSounds[index].Name == userHitSound)
            {
                UpdateHitSound(HitSounds[index]);
                HitSoundIndex = index;
            }
        }

        userOffsetInput.text          = PlayerPrefs.GetFloat("user_offset").ToString();
        showScannerToggle.isOn        = PlayerPrefsExt.GetBool("show_scanner");
        earlyLateIndicatorToggle.isOn = PlayerPrefsExt.GetBool("early_late_indicator");
        largerHitboxesToggle.isOn     = PlayerPrefsExt.GetBool("larger_hitboxes");
        isInversedToggle.isOn         = PlayerPrefsExt.GetBool("inverse");
        ringColorInput.text           = PlayerPrefs.GetString("ring_color");
        ringColorAltInput.text        = PlayerPrefs.GetString("ring_color_alt");
        fillColorInput.text           = PlayerPrefs.GetString("fill_color");
        fillColorAltInput.text        = PlayerPrefs.GetString("fill_color_alt");

        userOffsetInput.onEndEdit.AddListener(text =>
        {
            float offset;
            if (!float.TryParse(text, out offset))
            {
                userOffsetInput.text = userOffsetDef.ToString();
            }
        });
        overrideOptionsToggle.onValueChanged.AddListener(selected =>
        {
            ZPlayerPrefs.SetBool(PreferenceKeys.WillOverrideOptions(CytoidApplication.CurrentLevel), selected);
        });
        localIsInversedToggle.onValueChanged.AddListener(selected =>
        {
            ZPlayerPrefs.SetBool(PreferenceKeys.WillInverse(CytoidApplication.CurrentLevel), selected);
        });
        localUserOffsetInput.onEndEdit.AddListener(text =>
        {
            float offset;
            if (!float.TryParse(text, out offset))
            {
                localUserOffsetInput.text = userOffsetInput.text;
            }
            else
            {
                ZPlayerPrefs.SetFloat(PreferenceKeys.NoteDelay(CytoidApplication.CurrentLevel), offset);
            }
        });
        ringColorInput.onEndEdit.AddListener(text =>
        {
            try
            {
                Convert.HexToColor(text);
            }
            catch (Exception)
            {
                ringColorInput.text = ringColorDef;
            }
        });
        ringColorAltInput.onEndEdit.AddListener(text =>
        {
            try
            {
                Convert.HexToColor(text);
            }
            catch (Exception)
            {
                ringColorAltInput.text = ringColorAltDef;
            }
        });
        fillColorInput.onEndEdit.AddListener(text =>
        {
            try
            {
                Convert.HexToColor(text);
            }
            catch (Exception)
            {
                fillColorInput.text = fillColorDef;
            }
        });
        fillColorAltInput.onEndEdit.AddListener(text =>
        {
            try
            {
                Convert.HexToColor(text);
            }
            catch (Exception)
            {
                fillColorAltInput.text = fillColorAltDef;
            }
        });
        usernameInput.text = PlayerPrefs.GetString(PreferenceKeys.LastUsername());
        passwordInput.text = PlayerPrefs.GetString(PreferenceKeys.LastPassword());

        if (!PlayerPrefs.HasKey(PreferenceKeys.RankedMode()))
        {
            PlayerPrefsExt.SetBool(PreferenceKeys.RankedMode(), false);
        }

        rankStatusText.text = "Off";

        // Initialize background
        blackout.SetActive(false);

        var backgrounds = GameObject.FindGameObjectsWithTag("Background");

        if (backgrounds.Length > 1) // Already have persisted background? (i.e. returning from Game/GameResult scene)
        {
            var localBackground = backgrounds.ToList().Find(it => it.scene == gameObject.scene);
            // Destroy local background
            Destroy(localBackground);
            // Setup the persisted background
            BackgroundCanvasHelper.SetupBackgroundCanvas(gameObject.scene);
        }
        else // Setup the local background
        {
            BackgroundCanvasHelper.SetupBackgroundCanvas(gameObject.scene);
        }
    }