Ejemplo n.º 1
0
    private void UpdateCurrentStateShot(bool forceCut = false)
    {
        if (!m_enableShotSystem)
        {
            return;
        }

        var s = m_creature.currentState;

        if (!s)
        {
            return;
        }
        m_stateTime = s.normalizedTime;
        m_shotIndex = 0;

        m_currentShot.SetBlendType(m_nextShot.blend.blendType, null);

        ShotState shotState;

        if (!CameraShotInfo.GetShotState(m_creature.weaponID, s.ID, m_stateTime, m_shotIndex, out m_shotInfo, out shotState))
        {
            SwitchShot(ref m_initStartState, false, forceCut);
            return;
        }
        else
        {
            ++m_shotIndex;
            SwitchShot(ref shotState, false, forceCut);
        }

        SwitchShot(forceCut);
    }
Ejemplo n.º 2
0
    public void UpdateShotState()
    {
        var s = m_creature.currentState;

        if (!s)
        {
            return;
        }

        ShotState shotState;

        if (!CameraShotInfo.GetShotState(m_creature.weaponID, s.ID, m_stateTime, out m_shotInfo, out shotState))
        {
            offset = m_initOffset;
            euler  = m_initEuler;
            return;
        }

        SwitchShot();
    }