Example #1
0
    /*****************************************/


    // Use this for initialization
    void Start() {
        agent = gameObject.GetComponent<PerceptionInterface>();
        hub = GameObject.FindWithTag("Hub").GetComponent<Hub>();
        _firefighters = new List<GameObject>();
        gameSpeed = hub.gameSpeed;
        StartCoroutine(test(2f));
	}
Example #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "FireFighter" && !beingTakenCareOf)
        {
            if (other.GetComponent<PerceptionInterface>().fireSensor(transform.parent.gameObject))
            {
                assignedAgent = other.GetComponent<PerceptionInterface>();
                beingTakenCareOf = true;
            }

        }
        else if (other.tag == "Builder" && !beingTakenCareOf)
        {
            other.GetComponent<Builder>().fireSensor(transform.parent.gameObject);
        }
    }
Example #3
0
	// Use this for initialization
	void Start () {
        scrpt = transform.parent.GetComponent<PerceptionInterface>();
	}
Example #4
0
 void OnTriggerEnter(Collider other)
 {
     if (scrpt == null)
         scrpt = transform.parent.GetComponent<PerceptionInterface>();
     scrpt.OnTriggerEnter(other);
 }