private void OnTriggerEnter(Collider colObject) { // prevents multiple contance points from repeating the effect if (isColliding) { return; } isColliding = true; LocationScanner locationScanner = (LocationScanner)colObject.gameObject.GetComponent("LocationScanner"); if (locationScanner != null) { if (!locationScanner.currentLocation.Equals(locationName)) { locationScanner.NameLocation(locationName); locationScanner.LearnLocation(this); locationScanner.UpdateCurrentLocation(this); } } }
// Use this for initialization void Start() { NeoBrain = NeoMemory.getInstance(); locator = (LocationScanner)gameObject.GetComponent("LocationScanner"); }