private void DoCollision(GameObject package) { package.tag = TagConstants.UNTAGGED; CommonObjects.GetGameController().UpdateScore(points); audioSource.Play(); if (gameObject.CompareTag(TagConstants.LANDING_ZONE)) { CommonObjects.GetGameController().Bullseye(); } if (transform.parent != null && transform.parent.tag == TagConstants.LOT) { DisableLot(transform.parent); } }
// Use this for initialization void Start() { GameController gameController = CommonObjects.GetGameController(); deliveriesNumberObject.GetComponent <Text>().text = gameController.deliveriesNeeded.ToString(); int requiredLandingZones = gameController.bullseyesNeeded; if (requiredLandingZones < 1) { if (landingZoneCheckboxObject != null) { landingZoneCheckboxObject.SetActive(false); } landingZonesAnimation.SetActive(false); landingZonesNumberObject.SetActive(false); } else { landingZonesNumberObject.GetComponent <Text>().text = requiredLandingZones.ToString(); } }
private void OnTriggerEnter(Collider other) { CommonObjects.GetGameController().EndGame(); }