예제 #1
0
        private void initObjectModels()
        {
            // initializing footer objects
            terms         = new Terms(browser);
            privacy       = new Privacy(browser);
            security      = new Security(browser);
            status        = new Status(browser);
            help          = new Help(browser);
            footerLogo    = new pageObjectModels.footer.Logo(browser);
            contactGitHub = new ContactGitHub(browser);
            api           = new API(browser);
            training      = new Training(browser);
            shop          = new Shop(browser);
            footerBlog    = new pageObjectModels.footer.Blog(browser);
            about         = new About(browser);

            // initializing explore objects
            integrations = new Integrations(browser);
            showcases    = new Showcases(browser);
            trending     = new Trending(browser);

            // initializing header objects
            headerLogo = new pageObjectModels.header.Logo(browser);
            personal   = new Personal(browser);
            openSource = new OpenSource(browser);
            business   = new Business(browser);
            explore    = new Explore(browser);
            pricing    = new Pricing(browser);
            headerBlog = new pageObjectModels.header.Blog(browser);
            support    = new Support(browser);
            searchBar  = new pageObjectModels.header.SearchBar(browser);
            signIn     = new SignIn(browser);
            signUp     = new SignUp(browser);

            // initializing main objects
            signUpUsername  = new SignUpUsername(browser);
            signUpEmail     = new SignUpEmail(browser);
            signUpPassword  = new SignUpPassword(browser);
            signUpSubmit    = new SignUpSubmit(browser);
            signUpForGitHub = new SignUpForGitHubButton(browser);

            // initializing pricing objects
            joinGitHubForFree    = new JoinGitHubForFree(browser);
            upgradeAccount       = new UpgradeAccount(browser);
            createOrganization   = new CreateOrganization(browser);
            startEnterpriseTrial = new StartEnterpriseTrial(browser);

            // initializing blog objects
            featured      = new Featured(browser);
            allPosts      = new AllPosts(browser);
            newFeatures   = new NewFeatures(browser);
            engineering   = new Engineering(browser);
            enterprise    = new Enterprise(browser);
            conferences   = new Conferences(browser);
            meetups       = new Meetups(browser);
            newHires      = new NewHires(browser);
            watercooler   = new Watercooler(browser);
            blogSearchBar = new pageObjectModels.blog.SearchBar(browser);
        }
예제 #2
0
    void GoToWaterCooler(Watercooler wc)
    {
        AtDesk = false;
        if (Cooler != null)
        {
            Cooler.RemoveWorker(this);
        }
        Cooler       = wc;
        MoveInterest = PointOfInterest.WATER_COOLER;
        MoveTarget   = wc.transform.position;

        Interest = TalkTime;
        AnimatorRef.SetBool("Moving", true);
    }
예제 #3
0
    void Drop()
    {
        PickedUp           = false;
        transform.position = Utils.MouseWorldPosition(0f);
        OwnDesk.LightRef.EnableLight(false);

        Watercooler nearbyCooler = GetNearestCooler();

        if (Vector3.Distance(transform.position, OwnDesk.WorkLocation.transform.position) <
            Vector3.Distance(transform.position, nearbyCooler.transform.position))
        {
            ReturnToDesk();
        }
        else
        {
            GoToWaterCooler(nearbyCooler);
        }
        CurrentlyHeld = null;

        Complaining.Stop();

        UICursorManager.SetCursorHover();
    }
예제 #4
0
    //Returns the closest water cooler
    Watercooler GetNearestCooler()
    {
        if (Watercooler.coolers.Count > 0)
        {
            Watercooler nearest         = Watercooler.coolers[0];
            float       nearestDistance = Vector3.Distance(nearest.transform.position, transform.position);
            foreach (Watercooler wc in Watercooler.coolers)
            {
                float distance = Vector3.Distance(wc.transform.position, transform.position);
                if (distance < nearestDistance)
                {
                    nearest         = wc;
                    nearestDistance = distance;
                }
            }

            return(nearest);
        }
        else
        {
            return(null);
        }
    }