Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        id_numb    = Id_Assign.GetComponent <ID_Assigner>().getID(transform);
        linkedlist = ZoneList.GetComponent <octree_sample>();
        boundary   = linkedlist.dimension;
        limit      = linkedlist.limit;
        setbound();
        currentZone = x * 16 + y * 4 + z;
        if (Collidehill == null)
        {
            Collidehill = linkedlist.get_object(x, y, z);
        }
        listing = Collidehill.GetComponent <inside>();

        listing.Add_Test(gameObject);
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        transformposition = transform.position;


        setbound();


        headingTo = x * 16 + y * 4 + z;
        if (headingTo != currentZone)
        {
            currentZone = headingTo;
            remove_Object();
            Collidehill = linkedlist.get_object(x, y, z);
            listing     = Collidehill.GetComponent <inside>();
            listing.Add_Test(gameObject);
        }
    }