Exemplo n.º 1
0
    public void GenderMohre(int x, int y)
    {
        int direction = 1;

        chooseMohre(x, y);
        if (x > 4)
        {
            direction = -direction;
        }
        GameObject go = Instantiate(MakeMohre) as GameObject;

        go.transform.SetParent(transform);
        go.transform.Rotate(new Vector3(0, direction * 90, 0));
        mohre p = go.GetComponent <mohre>();

        test[x, y] = p;
        moveMohre(p, x, y);
    }
Exemplo n.º 2
0
 public void moveMohre(mohre p, int x, int y)
 {
     p.transform.position = (Vector3.right * x) + (Vector3.forward * y);
 }