Example #1
0
 public BackendScriptViewModel Build(BackendScript backendScript)
 {
     return(new BackendScriptViewModel()
     {
         Url = backendScript.Url,
         Position = backendScript.Position
     });
 }
Example #2
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
//		GetComponent<Renderer> ().material.color = new Color(0.5f, 1, 1, 0.1f); //C#
        console  = GameObject.Find("Console").GetComponent <Text>();
        airports = new List <string> ();
        cities   = new List <string> ();

        q  = GameObject.Find("Query").GetComponent <Query>();
        bs = GameObject.Find("BackendScript").GetComponent <BackendScript> ();

        Debug.Log("Hello");
        //console.text += "Hello";
        // will be commenting this out later and calling it after set max price probs
//		return CallQuery();
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        script        = GameObject.Find("BackendScript").GetComponent <BackendScript> ();
        userInfo      = GameObject.Find("UserInfo").GetComponent <StoreUserInfo> ();
        myCityList    = userInfo.getCityList();
        myAirportList = userInfo.getAirportList();

        //myAirportList = new List<string> ();
        GameObject locationContainer = GameObject.Find(myCityList.Count.ToString() + " Locations");


        Debug.Log(myAirportList.Count);

        for (int index = 1; index <= myAirportList.Count; index++)
        {
            //Debug.Log ("count: " + count);
            int        num      = index + myAirportList.Count + 3;
            GameObject location = GameObject.Find("Location " + num.ToString());

            foreach (Transform trans in location.GetComponentInChildren <Transform>())
            {
                trans.gameObject.SetActive(true);
                foreach (Transform trans2 in trans.gameObject.GetComponentInChildren <Transform>())
                {
                    trans2.gameObject.SetActive(true);
                }
            }

            location.GetComponentInChildren <TextMesh> ().text = myCityList[index - 1];

            string vr = script.GetVrImage(myAirportList [index - 1]);
            Debug.Log(vr);
            if (vr == "")
            {
                vr = "www.editorial.designtaxi.com/editorial-images/news-uihistory16122015/2.jpg";
            }
            StartCoroutine(location.GetComponentInChildren <SetLocationImage> ().SetImage(vr));
        }
    }