private void DisplayBlocks(bool toSave) { //create real objects ResetPosition(); print("creating " + downloadedStrings.Count + " blocks"); foreach (string stringData in downloadedStrings) { // create a new block Thumbnail GameObject blockObject = STools.AddChild(gridObject, displayPrefab); displayedBlocks.Add(blockObject); SetFeedReference(blockObject); if (imagebufferCount <= 0) { blockObject.GetComponent <UIData>().AddVariables(stringData, true); } else { blockObject.GetComponent <UIData>().AddVariables(stringData, false); } } // Notify of the event! OnDownload(); //save if (toSave) { SaveDataLocal(); } ResetPosition(); }
private void AddFriends(string input) { //divide into its data components string[] friendStringSeparators = { "|friend|" }; string[] friends = input.Split(friendStringSeparators, System.StringSplitOptions.RemoveEmptyEntries); //split into key, value pair and add to data dictionary foreach (string friend in friends) { GameObject newFriend = STools.AddChild(friendGrid, friendPrefab); newFriend.GetComponent <Friend>().theData = this; newFriend.GetComponent <Friend>().Create(friend); } }
private void DisplayBlocks(bool toSave) { //create real objects ResetPosition(); print("creating " + downloadedStrings.Count + " blocks"); foreach (string stringData in downloadedStrings) { // create a new block Thumbnail GameObject blockObject = STools.AddChild(gridObject, displayPrefab); displayedBlocks.Add(blockObject); SetFeedReference(blockObject); blockObject.GetComponent <UIData>().AddVariables(stringData); } //save if (toSave) { SaveDataLocal(); } ResetPosition(); }
private void AddFeedPadding() { STools.AddChild(gridObject, paddingObj); STools.AddChild(gridObject, paddingObj); STools.AddChild(gridObject, paddingObj); }