Exemplo n.º 1
0
 public void Init(BottleType type,CollectionUI parent)
 {
     string key = "";
     mParent = parent;
     mType = type;
     switch (type)
     {
         case BottleType.OIL_STREET:
             key = "OIL STREET";
             break;
         case BottleType.OIL_STREET_EVENTS:
             key = "OIL STREET EVENTS";
             break;
         case BottleType.PMQ:
             key = "PMQ";
             break;
         case BottleType.PMQ_EVENTS:
             key = "PMQ EVENTS";
             break;
         case BottleType.PMQ_GALLERY:
             key = "PMQ GALLERY";
             break;
         case BottleType.PMQ_RESTAURANT:
             key = "PMQ RESTAURANT";
             break;
         case BottleType.VA:
             key = "VA!";
             break;
     }
     mSprite.spriteName = key;
     mDragChild.Init(this);
     SetMyFragments(Random.Range(1,4),(FragmentType)Random.Range(1,4));
 }
Exemplo n.º 2
0
 void Start()
 {
     artifactsCollected = new Dictionary <Artifact, int>();
     setCollected       = new Dictionary <Set, int>();
     collectionUI       = GameObject.Find("UICanvas").GetComponent <CollectionUI>();
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     collectionUI = GameObject.Find("UICanvas").GetComponent <CollectionUI>();
     button       = GetComponentInChildren <Button>();
     button.onClick.AddListener(() => collectionUI.LoadArtifacts(this.gameObject.name));
 }