Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     statsIndicator = GetComponent <UIPolygon>();
     statsIndicator.VerticesDistances = new float[6] {
         perc * .2f, foc * .2f, agi * .2f, str * .2f, anger * .2f, perc * .2f
     };
 }
    void Start()
    {
        MakeSingleton();
        dataController   = FindObjectOfType <DataController>();                           // Store a reference to the DataController so we can request the data we need for this round
        currentRoundData = dataController.GetCurrentRoundData();                          // Ask the DataController for the data for the current round. At the moment, we only have one round - but we could extend this
        questionPool     = currentRoundData.questions;                                    // Take a copy of the questions so we could shuffle the pool or drop questions from it without affecting the original RoundData object

        starPolygon   = starPlot.GetComponent <UIPolygon>();
        timeRemaining = currentRoundData.timeLimitInSeconds;                                // Set the time limit for this round based on the RoundData object
        UpdateTimeRemainingDisplay();
        playerScore   = 0;
        questionIndex = 0;
        print("here");
        ShowQuestion();
        isRoundActive = true;
    }
Example #3
0
 public void OnEnable()
 {
     Image = target as UIPolygon;
 }