Example #1
0
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteOriginal, spriteClick);

        Application.LoadLevel("scene-1");
    }
Example #2
0
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteOriginal, spriteClick);

        manager.busyGame = false;
    }
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteOriginal, spriteClick);

        player = GameObject.FindGameObjectWithTag("Player");
        Rigidbody2D bulletInstance = Instantiate(rocket, player.transform.position, Quaternion.Euler(new Vector3(0, 0, 0))) as Rigidbody2D;

        bulletInstance.velocity = new Vector2(speed, 0);
    }
Example #4
0
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteOriginal, spriteClick);
        if (Time.timeScale < 1)
        {
            Time.timeScale = 1;
        }
        Application.LoadLevel("scene-menu");
    }
Example #5
0
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteOriginal, spriteClick);

        if (Time.timeScale > 0)
        {
            Time.timeScale = 0;
        }
        else
        {
            Time.timeScale = 1;
        }

        spriteStart.SetActive(false);
        spritePause.SetActive(true);
        manager.startGame = false;
    }
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteOriginal, spriteClick);

        PlayerPrefs.SetInt("HighScore", 0);

        if (Time.time >= _NextSpriteMessage)
        {
            Vector3    centerPoint = Camera.main.ScreenToWorldPoint(new Vector3(Camera.main.pixelWidth / 2, Camera.main.pixelHeight / 2, 1));
            GameObject go          = new GameObject("spriteMessage");
            go.transform.localScale = new Vector3(1.5f, 1.5f, 1.0f);
            SpriteRenderer sr = go.AddComponent <SpriteRenderer> ();
            sr.sprite             = spriteMessage;
            sr.sortingOrder       = 1;
            go.transform.position = centerPoint;             //localPosition em relacao ao pa
            Destroy(go, _IntervalSpriteMessage);
            _NextSpriteMessage = Time.time + _IntervalSpriteMessage;
        }
    }
Example #7
0
    void OnMouseDownMobile()
    {
        btncommon.SoundClick3();

        manager.busyGame = true;

        if (manager.musicPlay && manager.soundPlay)
        {
            manager.musicPlay = false;
            btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteClickOrange);
        }
        else if (!manager.musicPlay && manager.soundPlay)
        {
            manager.soundPlay = false;
            btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteClickRed);
        }
        else
        {
            manager.musicPlay = true;
            manager.soundPlay = true;
            btncommon.ChangeSpriteClick(GetComponent <SpriteRenderer> (), spriteClickOriginal);
        }
    }
Example #8
0
 void OnMouseDownMobile()
 {
     btncommon.SoundClick3();
     Application.OpenURL(manager.urlQuadrante);
 }