public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            Debug.Log("Server spawning player.");
            float[] locationArray = anObjectIn.GetFloatArray("Location");
            float aRotation = anObjectIn.GetFloat("Rotation");
            string aCharacterName = anObjectIn.GetUtfString("CharacterName");

            if(anObjectIn.GetBool("IsLocal"))
            {
                GameObject aLocalPlayer = ourGWM.createObject("Prefabs/Player/PlayerBasic");
                aLocalPlayer.transform.position = new Vector3(locationArray[0], locationArray[1], locationArray[2]);
                aLocalPlayer.transform.rotation = Quaternion.identity;

                // Since this is the local player, lets add a controller and fix the camera
                aLocalPlayer.AddComponent<LocalPlayerController>();
                aLocalPlayer.AddComponent<InputController>();
                ourGWM.setLPC(aLocalPlayer.GetComponent<LocalPlayerController>());
                ourGWM.getLPC().SetName(aCharacterName);
                aLocalPlayer.GetComponentInChildren<TextMesh>().text = aCharacterName;

                GameObject cameraAttach = new GameObject();
                cameraAttach.transform.parent = aLocalPlayer.transform;
                cameraAttach.transform.localPosition = new Vector3(1f, 2.5f, 1.0f);
                cameraAttach.name = "Camera Target";
                Camera.main.transform.parent = cameraAttach.transform;
                Camera.main.GetComponent<CameraController>().setTarget(cameraAttach);
                Camera.main.GetComponent<CameraController>().setCursorVisible(false);
            }
            else if(!anObjectIn.GetBool("IsLocal"))
            {
                GameObject aRemotePlayer = ourGWM.createObject("Prefabs/Player/PlayerBasic");

                aRemotePlayer.name = "GameCharacter_" + aCharacterName;
                aRemotePlayer.AddComponent<RemotePlayerController>();
                aRemotePlayer.transform.position = new Vector3(locationArray[0], locationArray[1], locationArray[2]);
                aRemotePlayer.GetComponent<RemotePlayerController>().SetRotation(aRotation);
                aRemotePlayer.GetComponentInChildren<TextMesh>().text = aCharacterName;

                //Add Newly spawned player to Dictionary
                ourGWM.getPlayerDictionary().Add(aCharacterName, aRemotePlayer);
            }
        }
        public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            string aSettlementName = anObjectIn.GetUtfString("Name");
            int ID = anObjectIn.GetInt("ID");
            float[] location = anObjectIn.GetFloatArray("LocationArray");
            int level = anObjectIn.GetInt("CenterNodeLevel");

            GameObject aSettlement = ourGWM.createObject("Prefabs/Settlements/" + aSettlementName + "/" + level.ToString());
            aSettlement.name = "Settlement_" + aSettlementName + "_" + ID;
            aSettlement.transform.position = new Vector3(location[0], location[1], location[2]);
        }
        public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            string aResourceName = anObjectIn.GetUtfString("Name");
            int ID = anObjectIn.GetInt("ID");
            float[] location = anObjectIn.GetFloatArray("Location");

            GameObject aResource = ourGWM.createObject("Prefabs/Resources/" + aResourceName);
            aResource.name = "Resource_" + aResourceName + "_" + ID;
            aResource.transform.position = new Vector3(location[0], location[1], location[2]);

            //Add Newly spawned resource to Dictionary
            ourGWM.getResourceDictionary().Add(ID, aResource);
        }
        public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            string[] types = anObjectIn.GetUtfStringArray("Type");
            int[] levels = anObjectIn.GetIntArray("Level");
            string[] location = anObjectIn.GetUtfStringArray("Location");

            for(int i = 0; i < levels.Length; i++)
            {
                GameObject aNode;
                if(levels[i] == 0)
                {
                    aNode = ourGWM.createObject("Prefabs/Settlements/WoodSign");
                }
                else
                {
                    aNode = ourGWM.createObject("Prefabs/Settlements/" + types[i] + "/" + levels[i].ToString());
                }
                aNode.name = "Node_" + types[i] + "_" + levels[i];
                aNode.transform.position = new Vector3(Convert.ToSingle(location[i].Split(',')[0]), Convert.ToSingle(location[i].Split(',')[1]), Convert.ToSingle(location[i].Split(',')[2]));
                aNode.transform.rotation = new Quaternion(0, Convert.ToSingle(location[i].Split(',')[3]), 0, 0);
            }
        }
        public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            string aNPCName = anObjectIn.GetUtfString("Name");
            int ID = anObjectIn.GetInt("ID");
            float[] location = anObjectIn.GetFloatArray("Location");

            GameObject aNPC = ourGWM.createObject("Prefabs/NPC/" + aNPCName);
            aNPC.name = "NPC_" + aNPCName + "_" + ID;
            aNPC.AddComponent<RemotePlayerController>();
            aNPC.transform.position = new Vector3(location[0], location[1], location[2]);
            aNPC.GetComponentInChildren<TextMesh>().text = aNPCName;

            //Add Newly spawned player to Dictionary
            ourGWM.getNPCDictionary().Add(ID, aNPC);
        }
        public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
        {
            GameObject aContributionPanel = ourGWM.createObject("UI/ContributionPanel");
            aContributionPanel.name = "ContributionPanel";
            aContributionPanel.transform.SetParent(GameObject.Find("UICanvas").transform);
            aContributionPanel.transform.localPosition = new Vector3(0, 0, 0);
            aContributionPanel.transform.FindChild("ExitButton").GetComponent<Button>().onClick.AddListener(() => GameObject.Find("SceneScriptsObject").GetComponent<GameUI>().contributionExitButton_Clicked());
            aContributionPanel.transform.FindChild("ContributeButton").GetComponent<Button>().onClick.AddListener(() => GameObject.Find("SceneScriptsObject").GetComponent<GameUI>().contributionButton_Clicked());
            aContributionPanel.transform.FindChild("NameLabel").GetComponent<Text>().text = anObjectIn.GetUtfString("Name");
            aContributionPanel.transform.FindChild("LevelLabel").GetComponent<Text>().text = "(Level " + anObjectIn.GetInt("CenterNodeLevel").ToString() + ")";
            aContributionPanel.transform.FindChild("CurrentContributionLabel").GetComponent<Text>().text = anObjectIn.GetInt("Contribution").ToString();
            aContributionPanel.transform.FindChild("ContributionCapTotalLabel").GetComponent<Text>().text = anObjectIn.GetInt("ContributionCap").ToString();
            aContributionPanel.transform.FindChild("ContributionPB").GetComponent<Scrollbar>().size = (float)anObjectIn.GetInt("CurrentTNL") / (float)anObjectIn.GetInt("TotalTNL");
            aContributionPanel.transform.FindChild("ContributionPB").FindChild("ContributionText").GetComponent<Text>().text = anObjectIn.GetInt("CurrentTNL").ToString() + " / " + anObjectIn.GetInt("TotalTNL").ToString();
            aContributionPanel.transform.FindChild("CurrentFoodLabel").GetComponent<Text>().text = anObjectIn.GetInt("CurrentFood").ToString();

            //Switch Cursor Mode
            Camera.main.GetComponent<CameraController>().setCursorVisible(true);
        }