Ejemplo n.º 1
0
    /// <summary>
    /// Deactivates the specified game item and resets its important values.
    /// </summary>
    private void ResetGameItem(GameItem gameItem)
    {
        DeactivateItem(gameItem.gameObject);

        Button button = gameItem.GetComponent <Button>(); // TODO protect against null reference exceptions

        button.interactable = true;
        button.onClick.RemoveAllListeners();

        gameItem.text.text = string.Empty;
        gameItem.removeButton.SetActive(false);
        gameItem.checkMark.SetActive(false);
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     button       = gameObject.GetComponent <Button>();
     image.sprite = gameItem.GetComponent <Image>().sprite;
 }