Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     this.name = "Player";
     hexas     = GameObject.FindGameObjectsWithTag("hex");
     wc        = GameObject.Find("Main Camera").GetComponent <worldcontroller>();
     for (int i = 0; i < wc.hexys.Length; i++)
     {
         if (Vector2.Distance(wc.hexys [i].transform.position, this.transform.position) <= 25F && Vector2.Distance(wc.hexys [i].transform.position, this.transform.position) > 5F)
         {
             wc.hexys [i].gameObject.GetComponent <hexp> ().Przejecie(myn, myc, this.gameObject);
         }
     }
 }
Exemplo n.º 2
0
    // Use this for initialization

    void Start()
    {
        hexass = GameObject.FindGameObjectsWithTag("hex");
        wc     = GameObject.Find("Main Camera").GetComponent <worldcontroller> ();
        string my = "(";
        char   mc = my[0];

        string[] ssize = this.name.Split(mc);
        this.name = ssize[0];
        for (int i = 0; i < wc.hexys.Length; i++)
        {
            if (Vector2.Distance(wc.hexys [i].transform.position, this.transform.position) <= 25F && Vector2.Distance(wc.hexys [i].transform.position, this.transform.position) > 5F)
            {
                wc.hexys [i].gameObject.GetComponent <hexp> ().Przejecie(myn, myc, this.gameObject);
            }
        }
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     wc  = GameObject.Find("Main Camera").GetComponent <worldcontroller> ();
     puf = GameObject.Find("dymek");
     puf.SetActive(false);
 }