コード例 #1
0
    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);
            }
        }
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     NeoBrain = NeoMemory.getInstance();
     locator  = (LocationScanner)gameObject.GetComponent("LocationScanner");
 }