public void CreateSingleBox(float x, float y, Dialoug node, string text, boxTypes type) { GameObject temp; if (type == boxTypes.playerNormal) { temp = Instantiate(PlayerReesponceBox, new Vector2(xPosition, yPostion), Quaternion.identity); } else if (type == boxTypes.PlayerFM) { temp = Instantiate(PlayerFMResponceBox, new Vector2(xPosition, yPostion), Quaternion.identity); } else if (type == boxTypes.CNPCFM) { temp = Instantiate(CNPCfmBox, new Vector2(xPosition, yPostion), Quaternion.identity); } else { temp = Instantiate(CNPCUIResponceBoxPrefab, new Vector2(xPosition, yPostion), Quaternion.identity); } temp.gameObject.transform.SetParent(parentContent.transform, false); temp.gameObject.GetComponentInChildren <Text>().text = text; temp.gameObject.GetComponentInChildren <Text>().color = Color.black; yPostion += -130; }
void clickedOnRumor(Dialoug node) { listOfUIPrefabs[0].GetComponent <Text>().text = node.UnbiasedOpeningStatment; //add methiod on click of the object itself spawns two objects underneath it //listOfUIPrefabs[0].GetComponentInChildren<Text>().text.Length.ToString... along these lines and show //potential mapping //it seems - currentcnpc.name - made them think of --- sv }
public int getHeight() { int height = 1; Dialoug currentNode = this; while (currentNode.parent != null) { height++; currentNode = currentNode.parent; } return(height); }
public string ReturnSchema(string tag, Dialoug characterNode) //used in combo with flags to construt arguments, this returns the schema accoring to father models { Debug.Log(" tag is " + tag + "charanode" + characterNode); string schemaName = "NoSchemaFound"; switch (tag) { case ("InLovewithspouseoffriend"): foreach (Dialoug d in characterNode.parent.children) //send in the parent ( thing that contains sub nodes ) { if (d.Pattern != "WillActOnLove") { schemaName = "highStrength"; //depicts moral strength // later will translate into something like "he applies self displine well.//// // add text later - - something like oh wow they have self restraint... ect } //else -not strength else if (d.Pattern == "WillActOnLove") { schemaName = "highRetribution"; //something along the lines of he deserves to be punished ...ect } } break; case ("likesToDate"): schemaName = "lowMoralBoundaries"; break; case ("departed"): schemaName = "lowMoralboundaries"; //influingg others - negative break; case ("hardWorker"): case ("IsWealthy"): foreach (Dialoug d in characterNode.parent.children) { if (d.Pattern == "IsRichButNotGenrous") { schemaName = "highMoralOrder"; // also true as self dispiince here // along th elines of it's their work they shouild do with it as they see fir } } break; case ("hasAbestFriend"): foreach (Dialoug d in characterNode.parent.children) { if (d.Pattern == "friendwithabestfriendsenemy") { schemaName = "lowMoralboundaries"; // also true as self dispiince here // along th elines of it's their work they shouild do with it as they see fir } } break; case ("butcherRole"): schemaName = "highMoralOrder"; //what fits naturally break; case ("flipflop"): schemaName = "lowMoralboundaries"; //devaiting from the norm - bad break; case ("widowedbutnotgrieving"): schemaName = "lowMoralboundaries"; break; default: return("noSchemasFound"); } //add new values and resturcture this return(schemaName); }