コード例 #1
0
    private void OnTriggerExit(Collider other)
    {
        CListableManager manager = other.GetComponent <CListableManager>();

        if (manager)
        {
            bActiveListable = false;
            manager.RemoveNode(this);
        }
    }
コード例 #2
0
    private void OnTriggerEnter(Collider other)
    {
        CListableManager manager = other.GetComponent <CListableManager>();

        if (manager)
        {
            rigidbody.isKinematic = true;
            bActiveListable       = true;
            manager.AddNode(this);
        }
    }
コード例 #3
0
    private void Awake()
    {
        Layer = GetComponent <CLayer>();

        listableManager = FindObjectOfType <CListableManager>();
        grabbable       = GetComponent <OVRGrabbable>();
        rigidbody       = GetComponent <Rigidbody>();

        if (listableManager)
        {
            Speed = listableManager.Speed;
        }

        TargetLoc       = transform.position;
        bActiveListable = false;
    }