Beispiel #1
0
 void Start()
 {
     gameOvermenu.SetActive(false);
     rlm           = GameObject.Find("GameController").GetComponent <randomLevelMaker_cfd> ();
     starsPickedUp = 0;
     bsae          = GameObject.Find("GameController").GetComponent <BombSpawnAndExplode_cfd>();
     pc            = GetComponent <PlayerController> ();
     sc            = GameObject.Find("GameController").GetComponent <score_counter> ();
 }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        gameControllerHolder = GameObject.Find("GameController");
        if (gameControllerHolder != null)
        {
            bsae = gameControllerHolder.GetComponent <BombSpawnAndExplode_cfd> ();

            if (Input.mousePosition.y >= button.position.y - button.rect.height / 2 && Input.mousePosition.y <= button.position.y + button.rect.height / 2 && Input.mousePosition.x <= button.position.x + button.rect.width / 2 && Input.mousePosition.x >= button.position.x - button.rect.width / 2)
            {
                if (Input.GetMouseButtonDown(0))
                {
                    bsae.fire_button_pressed = true;
                    //music.Play ();
                }
            }

            if (Input.GetMouseButtonUp(0))
            {
                bsae.fire_button_pressed = false;
                //music.Stop ();
            }
        }
    }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     bsae = GameObject.Find("GameController").GetComponent <BombSpawnAndExplode_cfd> ();
     game_over_menu.SetActive(false);
 }