// Use this for initialization void Start() { manager = GameObject.Find("NameManager").GetComponent <NameManager>(); script = GameObject.Find("ScoreManager").GetComponent <ScoreScript>(); label = GetComponent <Text> (); Sender = manager.GetName(); }
//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); } }
public void nameText(int id, bool isNpc) { string nameData = nameManager.GetName(id, nameIndex); if (isAction == false) { NameText.text = nameData; } }
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); }
void Awake() { string[] name = NameManager.GetName(Random.Range(0, 1) == 0).Split(' '); firstName.text = name[0]; lastName.text = name[1]; }