Пример #1
0
    private void FillRoomList(UnityEngine.Vector3 position, AkRoom.PriorityList list)
    {
        list.Clear();

        position = transform.TransformPoint(position);
        var colliders = UnityEngine.Physics.OverlapSphere(position, 0, -1, UnityEngine.QueryTriggerInteraction.Collide);

        foreach (var collider in colliders)
        {
            var room = collider.gameObject.GetComponent <AkRoom>();
            if (room != null && !list.Contains(room))
            {
                list.Add(room);
            }
        }
    }
Пример #2
0
    private void FillRoomList(UnityEngine.Vector3 center, UnityEngine.Vector3 halfExtents, AkRoom.PriorityList list)
    {
        list.rooms.Clear();

        center = transform.TransformPoint(center);

        var colliders = UnityEngine.Physics.OverlapBox(center, halfExtents, transform.rotation, -1, UnityEngine.QueryTriggerInteraction.Collide);

        foreach (var collider in colliders)
        {
            var room = collider.gameObject.GetComponent <AkRoom>();
            if (room != null && !list.Contains(room))
            {
                list.Add(room);
            }
        }
    }
Пример #3
0
    void FillRoomList(Vector3 center, Vector3 halfExtents, AkRoom.PriorityList list)
    {
        list.rooms.Clear();

        center = transform.TransformPoint(center);

        Collider[] colliders = Physics.OverlapBox(center, halfExtents, transform.rotation);

        foreach (var collider in colliders)
        {
            var room = collider.gameObject.GetComponent <AkRoom>();
            if (room != null && !list.Contains(room))
            {
                list.Add(room);
            }
        }
    }
Пример #4
0
 /// <summary>
 ///     Called when entering a room.
 /// </summary>
 /// <param name="room">The room.</param>
 public void EnteredRoom(AkRoom room)
 {
     roomPriorityList.Add(room);
 }
Пример #5
0
 public void EnteredRoom(AkRoom room)
 {
     roomPriorityList.Add(room);
     SetGameObjectInHighestPriorityRoom();
 }