Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     manager = GameObject.Find("NameManager").GetComponent <NameManager>();
     script  = GameObject.Find("ScoreManager").GetComponent <ScoreScript>();
     label   = GetComponent <Text> ();
     Sender  = manager.GetName();
 }
Ejemplo n.º 2
0
        //TEST
        private TotalRecords ManageResults()
        {
            if (actualSongType is SongController)
            {
                var temp = FileManager.LoadResults("Results.xml");
                foreach (GameResult item in temp.results)
                {
                    if (item.newResult == true)
                    {
                        item.newResult = false;
                    }
                }
                actualSongType.Results.Name      = NameManager.GetName();
                actualSongType.Results.newResult = true;
                temp.results.Add(actualSongType.Results);

                temp.results.Sort(delegate(GameResult x, GameResult y)
                {
                    return(y.CurretScore.CompareTo(x.CurretScore));
                });

                if (temp.results.Count > 10)
                {
                    temp.results = temp.results.
                                   Select((n) => n).
                                   Take(10)
                                   .ToList();
                }
                return(temp);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
    public void nameText(int id, bool isNpc)
    {
        string nameData = nameManager.GetName(id, nameIndex);

        if (isAction == false)
        {
            NameText.text = nameData;
        }
    }
Ejemplo n.º 4
0
    public static FriendData GenerateFriend()
    {
        FriendData friend = new FriendData();

        friend.isFemale = (UnityEngine.Random.Range(0, 2) == 0);
        friend.name     = NameManager.GetName(friend.isFemale);
        friend.color    = instance.colorList[UnityEngine.Random.Range(0,
                                                                      Math.Min(instance.state.currentYear, instance.colorList.Length))];
        friend.happyPrecent         = 0.25f;
        friend.happyPrecentLastYear = 0.25f;
        friend.happyTarget          = 0.25f;
        return(friend);
    }
Ejemplo n.º 5
0
 void Awake()
 {
     string[] name = NameManager.GetName(Random.Range(0, 1) == 0).Split(' ');
     firstName.text = name[0];
     lastName.text  = name[1];
 }