void Awake()
 {
     _instance      = this;
     _materialList  = new List <GameObject>();
     _furnitureList = new List <GameObject>();
     _personList    = new List <GameObject>();
     UpdateAcousticCalculation();
 }
Exemplo n.º 2
0
 void OnMouseOver()
 {
     //if the mouse is over the game object, it starts flashing
     if (!AcousticCalculation.IsPointerOverUIObject())
     {
         _lookingAtObject = true;
         if (_startedFlashing == false)
         {
             _startedFlashing = true;
             StartCoroutine(FlashObject());
         }
     }
 }
Exemplo n.º 3
0
 void Update()
 {
     if (!AcousticCalculation.IsPointerOverUIObject())
     {
         if (Input.GetMouseButtonDown(1))
         {
             Ray ray = UnityEngine.Camera.main.ScreenPointToRay(Input.mousePosition);
             if (Physics.Raycast(ray, out var hit, 100.0f))
             {
                 if (hit.transform.gameObject.CompareTag("Furniture"))
                 {
                     UiObject.Instance.ChangeState();
                     UiObject.Instance.objData = hit.transform.gameObject.GetComponent <ObjectData>();
                 }
                 else if (hit.transform.gameObject.CompareTag("Material"))
                 {
                     UiWalls.Instance.ChangeState();
                     UiWalls.Instance.objData = hit.transform.gameObject.GetComponent <ObjectData>();
                 }
             }
         }
     }
 }