Beispiel #1
0
    private void ShowGZDaodan()
    {
        if (daodanNums == 0)
        {
            MeiGanraodan.Play();
            return;
        }
        daodanNums--;
        _playerUI.Txt_daodan.text = daodanNums.ToString();
        GameObject daodan = GlobalTools.GetGameObjectInObjPoolByName(GZDaodanName);

        daodan.transform.position = new Vector3(this.transform.position.x, this.transform.position.y - 1, this.transform.position.z);
        daodan.transform.parent   = this.transform.parent;
        daodan.GetComponent <DD_GZDaodanPlayer>().SetQSSpeedX(this.GetComponent <Rigidbody2D>().velocity.x);
    }
Beispiel #2
0
    public void SFJipao()
    {
        if (JipaoNums <= 0)
        {
            if (IsJipao)
            {
                MeiGanraodan.Play();
            }
            IsJipao = false;
        }

        if (!IsJipao)
        {
            return;
        }
        JipaoJishiNums += Time.deltaTime;
        if (JipaoJishiNums >= JipaoJishi)
        {
            JipaoNums--;
            _playerUI.Txt_jipao.text = JipaoNums.ToString();
            JipaoJishiNums           = 0;
            GetJipao();
        }
    }