Пример #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);
    }
Пример #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);
        }
    }
Пример #3
0
 Update() / Update(dt) You have to call Update() to actually invoke the callback(s). Usually you would call it once per frame (inside Update of a MonoBehaviour for example). You can pass a custom "deltaTime" to the method, if omitted Time.deltaTime is used.