예제 #1
0
    public void SetUp(ShipViewBluePrint newBP, ShipListManager manager)
    {
        this.listManager = manager;

        this.BP = newBP;
        if (BP == null)
        {
            print("No tengo BluePrint");
            return;
        }

        BP.shipIndex = index;
        IsOwned();

        shipImg.sprite = BP.shipImg;

        if (BP.owned)
        {
            valueTxt.gameObject.SetActive(false);
            coinImg.gameObject.SetActive(false);

            fullMarcImg.gameObject.SetActive(true);
            priceMarcImg.gameObject.SetActive(false);
        }
        else
        {
            valueTxt.gameObject.SetActive(true);
            valueTxt.text = BP.shipValue.ToString();
            coinImg.gameObject.SetActive(true);

            fullMarcImg.gameObject.SetActive(false);
            priceMarcImg.gameObject.SetActive(true);
        }
    }
예제 #2
0
 void AwakeSingleton()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }