Esempio n. 1
0
    // Use this for initialization
    public void Start()
    {
        exeButton = exeButton.GetComponent <Button>();
        sound     = GetComponent <AudioSource>();
        exeButton.onClick.AddListener(taskOnClick2);
        transform.position = points [0].position;
        target [0]         = "Suitcase3";
        target [1]         = "Suitcase2";
        target [2]         = "Suitcase";

        l = 0;
        for (int l = 0; l < 3; l++)
        {
            queueArray [l] = -1;
        }

        //lifepanel
        life = new lives();
        livesPanel.transform.GetChild(0).gameObject.SetActive(false);
        livesPanel.transform.GetChild(1).gameObject.SetActive(false);
        livesPanel.transform.GetChild(2).gameObject.SetActive(false);
        for (int i = 0; i < life.getLives(); i++)
        {
            livesPanel.transform.GetChild(i).gameObject.SetActive(true);
        }
    }
Esempio n. 2
0
    // Use this for initialization
    public void Start()
    {
        Button button2 = btn2.GetComponent <Button>();

        rb    = GetComponent <Rigidbody> ();
        sound = GetComponent <AudioSource>();
        button2.onClick.AddListener(taskOnClick2);
        transform.position = points [0].position;

        l = 0;
        for (int l = 0; l < 3; l++)
        {
            queueArray [l] = -1;
        }

        //lifePanel
        life = new lives();
        livesPanel.transform.GetChild(0).gameObject.SetActive(false);
        livesPanel.transform.GetChild(1).gameObject.SetActive(false);
        livesPanel.transform.GetChild(2).gameObject.SetActive(false);
        for (int i = 0; i < life.getLives(); i++)
        {
            livesPanel.transform.GetChild(i).gameObject.SetActive(true);
        }
    }