Ejemplo n.º 1
0
        public void processInput(string s)
        {
            if (s.Contains("iNumSelectable"))
            {
                Debug.Log("Recieved ListPrompt command!");

                ListPrompt p = JsonUtility.FromJson <ListPrompt>(s);
                promptWindowManager.PromptPopup(p);
            }
            else if (s.Contains("sPromptTitle"))
            {
                OpenPrompt p = JsonUtility.FromJson <OpenPrompt>(s);
                promptWindowManager.OpenPromptPopup(p);
            }
            if (s.Contains("currentTempDungeon"))
            {
                GetComponent <GameManager>().activeCampaign = JsonUtility.FromJson <Campaign>(s);
                Debug.Log("Making campaign from JSON");
                if (GetComponent <GameManager>().activeCampaign.currentTempDungeon == null)
                {
                    Debug.Log("Current tempDungeon is null, you have entirely failed.");
                }
                if (GetComponent <GameManager>().activeCampaign.currentTempDungeon != null)
                {
                    Debug.Log("Current tempDungeon is not null");
                }
                GetComponent <GameManager>().activeCampaign.toNormalDungeons();
                if (GetComponent <GameManager>().activeCampaign != null)
                {
                    Debug.Log("Active Campaign isn't null!");
                    //Debug.Log(GetComponent<GameManager>().activeCampaign.toString());
                }
                if (GetComponent <GameManager>().activeCampaign.currentDungeon.dungeonMap != null)
                {
                    Debug.Log("Current dungeonmap isn't null!");
                }
                if (GetComponent <GameManager>().activeCampaign.listParty != null)
                {
                    Debug.Log("listParty isn't null!");
                }
            }
            if (s.Contains("Sending Dungeon of size: "))
            {
                int size = int.Parse(s.Substring(24));
                Debug.Log(size);
                for (int r = 0; r < size; r++)
                {
                    for (int c = 0; c < size; c++)
                    {
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void processInput(string s)
 {
     if (s.Contains("sPromptTitle"))
     {
         Debug.Log("Recieved prompt command!");
         Prompt p = JsonUtility.FromJson <Prompt>(s);
         promptWindowManager.PromptPopup(p);
     }
     if (s.Contains("listParty"))
     {
         GetComponent <GameManager>().activeCampaign = JsonUtility.FromJson <Campaign>(s);
     }
 }