Esempio n. 1
0
 public void ShowObject(bool tf)
 {
     if (tf)
     {
         string url = GameObject.Find("CloudRecognition").GetComponent <screh>().url;
         jsMeta         = JsonUtility.FromJson <Creature2>(url);
         nameObjectFile = jsMeta.url.Split(new char[] { '/' });
         nameObject     = nameObjectFile[nameObjectFile.Length - 1].Split(new char[] { '.' });
         if (nameObject [1] == "mp4")
         {
             StartCoroutine(SetUpVideo());
         }
         else
         {
             StartCoroutine(DownloadAndCache());
         }
     }
     else
     {
         if (go != null)
         {
             go.GetComponent <VideoPlaybackBehaviour> ().VideoPlayer.Pause();
             go.GetComponent <VideoPlaybackBehaviour> ().enabled = false;
             go.GetComponent <MeshRenderer> ().enabled           = false;
         }
     }
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var c = new Creature();

            c.Agility = 10;  // c.set_Agility(10); Not
                             // c.Agility = new Property<int>(10)
            c.Agility = 20;

            WriteLine(c.Agility);

            var c2 = new Creature2();

            c2.Agility = 10;
            c2.Agility = 10;

            WriteLine(c2.Agility);
        }