Exemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="mod"></param>
    public void AddModifier(XCameraModifier mod)
    {
        if ((_activeModifier == null) || (mod.priority >= _activeModifier.priority))
        {
            _activeModifierList.Add(mod);

            UpdateModifier();
        }
    }
Exemplo n.º 2
0
    /// <summary>
    ///
    /// </summary>
    public void UpdateModifier()
    {
        _activeModifier  = null;
        _loopTimeCounter = .0f;

        if (_activeModifierList.Count > 0)
        {
            _activeModifier = _activeModifierList[_activeModifierList.Count - 1];
        }
    }
Exemplo n.º 3
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="modNum"></param>
    /// <param name="name"></param>
    /// <param name="priority"></param>
    /// <param name="loopDuration"></param>
    public void AddModifierForCharge(int modNum, string name, int priority, float loopDuration)
    {
        XCameraConfigure conf = XCameraHelper.confPvp;

        if (!IsPvp())
        {
            conf = XCameraHelper.confPve;
        }

        XCameraConfigure.ModClass mod = conf.GetMod(name);

        if (mod != null)
        {
            XCameraModifier modForCharge = new XCameraModifier(mod.modName, mod.modPriority, mod.focusMod,
                                                               mod.heightMod, mod.rangeMod, mod.yawMod * priority, mod.wallBufferMod, mod.fieldOfView, mod.loopType, loopDuration);

            AddModifier(modForCharge);
        }
    }