void OnTriggerEnter(Collider Entity) { if (Entity.tag == "GoalZone") { _GoalPoint = null; inGoalZone = true; _GoalPoint = Entity.GetComponent <RaydraGoalZone>().GoalPoint; //make sure we get the goal point for the goal that we a currently Debug.Log("The goal is " + _GoalPoint.ToString()); } }
private RaydraGoalPoint _GoalPoint; //! // Use this for initialization void Start() { //find the turrets that are connect to this goal only Spinner = this.GetComponentsInChildren <RaydraGoalSpinner>()[0]; _GoalPoint = this.GetComponentsInChildren <RaydraGoalPoint>()[0]; }