Exemple #1
0
 void Start()
 {
     DEF.Init();
     DEF.ScaleAnchorGui();
     instance = this;
     //   currentpage = ScoreControl.mUnblockLevel / 20 + 1;
     //   if (currentpage > 34) currentpage = 34;
     for (int i = 0; i < 24; i++)
     {
         GameObject g = Instantiate(button5) as GameObject;
         g.SetActive(true);
         g.transform.parent        = scrollView.transform;
         g.transform.localScale    = Vector3.one;
         g.transform.localPosition = new Vector3(0, y0 + i * dy, 0);
         SelectLevels s = g.GetComponent <SelectLevels>();
         s.Init(i * 5);
     }
     LabelCoin.text       = ScoreControl.Coin.ToString();
     LabelScore.text      = ScoreControl.Score.ToString();
     ShopManager.instance = GameShop.GetComponent <ShopManager>();
 }
Exemple #2
0
    private void Awake()
    {
        scene = GetComponentInParent <SelectLevelScene>();

        gameObject.GetComponent <Button>().onClick.AddListener(SelectLevel);
    }