private void OnTriggerEnter2D(Collider2D collision) { var portal = collision.GetComponent <Portal>(); if (portal != null) { VerbUI.Show(VerbType.OPEN); collidingPortal.Add(portal); } }
private void OnTriggerEnter2D(Collider2D collision) { var spot = collision.GetComponent <InvestigationSpot>(); if (spot != null) { VerbUI.Show(VerbType.LOOK); collidingSpots.Add(spot); } }
private void OnTriggerEnter2D(Collider2D collision) { var witness = collision.GetComponent <Witness>(); if (witness != null && InvestigationManager.me.currentCase == witness.GetCase()) { VerbUI.Show(VerbType.ASK); collidingWitness.Add(witness); } }
private void OnTriggerEnter2D(Collider2D collision) { Clue clue = collision.gameObject.GetComponent <Clue>(); if (clue != null) { if (clue.GetCase() == InvestigationManager.me.currentCase) { VerbUI.Show(VerbType.INVESTIGATE); collidingClues.Add(collision.gameObject.GetComponent <Clue>()); } } }
private void OnTriggerEnter2D(Collider2D collision) { var dialogSpot = collision.gameObject.GetComponent <DialogSpot>(); if (dialogSpot != null) { bool available = (dialogSpot.oneTimeOnly && !dialogSpot.played) || !dialogSpot.oneTimeOnly; if (dialogSpot.autoStart && available) { DialogUI.StartDialog(dialogSpot.data, false); dialogSpot.Play(); } else if (!dialogSpot.autoStart) { VerbUI.Show(VerbType.ASK); } } }