Пример #1
0
 /// <summary>
 /// Sets up the window.
 /// Sets private GUIControllerScript variables to those passed in
 /// </summary>
 /// <param name="window">Rect containing window size and position.</param>
 /// <param name="label">Label of the window.</param>
 /// <param name="text">Text to be written in the window.</param>
 /// <param name="windowID">Window ID number.</param>
 /// <param name="services">If set to <c>true</c> window has a "Services Details" button.</param>
 /// <param name="occupants">If set to <c>true</c> window has an "Occupants Details" button.</param>
 /// <param name="lectures">If set to <c>true</c> window has a "Lecture Details" button.</param>
 /// <param name="buildingDetails">Building data structure with info for the scroll texts.</param>
 public void SetupWindow(Rect window, string label, string text, int windowID, bool services, bool occupants, bool lectures, Building buildingDetails, StaffManager staffDetails, LectureManager lectureDetails)
 {
     windowRect = window;
     // windowRect = new Rect(window);
     windowLabel = label;
     windowText = text;
     windowIDnum = windowID;
     windowServices = services;
     windowOccupants = occupants;
     windowLectures = lectures;
     currentBuilding = buildingDetails;
     staffManager = staffDetails;
     lectureManager = lectureDetails;
     showWindow = true;
 }
Пример #2
0
    /// <summary>
    /// Start this instance.
    /// </summary>
    void Start()
    {
        AndroidJNI.AttachCurrentThread();
        //gpsActivityJavaClass = new AndroidJavaClass ("com.TeamWARIS.WARISProject.CustomGPS");
        _camLoc = gameObject.AddComponent<Geolocation>();
        _camLoc.initGPS();
        _directionx = 0;
        _directiony = 1;
        setCamVecLength(0.00015);
        checkGPS();
        gcs = GetComponent<GUIControllerScript>();
        _location = "";
        _GUIWindow = new Rect(Screen.width / 4 + 10, (Screen.height / 2) + 10, Screen.width / 4 - 20, (Screen.height / 2) - 35);

        rc = (ResourceController)GameObject.Find ("Resource Controller").GetComponent<ResourceController> ();
        buildingManager = rc.GetBuildingManager ();
        staffManager = rc.GetStaffManager ();
        lectureManager = rc.GetLectureManager ();

        gpsActivityJavaClass = new AndroidJavaClass ("com.TeamWARIS.WARISProject.CustomGPS");
    }