Esempio n. 1
0
 public void EntityOnClick(LivingThing thing)
 {
     EntityScrollList.Definition.SetActive(true);
     EntityScrollList.Header.SetActive(true);
     EntityScrollList.NothingSelected.SetActive(false);
     GameObject.Find("EntityName").GetComponent <Text>().text = thing.getName();
     GameObject.Find("EntityDef").GetComponent <Text>().text  = thing.getDefinition();
 }
    private void OnMouseDown()
    {
        string name        = livingThing.getName();
        string description = livingThing.getDefinition();

        GameObject.Find("PopupName").GetComponent <Text>().text        = name;
        GameObject.Find("PopupDescription").GetComponent <Text>().text = description;
        if (!World.getExplored().Contains(livingThing))
        {
            World.getExplored().Add(livingThing);
        }
    }
Esempio n. 3
0
 private void AddEntities()
 {
     pair.Clear();
     for (int i = 0; i < itemList.Count; ++i)
     {
         LivingThing currentItem = itemList[i];
         GameObject  newItem     = entityObject.GetObject();
         newItem.transform.SetParent(contentPanel);
         EntityInfo element = newItem.GetComponent <EntityInfo>();
         element.Setup(currentItem);
         pair.Add(new KeyValuePair <string, GameObject>(currentItem.getName(), newItem));
     }
 }
Esempio n. 4
0
 public void Setup(LivingThing currentItem)
 {
     thing = currentItem;
     theNameOfThing.text = thing.getName();
     livingThingButton.onClick.AddListener(delegate { EntityOnClick(thing); });
 }