public void OnEnable()
 {
     if (gameManager == null)
     {
         gameManager = GameObject.FindObjectOfType <GameManager>();
     }
     itemReader = new ItemReader();
     itemReader.ReadFile();
 }
    public void UpdateItem()
    {
        name.text = itemType.ToString();

        reader = new ItemReader();
        reader.ReadFile();
        item = reader.GetItemData(itemType);

        image.sprite = item.sprite;
        type.text    = item.itemPrimaryType.ToString();
        intro.text   = item.Intro.Trim() + "\n";
        use.text     = item.Use.Trim() + "\n" + item.Access.Trim() + "\n";
    }
Пример #3
0
 public void InitReaders()
 {
     itemReader = new ItemReader();
     itemReader.ReadFile();
 }
Пример #4
0
 public void OnEnable()
 {
     reader = new ItemReader();
     reader.ReadFile();
 }