public void ReplaceLevelCode(PsiCode newCode)
        {
            if (GameLevel == null)
            {
                return;
            }

            GameLevel.MainLoop = newCode.Code;
            GameLevel.UpdateLevelCode();
        }
        public void ReplaceLevelCode(PsiCode newCode)
        {
            if (this.currentPsiCode != null)
            {
                this.currentPsiCode.Exit();
            }

            this.currentPsiCode = newCode;
            this.GameLevel.SetVariable("response", newCode.PhaseName);
            newCode.Initialize();

            this.GameLevel.StopAllCoroutines();
            this.GameLevel.MainLoop = newCode.Code;
            this.GameLevel.UpdateLevelCode();
            this.GameLevel.StartCoroutine(this.GameLevel.RunLevelCode());
        }