public SoulEnergy Get(float baseValue)
    {
        if (baseValue <= 0f)
        {
            return(null);
        }
        SoulEnergy soulEnergy = null;
        int        i          = 0;

        for (int count = collection.Count; i < count; i++)
        {
            SoulEnergy soulEnergy2 = collection[i];
            if (soulEnergy2.canWork())
            {
                soulEnergy = soulEnergy2;
                break;
            }
        }
        if (object.ReferenceEquals(soulEnergy, null))
        {
            soulEnergy = new SoulEnergy();
            soulEnergy.Init();
            collection.Add(soulEnergy);
        }
        soulEnergy.Exec(cacheOwner, baseValue);
        return(soulEnergy);
    }
Exemple #2
0
    public static void LegendarySoulGainer_Uninstall()
    {
        SoulEnergy component = PlayerInfo.GetPlayer().GetComponent <SoulEnergy>();

        component.onGetEnergy -= SoulGain;
        effectValueL1          = 0;
    }
    private IEnumerator _DirectionSoulGauge(SoulEnergy soulEnergy, Vector3 worldHitPos)
    {
        //IL_000e: Unknown result type (might be due to invalid IL or missing references)
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_001c: Unknown result type (might be due to invalid IL or missing references)
        //IL_001d: Unknown result type (might be due to invalid IL or missing references)
        Transform trans = soulEnergy.GetEffectTrans(soulEffectDirection);

        if (!object.ReferenceEquals(trans, null))
        {
            Vector3 screenPos = MonoBehaviourSingleton <InGameCameraManager> .I.WorldToScreenPoint(worldHitPos);

            Vector3 uiPos = MonoBehaviourSingleton <UIManager> .I.uiCamera.ScreenToWorldPoint(screenPos);

            uiPos.z = 1f;
            trans.set_position(uiPos);
            TransformInterpolator interp = trans.get_gameObject().GetComponent <TransformInterpolator>();
            if (object.ReferenceEquals(interp, null))
            {
                interp = trans.get_gameObject().AddComponent <TransformInterpolator>();
            }
            interp.Translate(add_value: new Vector3(Random.Range(0f - soulEffectAddRandomMax, soulEffectAddRandomMax), Random.Range(0f - soulEffectAddRandomMax, soulEffectAddRandomMax), 0f), _time: soulEffectTime, target: Vector3.get_zero(), ease_curve: soulEffectEaseCurve, add_curve: soulEffectAddCurve);
            yield return((object)new WaitForSeconds(soulEffectTime));

            soulEnergy.Absorbed();
        }
    }
 public void DirectionSoulGauge(SoulEnergy soulEnergy, Vector3 worldHitPos)
 {
     //IL_0001: Unknown result type (might be due to invalid IL or missing references)
     //IL_0013: Unknown result type (might be due to invalid IL or missing references)
     //IL_0019: Unknown result type (might be due to invalid IL or missing references)
     if (this.get_gameObject().get_activeInHierarchy())
     {
         this.StartCoroutine(_DirectionSoulGauge(soulEnergy, worldHitPos));
     }
 }
Exemple #5
0
    //--- L1 Start ---
    public static void LegendarySoulGainer_Install(float value)
    {
        SoulEnergy component = PlayerInfo.GetPlayer().GetComponent <SoulEnergy>();

        component.onGetEnergy -= SoulGain;
        component.onGetEnergy += SoulGain;

        if (effectValueL1 == 0)
        {
            effectValueL1 = (int)value;
        }
        else
        {
            effectValueL1 = Mathf.Min(effectValueL1, (int)value);
        }
    }