Пример #1
0
    private int progVal;                                                       //This just keeps the value of the progress bar between 1 and 100 depending on the current value



    // Start is called before the first frame update
    void Start()
    {
        time = GameObject.Find("timeTracker").GetComponent <moveToNextDay>().time;

        monsterGO = GameObject.Find("monster").transform.GetChild(0).gameObject;
        monster   = GameObject.Find("monster").GetComponent <monsterStats>();

        strPos = new Vector3(19.93f, 30.0f, 53.61f);
        strRot = new Quaternion(0.0f, 185.875f, 0.0f, 0.0f);

        intPos = new Vector3(29.57f, 30.0f, 56.82f);
        intRot = new Quaternion(0.0f, 233.593f, 0.0f, 0.0f);

        mndPos = new Vector3(35.2f, 30.0f, 50.27f);
        mndRot = new Quaternion(0.0f, 221.398f, 0.0f, 0.0f);

        dexPos = new Vector3(44.22f, 30.0f, 49.67f);
        dexRot = new Quaternion(0.0f, 226.688f, 0.0f, 0.0f);

        staPos = new Vector3(55.38f, 30.0f, 34.06f);
        staRot = new Quaternion(0.0f, 250.971f, 0.0f, 0.0f);

        defPos = new Vector3(52.02f, 30.0f, 43.4f);
        defRot = new Quaternion(0.0f, 230.137f, 0.0f, 0.0f);

        wanPos = new Vector3(40.47f, 30.0f, 34.06f);
        wanRot = new Quaternion(0.0f, 55.594f, 0.0f, 0.0f);

        resPos = new Vector3(24.16f, 30.0f, 18.32f);
        resRot = new Quaternion(0.0f, 3.527f, 0.0f, 0.0f);

        currentTraining = txt0.text;
        doTrainingForWeek();
    }
Пример #2
0
    //public Button theButton;

    void Start()
    {
        strButton.onClick.AddListener(delegate { trainStr(); });
        dexButton.onClick.AddListener(delegate { trainDex(); });
        intButton.onClick.AddListener(delegate { trainInt(); });
        mndButton.onClick.AddListener(delegate { trainMnd(); });
        defButton.onClick.AddListener(delegate { trainDef(); });
        staButton.onClick.AddListener(delegate { trainSta(); });
        trainButton.onClick.AddListener(delegate { runTrain(); });

        fadeVal = GameObject.Find("fadeImage").GetComponent <CanvasGroup>().alpha;

        monster = GameObject.Find("penguin").GetComponent <monsterStats>();
    }
Пример #3
0
    RadarPolygon chart;                           //Monster stats radar chart

    // Start is called before the first frame update
    void Start()
    {
        closeBut.onClick.AddListener(mainMenu);                                                                                                                    //Runs mainMenu when clicking on 'Close' in Monster menu
        monsterMenu.onClick.AddListener(openMonster);                                                                                                              //Runs openMonster when clicking on monster menu button
        monRenameBut.onClick.AddListener(renameMonster);                                                                                                           //Runs renameMonster when clicking on rename monster button
        saveRenameBut.onClick.AddListener(saveRenameMonster);                                                                                                      //Runs saveRenameMonster when clicking on save button when renaming monster
        scheduleBut.onClick.AddListener(openSchedule);                                                                                                             //Runs openSchedule when clicking on schedule button
        sCloseBut.onClick.AddListener(mainMenu);                                                                                                                   //Runs mainMenu when clicking on 'close' in schedule menu
        dataMenu.onClick.AddListener(openData);                                                                                                                    //Runs openData when clicking on data button
        dCloseBut.onClick.AddListener(mainMenu);                                                                                                                   //Runs mainMenu when clicking on close in data menu
        //time.month = 12; //**for debugging** - sets current month to whenever
        time = GameObject.Find("timeTracker").GetComponent <moveToNextDay>().time;                                                                                 //Sets time to current time tracked in the game - this is set on 'timeTracker' object
        GameObject.Find("dateText").GetComponent <Text>().text = time.getMonthString(time.month) + ". Week " + time.week.ToString() + ", " + time.year.ToString(); //Sets date on the info panel to the current time

        monster = GameObject.Find("monster").GetComponent <monsterStats>();                                                                                        //Sets monster to current monster in game

        dataCanvas.SetActive(true);                                                                                                                                //Enables data canvas to set progress bars
        hungerBar = GameObject.Find("dHungerProgBar").GetComponent <ProgressBar>();                                                                                //Sets hunger bar to data canvas hunger bar
        energyBar = GameObject.Find("dEnergyProgBar").GetComponent <ProgressBar>();                                                                                //Sets energy bar to data canvas energy bar
        chart     = GameObject.Find("dRadarPolygonData").GetComponent <RadarPolygon>();                                                                            //Sets chart to data canvas chart
        dataCanvas.SetActive(false);                                                                                                                               //Disables data canvas as progress bars are ready
    }
Пример #4
0
    // Start is called before the first frame update
    void Start()
    {
        //but0.onClick.AddListener(delegate { openSchedule(); });
        but1.onClick.AddListener(delegate { openSchedule(); });
        but2.onClick.AddListener(delegate { openSchedule(); });
        but3.onClick.AddListener(delegate { openSchedule(); });
        but4.onClick.AddListener(delegate { openSchedule(); });
        but5.onClick.AddListener(delegate { openSchedule(); });
        but6.onClick.AddListener(delegate { openSchedule(); });
        but7.onClick.AddListener(delegate { openSchedule(); });

        strBut.onClick.AddListener(delegate { onStrButClick(); });
        mndBut.onClick.AddListener(delegate { onMndButClick(); });
        dexBut.onClick.AddListener(delegate { onDexButClick(); });
        defBut.onClick.AddListener(delegate { onDefButClick(); });
        intBut.onClick.AddListener(delegate { onIntButClick(); });
        staBut.onClick.AddListener(delegate { onStaButClick(); });

        restBut.onClick.AddListener(delegate { onRestButClick(); });
        wanderBut.onClick.AddListener(delegate { onWanderButClick(); });

        saveBut.onClick.AddListener(delegate { onSaveButClick(); });
        tCloseBut.onClick.AddListener(delegate { closeSchedule(); });


        weeklyCanvas.SetActive(true);                                           //might need to fix this later
        dateText.text = GameObject.Find("dateText").GetComponent <Text>().text; //this too for sure

        time  = GameObject.Find("timeTracker").GetComponent <moveToNextDay>().time;
        week  = time.week;
        month = time.month;
        year  = time.year;


        monster = GameObject.Find("monster").GetComponent <monsterStats>();

        buttonClicked = false;
    }