Пример #1
0
    private void shootCGamp()
    {
        if (bullet)
        {
            if (bulletamount > 0)
            {
                nextFire = Time.time + fireRate;
                GameObject obj = Instantiate(bullet, shotSpawn.transform.position, shotSpawn.transform.rotation) as GameObject;
                obj.GetComponent <Rigidbody>().angularVelocity = UnityEngine.Random.insideUnitSphere * tumble;

                bulletamount -= 1;
                BulletAmount.GetComponent <TMPro.TextMeshPro>().text = "CGamp: " + bulletamount;
            }
        }
    }
Пример #2
0
    void Update()
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //Set up how turtorial will show players basic gameplay
        if (GlobalVariables.tutorial == true)
        {
            if ((WhatToRead == 4 && bulletamount >= 10) || (WhatToRead == 6 && numberofstingsdone >= 1))
            {
                Click();
            }

            bool held = Input.GetButton("Fire1");
            if (held && !last)
            {
                if (text)
                {
                    finish = true;
                }
                else
                {
                    press.SetActive(false);
                    if ((WhatToRead != 4 && WhatToRead != 6))
                    {
                        Click();
                    }
                }
            }
            last = held;
        }

        BulletAmount.GetComponent <TextMeshPro>().text = "CGamp: " + bulletamount;
        bool bPressed = Input.GetButtonDown("Fire1");

        //     bool bHeld = Input.GetButton("Fire1");
        //     bool bUp = Input.GetButtonUp("Fire1");

        if (bPressed && Time.time > nextFire)
        {
            // if (SoundManager.IsJordanPlaying("28860__junggle__btn050") == false)
            SoundManager.PlayJordanVoice("link3");
            shootCGamp();
        }
    }
Пример #3
0
    void Start()
    {
        // BannerScript.LockTrophy("Endoplasmic reticulum");

        amount       = 0;
        stingamount  = 0;
        fin          = false;
        score        = 0;
        bulletamount = 0;
        BulletAmount.GetComponent <TMPro.TextMeshPro>().text = "CGamp: " + bulletamount;
        theLives.GetComponent <TMPro.TextMeshPro>().text     = "LIVES: " + lives;
        TheLevel.GetComponent <TMPro.TextMeshPro>().text     = "LEVEL: " + level;
        if (GlobalVariables.arcadeMode == false)
        {
            TheLevel.SetActive(false);
            theScore.SetActive(false);
        }
        if (GlobalVariables.tutorial)
        {
            Click();
        }
    }