Ejemplo n.º 1
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            DestroyImmediate(gameObject);
        }

        // PlayerPrefs.SetString("TetherHead_1", "False");
        //PlayerPrefs.DeleteAll();
    }
Ejemplo n.º 2
0
    public void Init()
    {
        image = GetComponent <Image>();
        text  = transform.GetChild(0).GetComponent <Text>();
        skin  = transform.GetChild(1).GetComponent <Image>();
        skin.preserveAspect = true;
        padlock             = transform.GetChild(2).GetComponent <Image>();
        SetSprite();
        shopButtonHandler = ShopButtonHandler.Instance;
        if (shopButtonHandler.GetCurrentTetherHead().ID == ID)
        {
            ShowBackground();
        }

        padlock.enabled = locked;
        unlockAt        = shopButtonHandler.TetherUnlocks[ID];
        text.text       = unlockAt > 0 ? unlockAt.ToString() : "";
        isInit          = true;
    }
Ejemplo n.º 3
0
 public void AttachHandler(ShopButtonHandler handler)
 {
     this.handler = handler;
 }