Пример #1
0
    public void CreatePanel()
    {
        if (a > spawndecrease && b > spawndecrease)
        {
            a -= spawndecrease;
            b -= spawndecrease;
        }
        GameObject newpop = Instantiate(MinigamePrefab) as GameObject;

        newpop.transform.SetParent(GameObject.FindGameObjectWithTag("WallPanel").transform, false);
        LinkedComponent lc = newpop.GetComponent <LinkedComponent>();

        lc.monA      = moneya;
        lc.monB      = moneyb;
        lc.timeA     = a;
        lc.timeB     = b;
        lc.item      = this;
        panelcreated = true;
    }
Пример #2
0
 private void Start()
 {
     lc = GetComponentInParent <LinkedComponent>();
 }