// Use this for initialization void Start() { //print("PlayerController initialization"); temp_sky_exposure = 0; debug_rays = true; samplesubdiv = 6; //populate the agent controller reference object controller_reference = GameObject.Find("SScholar_Agent_Controller").GetComponent <SScholar_Agent_Controller>(); //run the test once for each player controller //RunTests(); /* * target = GameObject.Find("Intervisibility Target"); * if (target != null) * { * Debug.Log("intervisibility target(s) found!"); * //Renderer rend = target.GetComponent<Renderer>(); * //Renderer rend2 = target.GetComponent<Renderer>(); * //Collider m_Collider = target.GetComponent<Collider>(); * Renderer rend = target.GetComponent<Renderer>(); * bounds = rend.bounds; * bound_center = bounds.center; * //Debug.Log(bound_center); * bound_extents = bounds.extents; * //Debug.Log(bound_extents); * } * else * { * Debug.Log("no intervisibility target(s) found!"); * } */ /* * //set color * Component[] renderers; * * renderers = GetComponentsInChildren(typeof(Renderer)); * * if (renderers != null) * { * //Debug.Log("found agent sub object renderer objects, going to change color now") * foreach(Renderer r in renderers) * { * r.material.color = Color.yellow; * } * } * else * { * //do nothing * } */ }
// Use this for initialization void Start() { Debug.Log("SSAgent_Intervisibility_Target script Start() called"); //assign this object to some central list of Intervisibility Targets on a master controller //this list will be queried by agents to direct their rays only in the direction of intervisbility targets //agents will then hold values for how much of the target they can see....not sure the best way to determine how much they can see...... GameObject controller = GameObject.Find("SScholar_Agent_Controller"); SScholar_Agent_Controller example = (SScholar_Agent_Controller)controller.GetComponent(typeof(SScholar_Agent_Controller)); example.AddIntervisibilityTarget(gameObject); }
// Use this for initialization void Start() { controller = GetComponent <SScholar_Agent_Controller>(); }
// Use this for initialization void Start() { //Debug.Log("Clock initialized"); controller_reference = GameObject.Find("SScholar_Agent_Controller").GetComponent <SScholar_Agent_Controller>(); }