示例#1
0
 public void SetSMSData(SMSManager.SMSData data)
 {
     Text[] texts = GetComponentsInChildren <Text>();
     foreach (Text t in texts)
     {
         t.text = data.body + "\n" + "From: " + data.city;
     }
     sentiment = data.sentiment;
 }
示例#2
0
 public Heart CreateHeart()
 {
     //SMSManager.SMSData data = new SMSManager.SMSData(0, "asdfa", "Hello World");
     SMSManager.SMSData data = SMSManager.Instance.GetRandomSMS();
     if (data != null)
     {
         Vector3 location = (new Vector3(Random.Range(-1f, 1f), 0f, Random.Range(-1f, 1f))).normalized * SpawnRadius + SpawnPoint;
         Heart   heart    = (Instantiate(HeartPrefab, location, Quaternion.identity) as GameObject).GetComponentInChildren <Heart> ();
         heart.SetSMSData(data);
         return(heart);
     }
     return(null);
 }