/*private string buildOutputString(HashSet<GameObject> elements,System.Type type) * { * string auxText = ""; * foreach (GameObject item in elements) * { * string sensesProperty = "None"; * string especificProperty = "None"; * string emotionProperty = "None"; * if (type == typeof(SmellProperties)) * { * SmellProperties auxSmellProperties = item.GetComponent<SmellProperties>(); * if (auxSmellProperties != null) * { * sensesProperty = auxSmellProperties.getSmellStatus(); * } * } * else * if (type == typeof(TasteProperties)) * { * TasteProperties auxTasteProperties = item.GetComponent<TasteProperties>(); * if (auxTasteProperties != null) * { * sensesProperty = auxTasteProperties.getTasteStatus(); * } * } * else * if (type == typeof(HearingProperties)) * { * HearingProperties auxHearingProperties = item.GetComponent<HearingProperties>(); * if (auxHearingProperties != null) * { * sensesProperty = auxHearingProperties.getHearingStatus(); * } * } * else * if (type == typeof(TouchProperties)) * { * TouchProperties auxTouchProperties = item.GetComponent<TouchProperties>(); * if (auxTouchProperties != null) * { * sensesProperty = auxTouchProperties.getTouchStatus(); * } * }else * if (type == typeof(VisionProperties)) * { * VisionProperties auxVisionProperties = item.GetComponent<VisionProperties>(); * if (auxVisionProperties != null) * sensesProperty = auxVisionProperties.getVisionStatus(); * EmotionStatus auxEmotionStatus = item.GetComponent<EmotionStatus>(); * if (auxEmotionStatus != null) * emotionProperty = auxEmotionStatus.getEmotion().ToString(); * * } * Status auxStatus = item.GetComponent<Status>(); * if (auxStatus != null) * { * especificProperty = auxStatus.getStringStatus(); * } * * auxText = auxText + "\n---------\nID: "+item.GetInstanceID()+"\n" + item.tag + ": " + item.name + * "\nPosition: " + item.transform.position; * if (!sensesProperty.Equals("None")) * { * auxText += "\n" + sensesProperty; * } * if (!emotionProperty.Equals("None")) * { * auxText += "\nEmotion: " + emotionProperty; * } * if (!especificProperty.Equals("None")) * { * auxText+= "\nStatus: " + especificProperty; * } * } * return auxText + "\n\n"; * }*/ private void activateSmellParticles(bool activate) { foreach (Camera cam in userCamera) { CameraCullingMask auxCameraManager = cam.GetComponent <CameraCullingMask>(); if (auxCameraManager != null) { if (activate) { auxCameraManager.turnOnCullingMask(Constants.LAYER_SMELLPART); } else { auxCameraManager.turnOffCullingMask(Constants.LAYER_SMELLPART); } } } }
public void ChangeCullingMask() { Camera.main.cullingMask = (cm == CameraCullingMask.EVERYTHING) ? playerMask : everythingMask; cm = (cm == CameraCullingMask.EVERYTHING) ? CameraCullingMask.PLAYER : CameraCullingMask.EVERYTHING; }
void Start() { everythingMask = -1; playerMask = Camera.main.cullingMask; cm = CameraCullingMask.PLAYER; }