Exemplo n.º 1
0
    /// <summary>
    /// Do the effect base on type u select.
    /// </summary>
    /// <param name="effectType"> effect type. </param>
    public void DoEffect(BF_PickItemEffectType effectType)
    {
        BF_GameManager bfGm = BF_GameManager.instance;

        switch (effectType)
        {
        case BF_PickItemEffectType.ADD_HP:
        {
            bfGm.HEALTH_LIQUIDBAR.DeltaAdd(mEffectValue);
        }
        break;

        case BF_PickItemEffectType.SUB_HP:
        {
            bfGm.HEALTH_LIQUIDBAR.DeltaSub(mEffectValue);
        }
        break;

        case BF_PickItemEffectType.ADD_MP:
        {
            bfGm.MANA_LIQUIDBAR.DeltaAdd(mEffectValue);
        }
        break;

        case BF_PickItemEffectType.SUB_MP:
        {
            bfGm.MANA_LIQUIDBAR.DeltaSub(mEffectValue);
        }
        break;

        case BF_PickItemEffectType.INC_RC_MP:
        {
            bfGm.MANA_LIQUIDBAR.LiquidBar.RecoverValue += JCS_Mathf.ToPositive(mEffectValue);
        }
        break;

        case BF_PickItemEffectType.DEC_RC_MP:
        {
            bfGm.MANA_LIQUIDBAR.LiquidBar.RecoverValue += JCS_Mathf.ToNegative(mEffectValue);
        }
        break;
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 根據物品的效果不同設置不同的,飛行標誌!
    /// </summary>
    public void SetPickColliderByObject(BF_PickItemEffectType effectType)
    {
        BF_GameManager bfGm = BF_GameManager.instance;

        switch (effectType)
        {
        case BF_PickItemEffectType.SUB_HP:
        case BF_PickItemEffectType.ADD_HP:
        {
            mPickItem.PickCollider = bfGm.HEALTH_OBJECT;
        }
        break;

        case BF_PickItemEffectType.SUB_MP:
        case BF_PickItemEffectType.ADD_MP:
        {
            mPickItem.PickCollider = bfGm.MANA_OBJECT;
        }
        break;
        }
    }