Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     intChar        = new InterestingCharacters();
     characterFlags = new string[5];
     //viwer = FindObjectOfType<Viewer>();
     sprites = Resources.LoadAll <Sprite>("TownieImages/");
 }
Esempio n. 2
0
 void checkIfAnIntconditionIsMet(int Item1, int Item2, string flag, InterestingCharacters character)
 {
     if (Item1 == Item2)//do all of the checks
     {
         character.characterFlags[flag] = true;
         //Debug.Log("somone has this flag true " + flag);
     }
 }
Esempio n. 3
0
 void checkIfAnIntconditionIsMet(bool item1, string flag, InterestingCharacters character)
 {
     if (item1)//do all of the checks
     {
         character.characterFlags[flag] = true;
         //Debug.Log("somone has this flag true " + flag); //ALOT OF ENEMIES, WIDDOWED BUT NOT GRIEVING AND PREGNANT BUT NOT ENGAGED ALL TRUE
     }
 }
Esempio n. 4
0
    //    void checkIfAnIntconditionIsMet<T>(T Item1, T Item2, string flag, InterestingCharacters character) where T : class


    void checkIfAnIntconditionIsMet(int Item1, string flag, InterestingCharacters character)
    {
        if (Item1 != -1 && Item1 != 0)//do all of the checks
        {
            character.characterFlags[flag] = true;
            //Debug.Log("somone has this flag true "+ flag); //SOCIAL LIFE, FAMILY PERSON AND DEPARTED ALL ARE TURE
        }
    }
Esempio n. 5
0
    void setUpPanels()
    {
        int i = 1;

        foreach (Transform g in gameObject.GetComponentInChildren <Transform>())
        {
            g.gameObject.name = dm.conversedAboutCharectersList[i].fullName + "post it";
            i++;
        }
        i = 0;
        foreach (PostIt g in postItPanels)
        {
            InterestingCharacters character = dm.conversedAboutCharectersList[i];
            g.SetUp(character);
            i++;
        }
    }
Esempio n. 6
0
    public void SetUp(InterestingCharacters chara)
    {
        this.intChar = chara;

/*        Debug.Log(intChar.fullName + "hey hey hey");
 */     int i = 0;

        foreach (KeyValuePair <string, bool> k in intChar.characterFlags)
        {
            if (i <= 4)
            {
                //Debug.Log(k.Key + characterFlags.Length);
                if (k.Value)
                {
                    characterFlags[i] = k.Key;
                    //Debug.Log(characterFlags[i]);
                    i++;
                }
            }
        }
        Debug.Log(intChar.fullName);
    }
Esempio n. 7
0
    void setInitialIntrestingCharacters()//i is the main one 11111
    {
        InterestingCharacters character = new InterestingCharacters();

        for (int i = 0; i < jsn.backgroundcharacters.Count; i++)
        {
            character.personID  = jsn.backgroundcharacters[i].id;
            character.fullName  = jsn.backgroundcharacters[i].firstName + " " + jsn.backgroundcharacters[i].lastName;
            character.firstName = jsn.backgroundcharacters[i].firstName;
            character.LastName  = jsn.backgroundcharacters[i].lastName;
            character           = new InterestingCharacters();

            //checks for a single character flags
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].departureEventID, "departed", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].kids.Length, "familyPerson", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].friendsId.Length > 5, "socialLife", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].enemiesId.Length > 1, "hasalotofenemies", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].isCollegeGraduate, "graduate", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].widowed && (!jsn.backgroundcharacters[i].grieving), "widowedbutnotgrieving", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].adult && (!jsn.backgroundcharacters[i].inWorkForce), "adultbutnotworking", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].neighborsID.Length > 0 && (jsn.backgroundcharacters[i].friendsId.Length > 0 && jsn.backgroundcharacters[i].friendsId.Length < 3), "loner", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].money > 5, "IsWealthy", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].movesEventId.Length > 1 && !jsn.backgroundcharacters[i].movesEventId.Contains(-1), "MovesAlot", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].coworkersId.Intersect(jsn.backgroundcharacters[i].immediateFamilyId).Any(), "worksWithFamily", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].layOffsEventId.Length > 1 && !jsn.backgroundcharacters[i].movesEventId.Contains(-1), "getsFiredAlot", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].age < 45 && jsn.backgroundcharacters[i].isRetired, "RetiredYoung", character);
            checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].divorcesEventId.Length >= 3, "DevorcedManyPeople", character);


            /*
             *
             *
             *
             * checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].death != 1 && !jsn.backgroundcharacters[i].isRetired, "DiedBeforeRetired", character);
             */
            for (int j = 0; j < jsn.backgroundcharacters.Count - 1; j++)
            {
                if (i != j)
                {
                    checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].bestFriendiD,
                                               jsn.backgroundcharacters[j].id, "hasAbestFriend", character);


                    checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].age <
                                               (jsn.backgroundcharacters[j].age - 15), "marriedSomoneOlder", character);

                    checkIfAnIntconditionIsMet(jsn.backgroundcharacters[i].spouse == jsn.backgroundcharacters[j].id &&
                                               jsn.backgroundcharacters[i].loveInterest != jsn.backgroundcharacters[i].spouse &&
                                               jsn.backgroundcharacters[i].money <= 10 &&
                                               (jsn.backgroundcharacters[j].age - jsn.backgroundcharacters[i].age) >= 10 && (jsn.backgroundcharacters[j].age - jsn.backgroundcharacters[i].age) > 0, "marriedForLifeStyleNotLove", character);



                    checkLoveTraingle(jsn.backgroundcharacters[i].loveInterest, jsn.backgroundcharacters[j].spouse,
                                      jsn.backgroundcharacters[j].significantOther, jsn.backgroundcharacters[j].id, "InLoveWirhAnothersspouce", character);

                    checkLoveTraingle(jsn.backgroundcharacters[i].id,
                                      jsn.backgroundcharacters[j].id, jsn.backgroundcharacters[i].spouse, "InLovewithspouseoffriend", character);


                    checkifbestfriendwithanenmey(jsn.backgroundcharacters[i].bestFriendiD, jsn.backgroundcharacters[j].id,
                                                 jsn.backgroundcharacters[i].friendsId, jsn.backgroundcharacters[j].enemiesId,
                                                 "friendwithabestfriendsenemy", character);
                }
            }
            characters.Add(character);
        }
    }
Esempio n. 8
0
 /// <summary>
 /// check if the main person's love intrest is another person's (J)  spouce and
 /// J's siignificantOther is their spouce
 /// </summary>
 void checkLoveTraingle(int IMainLoveInrestID, int JSpouce, int JsiginifcantOther, int jID, string flag, InterestingCharacters character)
 {
     if (checkForNullValues(IMainLoveInrestID, JSpouce, JsiginifcantOther))
     {
         if (IMainLoveInrestID == JSpouce && JsiginifcantOther == JSpouce)
         {
             character.characterFlags[flag] = true;
             //Debug.Log("DOES THIS HAPPEN?");
             character.SetLoveTraingleValues(IMainLoveInrestID, jID);
         }
     }
 }
Esempio n. 9
0
 void checkLoveTraingle(int person, int bestfriend, int spuceofperson, string flag, InterestingCharacters character)
 {
     if (checkForNullValues(person, spuceofperson, bestfriend))
     {
         if (person == bestfriend && bestfriend == spuceofperson) //do all of the checks
         {                                                        //check charge!
             character.characterFlags[flag] = true;
             Debug.Log("somone has this flag true " + flag);      //NO ONE HAS A LOve traingle - check this logic out
         }
         character.SetLoveTraingleValues(spuceofperson, bestfriend);
     }
 }
Esempio n. 10
0
 private void checkifbestfriendwithanenmey(int id, int bestFriendiD, int[] personFriend, int[] enemiesOfFriend, string flag, InterestingCharacters character)
 {        //i is best friends with j and
     foreach (int enemyID in enemiesOfFriend)
     {
         if (id == bestFriendiD && personFriend.Contains(enemyID))
         {
             character.characterFlags[flag] = true;
             break;
         }
     }
 }