Example #1
0
        private void PopulateDescriptionText(string sceneToLoad, GameObject character)
        {
            SceneText sceneText = Resources.Load(sceneToLoad) as SceneText;
            string    s         = sceneText.GetText(character);

            descriptionText.text = s;
        }
        private string ReplaceSubstringVariables(string sInput)
        {
            string sModified;

            if (sInput.IndexOf("[Scene:") >= 0)
            {
                string       sceneName         = sInput.Substring(8, sInput.Length - 9);
                AIConversant currentConversant = playerConversant.GetCurrentConversant();

                SceneText sceneText = Resources.Load(sceneName) as SceneText;
                sModified = sceneText.GetText(currentConversant.gameObject);
            }
            else
            {
                sModified = sInput;
            }
            sModified = sModified.Replace("[Player]", playerConversant.playerName);
            sModified = sModified.Replace("[]", "    ");
            return(sModified);
        }