Example #1
0
 public void SelectAction(ActionData action)
 {
     if (selectedTimeslot != -1)
     {
         if (action.actionType == ActionData.ActionType.TradingVotes && levelData.messageEnabled)
         {
             isSpeech = true;
             SpeechUi.SetActive(true);
             SpeechUi.GetComponentInChildren <Text>().text = "Speech";
             Confirm.GetComponent <Button>().interactable  = false;
         }
         else if (action.actionType == ActionData.ActionType.Research)
         {
             isSpeech = false;
             SpeechUi.SetActive(true);
             SpeechUi.GetComponentInChildren <Text>().text = "Talk to the Masses";
             Confirm.GetComponent <Button>().interactable  = false;
             SpeechContainer.SetActive(false);
             actionMessageTarget[selectedTimeslot] = -2;
         }
         else
         {
             currentSchedule[selectedTimeslot] = action;
             timeslots[selectedTimeslot].GetComponent <TimeSlotter>().SetAction(action);
             selectedTimeslot = -1;
         }
     }
 }
Example #2
0
 // Start is called before the first frame update
 public void Close()
 {
     isSpeech = Main.GetComponent <Tracker>().isSpeech;
     if (isSpeech)
     {
         Main.GetComponent <Tracker>().SpeechSelectAction();
     }
     else
     {
         Main.GetComponent <Tracker>().ResearchSelectAction();
     }
     SpeechContainer.SetActive(true);
     SpeechUi.SetActive(false);
 }