private void setShowingOverSnail(bool isOver) { if (isOver && !isOverSnail) { Debug.Log("Showing over"); handStateController.Excite(); HighlightController hcl = currOverSnail.GetComponent <HighlightController>(); if (hcl) { hcl.Highlight(); } } if (!isOver && isOverSnail) { Debug.Log("Hiding over"); handStateController.UnExcite(); if (currOverSnail) { HighlightController hcl = currOverSnail.GetComponent <HighlightController>(); if (hcl) { hcl.UnHighlight(); } } } isOverSnail = isOver; }
// Use this for initialization void Start() { GameObject OutlineController = GameObject.Find("OutlineController"); HighlightController HighlightController = OutlineController.GetComponent <HighlightController>(); Newmat = HighlightController.Newmat; }
private void OnTriggerEnter(Collider other) { //Debug.Log(other.gameObject.name + " entered me"); Highlightable hi = other.gameObject.GetComponent <Highlightable>(); switch (OnEnter) { case DoWhatOn.AddListener: if (!HighlightController.Contains(hi)) { OnPad += hi.ToggleHighlightMaterial; //Debug.Log("Adding callback"); } break; case DoWhatOn.RemoveListener: OnPad -= hi.ToggleHighlightMaterial; break; case DoWhatOn.DoNothing: break; default: break; } }
private void Awake() { material = GetComponent <MeshRenderer>().material; controller = FindObjectOfType <HighlightController>(); normalColor = material.color; selectedColor = new Color(0, 255, 0); }
private void OnMouseUp() { //If I am subscribed and dropped, if (HighlightController.Contains(this)) { // do something for everyone who is subscribed HighlightController.DoSomething(); } }
private void Start() { HC = HighlightController.instance; baseCont = BaseController.instance; FC = FadeController.self; GrabData(false); HideData(); initDuraPos = SubBtns.btns[4].transform.localPosition; subInitPos = SubCategoryPanel.transform.position; }
private void Awake() { material = GetComponent <MeshRenderer>().material; controller = FindObjectOfType <HighlightController>(); normalColor = material.color; selectedColor = new Color( Mathf.Clamp01(normalColor.r * threshold), Mathf.Clamp01(normalColor.g * threshold), Mathf.Clamp01(normalColor.b * threshold)); }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } hightlights = new List <GameObject>(); }
private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Coin") || other.gameObject.CompareTag("ThrownCoin")) { Destroy(other.gameObject); coins++; actionSound.volume = 0.15f * GameManager.instance.sfxMultiplier; actionSound.clip = coinPickSound; actionSound.Play(); coinsLabel.text = "x " + coins; } if (other.gameObject.CompareTag("Cup")) { Destroy(other.gameObject); hasCup = true; actionSound.volume = 0.5f * GameManager.instance.sfxMultiplier; actionSound.clip = cupPickSound; actionSound.Play(); cupHUD.enabled = true; } if (other.gameObject.CompareTag("Card")) { Destroy(other.gameObject); hasCard = true; actionSound.volume = 0.5f * GameManager.instance.sfxMultiplier; actionSound.clip = cardPickSound; actionSound.Play(); cardHUD.enabled = true; } if (other.gameObject.CompareTag("Tip")) { TipController tip = (TipController)other.gameObject.GetComponent("TipController"); tip.handleView(); } if (other.gameObject.CompareTag("Doors") || other.gameObject.CompareTag("CoffeeMachine")) { interactiveObject = other.gameObject; } if (other.gameObject.CompareTag("TrashBin")) { interactiveObject = other.gameObject; HighlightController lightController = (HighlightController)interactiveObject.GetComponentsInChildren <HighlightController> () [0]; StartCoroutine(lightController.FlashNow()); } }
public void Release() { if (grabbedObject) { Debug.Log("Hand: " + this.name + " has called Release()"); HighlightController grabbedHighlighter = grabbedObject.GetGameObject().GetComponent <HighlightController>(); grabbedHighlighter.TurnHighlightOff(); grabbedObject.Release(); grabbedObject = null; } else { return; } }
public void Start() { GameObject OutlineController = GameObject.Find("OutlineController"); HighlightController HighlightController = OutlineController.GetComponent <HighlightController>(); Newmat = HighlightController.Newmat; if (reloadingPossible) { gameObjectCollection = new HashSet <GameObject>(); } holders = new List <GameObject>(); LoadShaders(); mainCamera = Camera.main; Transform[] ts = GameObject.FindGameObjectWithTag("Holder").transform.GetComponentsInChildren <Transform>(); foreach (Transform child in ts) { holders.Add(child.gameObject); //holdername.Add(child.gameObject.name); } }
private void Awake() { instance = this.GetComponent <HighlightController>(); }
// Use this for initialization void Start() { highContr = Camera.main.GetComponent <HighlightController>(); }
// Use this for initialization void Start() { OnClueStatus(false); data = GameObject.FindGameObjectWithTag("Data"); highContr = Camera.main.GetComponent <HighlightController>(); }
public void TriggerHighlight() { if (exhibitAudioManager.CurrentExhibitStory[0].exhibitTag == "Sword") { if (exhibitAudioManager.AudioClipIndex == 3) { InsertValue(1, 1); } else if (exhibitAudioManager.AudioClipIndex == 8) { InsertValue(1, 2); } else { if (HighlightController.Highlights.Count > 1) { HighlightController.ClearHighlights(); } } } else if (exhibitAudioManager.CurrentExhibitStory[0].exhibitTag == "Tub") { if (exhibitAudioManager.AudioClipIndex == 2) { cameraIcon.gameObject.SetActive(true); InsertValue(1, 1); InsertValue(2, 2); } else if (exhibitAudioManager.AudioClipIndex == 6) { cameraIcon.gameObject.SetActive(true); HighlightController.ClearHighlights(); InsertValue(1, 3); } else if (exhibitAudioManager.AudioClipIndex == 7) { cameraIcon.gameObject.SetActive(true); HighlightController.ClearHighlights(); InsertValue(1, 4); } //else if (exhibitAudioManager.AudioClipIndex == 8) //{ // InsertValue(1, 4); //} else { if (HighlightController.Highlights.Count > 1) { cameraIcon.gameObject.SetActive(true); HighlightController.ClearHighlights(); } } } else if (exhibitAudioManager.CurrentExhibitStory[0].exhibitTag == "Skull") { if (exhibitAudioManager.AudioClipIndex == 4) { InsertValue(1, 1); } else if (exhibitAudioManager.AudioClipIndex == 5) { InsertValue(1, 2); } else { if (HighlightController.Highlights.Count > 1) { HighlightController.ClearHighlights(); } } } }
private void Awake() { exhibitAudioManager.GetComponent <ExhibitAudioManager>(); HighlightController.InitializeHighlightList(); }