Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     if(transform.parent.GetComponent<ReStockableObject>())
     {
         master = transform.parent.GetComponent<ReStockableObject>();
         SetDestroyFlag(true);
     }
     else
     {
         master = ObjectManager.GetSelectedObject() as ReStockableObject;
     }
 }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     current = ObjectManager.GetSelectedObject() as ReStockableObject;
     if(current)
     {
         string description = current.objectDescription;
         nameDisplay.GetComponent<TextMesh>().text = current.objectName;
         descriptionDisplay.GetComponent<TextMesh>().text = description;
         sellValueDisplay.GetComponent<TextMesh>().text = current.sellValue.ToString ("f0");
         stockLevelDisplay.GetComponent<TextMesh>().text = current.GetLevel();
         SendMessage ("FormatString", description);
     }
 }