コード例 #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));
 }
コード例 #2
0
 void Start()
 {
     artifactsCollected = new Dictionary <Artifact, int>();
     setCollected       = new Dictionary <Set, int>();
     collectionUI       = GameObject.Find("UICanvas").GetComponent <CollectionUI>();
 }
コード例 #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));
 }