Exemple #1
0
    // 触发动作(延迟调用,继承自sdBehaviourAction)aa
    public override void DoAsyncAction()
    {
        if (mCount == 0)
        {
            return;
        }

        mDelayTime -= Time.deltaTime;
        if (mDelayTime <= 0)
        {
            mSummonLevelArea.OnTriggerHitted(null, new int[4] {
                0, 0, 0, 0
            });

            mDelayTime = mIntervalTime;

            --mCount;
        }
    }
Exemple #2
0
    // 更新触发状态(继承自sdBehaviourState)aa
    public override void UpdateState()
    {
        if (mIsInState == true)
        {
            if (mCurrentCount != 0)
            {
                mCurrentDelayTime -= Time.deltaTime;
                if (mCurrentDelayTime <= 0.0f)
                {
                    if (mSummonLevelArea != null)
                    {
                        mSummonLevelArea.OnTriggerHitted(null, new int[4] {
                            0, 0, 0, 0
                        });
                    }

                    mCurrentDelayTime = mIntervalTime;

                    --mCurrentCount;
                }
            }
        }
    }