Ejemplo n.º 1
0
 private void Start()
 {
     vM = FindObjectOfType <ValueManagement>();
     pM = FindObjectOfType <PopupManagement>();
     dM = FindObjectOfType <DateManagement>();
     currentDayIndex  = dM.GetCurrentDayIndex();
     currentWeekIndex = dM.GetCurrentWeek();
     LoadButtons();
 }
Ejemplo n.º 2
0
    private void Start()
    {
        vM = FindObjectOfType <ValueManagement>();
        dM = FindObjectOfType <DateManagement>();

        curDayIndex  = dM.GetCurrentDayIndex();
        curWeekIndex = dM.GetCurrentWeek();
        dayLength    = vM.GetDayLength();
        weekLength   = vM.GetWeekLength();


        ShowDay();
        showWeekIndex = curWeekIndex;
    }
Ejemplo n.º 3
0
    private void Start()
    {
        dM = FindObjectOfType <DateManagement>();
        vM = FindObjectOfType <ValueManagement>();
        sL = FindObjectOfType <SceneLoader>();

        curDayIndex  = dM.GetCurrentDayIndex();
        curWeekIndex = dM.GetCurrentWeek();
        timeToLoad   = sL.GetTimeToLoad();
        InputFieldInit();
        DisableAllExcept(generalPanel);
        HideOrShowLastWeek();
        HideOrShowYesterday();
    }
Ejemplo n.º 4
0
    private void Start()
    {
        vM                = FindObjectOfType <ValueManagement>();
        dM                = FindObjectOfType <DateManagement>();
        sL                = FindObjectOfType <SceneLoader>();
        pM                = FindObjectOfType <PopupManagement>();
        runDates          = vM.GetRunDates();
        runsFinishedState = vM.GetRunsFinishedState();

        slots[0] = slot0;
        slots[1] = slot1;
        slots[2] = slot2;
        slots[3] = slot3;
        slots[4] = slot4;
    }
Ejemplo n.º 5
0
    private void Start()
    {
        mov       = FindObjectOfType <PlayerMovement>();
        sL        = FindObjectOfType <SceneLoader>();
        pl        = FindObjectOfType <Player>();
        vM        = FindObjectOfType <ValueManagement>();
        bg        = FindObjectOfType <Background>();
        pLight    = FindObjectOfType <PlayerLight>();
        willpower = FindObjectOfType <Willpower>();
        dM        = FindObjectOfType <DateManagement>();


        TurnOffDev();
        fakeLeftButton.gameObject.SetActive(false);
        fakeRightButton.gameObject.SetActive(false);
        fakeJumpButton.gameObject.SetActive(false);
        cancelInsteadButton.gameObject.SetActive(false);

        ShowUI();
        ShowWillpowerGOs();
        //for testing
        //checkpointAllowed = vM.GetBoughtCheckpoints();
        //slowAllowed = vM.GetBoughtSlowdowns();
        //insteadAllowed = vM.GetBoughtInsteads();
        checkpointAllowed = 3;
        slowAllowed       = 3;
        insteadAllowed    = 3;
        ///////////////////////
        checkpointCount = PlayerPrefs.GetInt("checkpointCount", 0);
        slowCount       = PlayerPrefs.GetInt("slowCount", 0);
        insteadCount    = PlayerPrefs.GetInt("insteadCount", 0);

        UpdateWillpower();
        keyImage.color = Colors.toggleGrayColor;
        SkillsEnabled();
        ShouldShowInsteadText();
        UpdateInsteadSlots();

        ShouldShowSlowdownText();
        UpdateSlowSlots();

        ShouldShowCheckpointUIAndText();
        ShouldShowLoadCheckpoint();
        UpdateCheckSlots();

        dayNumber.text = "Day " + sL.GetCurrentSceneName();
    }
Ejemplo n.º 6
0
    void Start()
    {
        dM   = FindObjectOfType <DateManagement>();
        vM   = FindObjectOfType <ValueManagement>();
        will = FindObjectOfType <Willpower>();

        power = will.GetWillpower();
        //points = vM.GetPoints();
        FillUpCalendars();
        timeToWait       = FindObjectOfType <SceneLoader>().GetTimeToLoad();
        currentDayIndex  = dM.GetCurrentDayIndex();
        curDateNumber    = currentDayIndex + 1;
        currentWeekIndex = dM.GetCurrentWeek();
        weekIndex        = currentWeekIndex;
        InstantlyCreateCalendar();

        UpdateCheckpoints();
        UpdateSlowdowns();
        UpdateInsteads();
    }
Ejemplo n.º 7
0
 IEnumerator TransitionFinishedCheck()
 {
     //Change global value data, and reload scene after transition finishes.
     while (anim.GetBool("isTransition"))
     {
         yield return(new WaitForSeconds(0.1f));
     }
     if (gameManager.isMatchUpToday)
     {
         //gameManager.SaveData();
         //Shows transition text, and apply text to it.
         MatchUpInitialization();
     }
     else
     {
         DateManagement.ProceedDate();
         //gameManager.SaveData();
         SceneManager.LoadScene(whereTo);
     }
     StopCoroutine("TransitionFinishedCheck");
 }
Ejemplo n.º 8
0
 private void Start()
 {
     vM = FindObjectOfType <ValueManagement>();
     sL = FindObjectOfType <SceneLoader>();
     dM = FindObjectOfType <DateManagement>();
 }
Ejemplo n.º 9
0
 private void Start()
 {
     dM           = FindObjectOfType <DateManagement>();
     curWeekIndex = dM.GetCurrentWeek();
 }
Ejemplo n.º 10
0
    //
    //Awake Function
    //

    void Start()
    {
        if (!isCreated)
        {
            //RandomNameGenerator Initialization
            RandomNameGenerator.SetNameList();

            //League Initialization
            Values.league = new League(true);

            //MyTeam Initailization
            Values.myTeam = Values.league.teams[0].Value;
            //Values.myTeam = Values.league.teams[UnityEngine.Random.Range(0, Values.league.teams.d.Count)].Value;

            //MyTeam schedule Initialization
            Values.schedules = new Dictionary <int, Schedule>();
            Values.league.BuildGameSchedule();

            //Date Init.
            DateManagement.ProceedDate();

            isCreated = true;
        }

        //DEBUG: sample data setup
        //Values.schedules = Values.sampleSchedules;
        ArrayToDict();
        //foreach(List<Schedule> ss in scheduleByDate.Values)
        //{
        //    foreach(Schedule s in ss)
        //    {
        //        Debug.Log(s.GetTitle());
        //    }
        //}

        //Values.myPlayers = RandomPlayerGenerator.CreateTeam();
        //Values.myStartingMembers = RandomPlayerGenerator.CreateStartingMember(Values.myTeam.players);

        //Set today's game.
        game = Values.league.FindGame(Values.date, Values.myTeam);

        //when loaded
        animator.SetBool("isLoaded", true);

        //Load data: schedules, counter
        //SaveData();
        //LoadData();

        //Inactivates menu panels
        playersPanel.SetActive(false);

        //Inactivates transition text.
        transitionTextObject.SetActive(false);

        //LeftPanel

        //DateText
        dateText.text = Values.date.ToString("MMM dd", CultureInfo.CreateSpecificCulture("en-US")) + ", " + Values.date.Year;

        //ScheduleList
        Values.myTeam.RefreshSchedule(Values.date, Values.league);

        bool noSchedules = true;

        for (DateTime d = new DateTime(Values.date.Year, Values.date.Month, Values.date.Day); (d - Values.date).Days < 14; d = d.AddDays(1))
        {
            //Checks whether the schedule exists
            if (Values.scheduleByDate.ContainsKey(d))
            {
                noSchedules = false;
                DateInstantiate(new Date(d));

                foreach (Schedule s in Values.scheduleByDate[d])
                {
                    ListInstantiate(s);
                    if (s.GetType() == typeof(Schedule_MatchUp) && s.date == Values.date)
                    {
                        isMatchUpToday = true;
                    }
                }
            }
        }

        //Shows "No Schedules" if there's no schdules at all.
        if (noSchedules)
        {
            DateInstantiate(new Date("No Schedules"));
        }

        //RIghtPanel

        //Components initially.
        dropdown.gameObject.SetActive(false);
        confirm.gameObject.SetActive(false);
        accentPanel.color = Color.white;

        //PlayersPanel
        RefreshPlayerList(Filter.Mode.ALL, SortDropdown.SortMode.OVERALL);
        skillPanel.SetActive(false);
        statisticsPanel.SetActive(false);
        roastersPanel.SetActive(false);
        trainingPanel.SetActive(false);

        //StatisticsPanel-GraphPanel
        SP_graphPanel.SetActive(false);
    }
Ejemplo n.º 11
0
 public void OnClick()
 {
     DateManagement.ProceedDate();
     SceneManager.LoadScene("Main");
 }