Example #1
0
    //起始动作
    protected virtual void QiShiAC()
    {
        if (IsFaceToTarget && !IsTrunFace)
        {
            IsTrunFace = true;

            _gameBody.SetV0();

            if (this.transform.position.x > _player.transform.position.x)
            {
                _gameBody.TurnLeft();
            }
            else
            {
                _gameBody.TurnRight();
            }
            if (QSAudio)
            {
                QSAudio.Play();
            }
        }

        _qishiACJS += Time.deltaTime;

        //print("_qishiACJS    "+ _qishiACJS+ "    TX_Qishi isplaying :   " + TX_Qishi.isPlaying);

        if (TX_Qishi && !TX_Qishi.isPlaying)
        {
            //print(ZiDanName+"    ---------------------------------------------->播放 起始粒子!!!!" + _qishiACJS);
            //_qishiACJS = 0;
            //TX_Qishi.Simulate(0.0f);
            if (QSAudio)
            {
                QSAudio.Play();
            }
            TX_Qishi.Play();
        }


        if (_qishiACJS >= QiShiACYCTimes)
        {
            _qishiACJS = 0;
            if (QSAudio)
            {
                QSAudio.Stop();
            }
            ReSetAll();
            Fire();
        }
    }