コード例 #1
0
 public void DisplayChoices(int currentEvent)
 {
     for (int i = 0; i < events.majorEvents[currentEvent].choices.Count; i++)
     {
         ChoicePopup newChoice = Instantiate(choicePopup, gameObject.transform);
         newChoice.CreatePopup(events.majorEvents[currentEvent].choices[i]);
     }
 }
コード例 #2
0
 // Start is called before the first frame update
 private void Start()
 {
     _soup               = transform.Find("Soup").gameObject;
     _playerInvObj       = GameObject.FindGameObjectWithTag("PlayerInventory");
     _playerInvContainer = InventoryManager.Instance.PlayerContainer;
     _playerInvRenderer  = _playerInvObj.GetComponent <InventoryRenderer>();
     _choicePopup        = GameObject.FindGameObjectWithTag("SelectWindow").GetComponent <ChoicePopup>();
     _soup.SetActive(false);
 }
コード例 #3
0
 private void Start()
 {
     _choicePopup = GameObject.FindGameObjectWithTag("SelectWindow")
                    .GetComponent <ChoicePopup>();
 }
コード例 #4
0
 // Start is called before the first frame update
 private void Start()
 {
     _playerContainer   = InventoryManager.Instance.PlayerContainer;
     _playerInvRenderer = GameObject.FindGameObjectWithTag("PlayerInventory").GetComponent <InventoryRenderer>();
     _choicePopup       = GameObject.FindGameObjectWithTag("SelectWindow").GetComponent <ChoicePopup>();
 }