public bool Set_Robotic_Wall(GameObject r_wall) { this.robotic_wall = r_wall; if (r_wall.GetComponent <Wall_To_Target>() != null) { this.wallToTarget_controller = r_wall.GetComponent <Wall_To_Target>(); } else { return(false); } if (r_wall.GetComponent <RoombaFeedback_Test>() != null) { this.roomba_controller = r_wall.GetComponent <RoombaFeedback_Test>(); } else { return(false); } if (r_wall.GetComponent <RoombaFeedback_Velocity>() != null) { this.roomba_controller_vel = r_wall.GetComponent <RoombaFeedback_Velocity>(); } else { return(false); } return(true); }
private void SwitchWall(GameObject wall, GameObject[] virtualWalls, int targetID) { Wall_To_Target wallController = wall.GetComponent <Wall_To_Target>(); wallController.Set_Target(virtualWalls[targetID].transform.GetChild(0).gameObject); wall.GetComponent <Animator>().SetInteger("NearWallCounter", 100); }
// Use this for initialization void Start() { //initialize the 2 robotic walls wall_x = wall_obj_x.GetComponent <Wall_To_Target>(); wall_z = wall_obj_z.GetComponent <Wall_To_Target>(); target_x = stand_by_points.gameObject.transform.GetChild(3).gameObject; target_z = stand_by_points.gameObject.transform.GetChild(2).gameObject; next_stand_by_point_x = stand_by_points.gameObject.transform.GetChild(3).gameObject; next_stand_by_point_z = stand_by_points.gameObject.transform.GetChild(2).gameObject; //wall_x.Set_Target(this.gameObject/*.transform.GetChild(0).gameObject*/); //wall_z.Set_Target(this.gameObject/*.transform.GetChild(1).gameObject*/); }
// Use this for initialization void Start() { mover = GetComponent <Wall_To_Target> (); start = false; mover.Set_Target(target); }