Exemplo n.º 1
0
 public static MessageShower instanceOf(GameObject gm)
 {
     if (_me == null)
     {
         _me = new MessageShower(gm);
     }
     else
     {
         _me.warningObject = gm;
         _me.warningText   = gm.GetComponent <Text>();
     }
     return(_me);
 }
Exemplo n.º 2
0
    void Start()
    {
        algorithm = new TomaszewAlgorithm();
        ms        = MessageShower.instanceOf(GameObject.Find("Warning"));

        joint1   = GameObject.Find("Joint1");
        joint2   = GameObject.Find("Joint2");
        joint3   = GameObject.Find("Joint3");
        dolne    = GameObject.Find("Dolne");
        srodkowe = GameObject.Find("Srodkowe");
        gorne    = GameObject.Find("Gorne");
        baza     = GameObject.Find("Baza");
        obiekt   = GameObject.Find("Obiekt");
        chwytak  = GameObject.Find("Chwytak");

        try{
            processAngles();
            readyToChange = true;
            ms.text       = "";
        }catch (Exception ave) {
            Debug.Log(ave.Message);
            ms.text = ave.Message;
        }
    }