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();
        }
    }
Пример #2
0
 private IEnumerator Start()
 {
     loader = LoadModel();
     while (loader.IsLoading())
     {
         yield return((object)null);
     }
     CreateNamePlate();
     UpdateNamePlatePos();
     InitCollider();
     ChangeScale();
     interpolator = this.get_gameObject().AddComponent <TransformInterpolator>();
     animator     = loader.GetAnimator();
     if (!(animator == null))
     {
         animator.get_gameObject().AddComponent <RootMotionProxy>();
         InitAnim();
         coroutines.Add(new ManualCoroutine(0, this, DoFreeMove(), false, null, null));
         coroutines.Add(new ManualCoroutine(1, this, DoOutControll(), false, null, null));
         coroutines.Add(new ManualCoroutine(2, this, DoBackPosition(), false, null, null));
         coroutines.Add(new ManualCoroutine(3, this, DoLeave(), false, null, null));
         coroutines.Add(new ManualCoroutine(4, this, DoStop(), false, null, null));
         coroutines.Push(0);
         isLoading = false;
     }
 }
Пример #3
0
    public Coroutine MoveAutoEventEffect(Vector3 to)
    {
        //IL_0025: Unknown result type (might be due to invalid IL or missing references)
        //IL_002a: Unknown result type (might be due to invalid IL or missing references)
        //IL_002b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0030: Unknown result type (might be due to invalid IL or missing references)
        //IL_0032: Unknown result type (might be due to invalid IL or missing references)
        //IL_0039: Unknown result type (might be due to invalid IL or missing references)
        //IL_003e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0043: Unknown result type (might be due to invalid IL or missing references)
        //IL_0046: Unknown result type (might be due to invalid IL or missing references)
        //IL_004b: Unknown result type (might be due to invalid IL or missing references)
        //IL_004c: Unknown result type (might be due to invalid IL or missing references)
        //IL_004d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0052: Unknown result type (might be due to invalid IL or missing references)
        //IL_0066: Unknown result type (might be due to invalid IL or missing references)
        //IL_006b: Unknown result type (might be due to invalid IL or missing references)
        //IL_007e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0080: Unknown result type (might be due to invalid IL or missing references)
        if (autoEventEffect == null)
        {
            return(null);
        }
        TransformInterpolator component = autoEventEffect.GetComponent <TransformInterpolator>();

        to = autoEventEffect.get_parent().InverseTransformPoint(to);
        Vector3 val        = to - autoEventEffect.get_localPosition();
        Vector3 normalized = val.get_normalized();
        Vector3 add_value  = Vector3.Cross(normalized, Vector3.get_forward()) * Random.Range(-64f, 64f);

        add_value.z = 0f;
        component.Translate(0.25f, to, null, add_value, Curves.arcHalfCurve);
        return(component.Wait());
    }
 private void uLink_OnNetworkInstantiate(uLink.NetworkMessageInfo info)
 {
     transform.FindChild("uh60").gameObject.SetActive(true);
     transform.FindChild("uh602").gameObject.SetActive(true);
     this._interp         = this.GetComponent <TransformInterpolator>();
     this._interp.running = true;
 }
Пример #5
0
 protected void Awake()
 {
     this._myTransform = base.transform;
     this._takeDamage  = base.GetComponent <TakeDamage>();
     this._wildMove    = base.GetComponent <BaseAIMovement>();
     this._interp      = base.GetComponent <TransformInterpolator>();
     UnityEngine.Object.Destroy(base.GetComponent <BasicWildLifeMovement>());
     UnityEngine.Object.Destroy(base.GetComponent <VisNode>());
     this._takeDamage.enabled = false;
 }
Пример #6
0
        public void Awake()
        {
            Rigidbody rbody = GetComponent <Rigidbody>();

            cipols    = new ComponentInterpolator[rbody == null ? 1 : 2];
            cipols[0] = new TransformInterpolator(this, transform);
            if (rbody != null)
            {
                cipols[1] = new RigidBodyInterpolator(this, rbody);
            }
        }
    private IEnumerator _AddItemNum(Vector3 world_hit_pos, int rarity, bool is_right)
    {
        //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_0023: Unknown result type (might be due to invalid IL or missing references)
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        Transform parent;
        Vector3   offset;

        if (rarity > 0)
        {
            parent = dropIconR;
            offset = dropInfoR.get_transform().get_localPosition() - dropIconR.get_localPosition();
        }
        else
        {
            parent = dropIconN;
            offset = dropInfoN.get_transform().get_localPosition() - dropIconN.get_localPosition();
        }
        Transform effect = EffectManager.GetUIEffect("ef_ui_downenergy_01", parent, -0.001f, 0, null);

        if (!(effect == null))
        {
            Vector3 screen_pos = MonoBehaviourSingleton <InGameCameraManager> .I.WorldToScreenPoint(world_hit_pos);

            Vector3 ui_pos = MonoBehaviourSingleton <UIManager> .I.uiCamera.ScreenToWorldPoint(screen_pos);

            ui_pos.z = 1f;
            effect.set_position(ui_pos);
            GameObject            obj    = effect.get_gameObject();
            TransformInterpolator interp = obj.AddComponent <TransformInterpolator>();
            if (!(interp == null))
            {
                interp.Translate(add_value: new Vector3((!is_right) ? ((0f - dropEffectAddRandomMax) * 2f) : dropEffectAddRandomMax, dropEffectAddRandomMax * 2f, 0f), _time: dropEffectTime, target: offset, ease_curve: dropEffectEaseCurve, add_curve: dropEffectAddCurve);
                yield return((object)new WaitForSeconds(dropEffectTime));

                EffectManager.ReleaseEffect(obj, true, false);
                if (rarity > 0)
                {
                    MonoBehaviourSingleton <CoopManager> .I.coopStage.bossDropRare++;
                    SoundManager.PlayOneShotUISE(40000154);
                }
                else
                {
                    MonoBehaviourSingleton <CoopManager> .I.coopStage.bossDropNormal++;
                    SoundManager.PlayOneShotUISE(40000153);
                }
                DropInfoUpdate();
            }
        }
    }
    public void Snapshot(Vector3 position, Quaternion rotation, float serverTime)
    {
        float interpolationDelay = this.target.GetInterpolationDelay() + this.target.GetInterpolationSmoothing() + 1f;
        float single             = Time.time;

        this.timeOffsetNew = Mathf.Min(this.timeOffsetNew, single - serverTime);
        this.timeOffsetCount++;
        if (this.timeOffsetCount >= PositionLerp.TimeOffsetInterval)
        {
            this.timeOffset      = this.timeOffsetNew;
            this.timeOffsetNew   = Single.MaxValue;
            this.timeOffsetCount = 0;
        }
        single = (this.timeOffset == Single.MaxValue ? serverTime + this.timeOffsetNew : serverTime + this.timeOffset);
        if (PositionLerp.DebugLog && this.interpolator.list.Count > 0 && serverTime < this.lastServerTime)
        {
            Debug.LogWarning(string.Concat(new object[] { this.target.ToString(), " adding tick from the past: server time ", serverTime, " < ", this.lastServerTime }));
        }
        else if (!PositionLerp.DebugLog || this.interpolator.list.Count <= 0 || single >= this.lastClientTime)
        {
            this.lastClientTime = single;
            this.lastServerTime = serverTime;
            TransformInterpolator       transformInterpolator = this.interpolator;
            TransformInterpolator.Entry entry = new TransformInterpolator.Entry()
            {
                time = single,
                pos  = position,
                rot  = rotation
            };
            transformInterpolator.Add(entry);
        }
        else
        {
            Debug.LogWarning(string.Concat(new object[] { this.target.ToString(), " adding tick from the past: client time ", single, " < ", this.lastClientTime }));
        }
        this.interpolator.Cull(single - interpolationDelay);
    }
Пример #9
0
    void Start()
    {
        m_controller = GetComponent<CharacterController>();
        m_transformInterpolator = GetComponent<TransformInterpolator>();

        m_transformInterpolator.ForgetPreviousValues();
    }
Пример #10
0
    void Start()
    {
        m_transformInterpolator = GetComponent<TransformInterpolator>();
        m_pivotInterpolator = pivot.GetComponent<TransformInterpolator>();

        InterpolatedFloat zoom = new InterpolatedFloat(() => (m_zoom), (val) => { m_zoom = val; });
        m_zoomInterpolator = gameObject.AddComponent<FloatInterpolator>().Initialize(zoom);

        GameController.CharacterChanged += PlayerCharacterChanged;
    }
Пример #11
0
    private IEnumerator _DirectionShadowSealingGauge(Vector3 world_hit_pos)
    {
        //IL_0007: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Unknown result type (might be due to invalid IL or missing references)
        //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)
        float per        = CalcShadowSealingPercent();
        int   effect_num = (int)((per - shadowSealingPercent) * 10f) + 1;

        shadowSealingPercent = per;
        playShadowSealingEffectCount++;
        if (MonoBehaviourSingleton <InGameManager> .I.graphicOptionType > 0)
        {
            Vector3 screen_pos = MonoBehaviourSingleton <InGameCameraManager> .I.WorldToScreenPoint(world_hit_pos);

            Vector3 ui_pos = MonoBehaviourSingleton <UIManager> .I.uiCamera.ScreenToWorldPoint(screen_pos);

            List <GameObject> effects = new List <GameObject>();
            for (int i = 0; i < effect_num; i++)
            {
                Transform trans2 = EffectManager.GetUIEffect("ef_ui_downenergy_01", shadowSealingGaugeUI.GetGaugeTransform(), -0.001f, 0, null);
                if (!(trans2 == null))
                {
                    ui_pos.z = 1f;
                    trans2.set_position(ui_pos);
                    GameObject            obj2   = trans2.get_gameObject();
                    TransformInterpolator interp = obj2.AddComponent <TransformInterpolator>();
                    if (!(interp == null))
                    {
                        interp.Translate(add_value: new Vector3(Random.Range(0f - downEffectAddRandomMax, downEffectAddRandomMax), Random.Range(0f - downEffectAddRandomMax, downEffectAddRandomMax), 0f), _time: downEffectTime, target: Vector3.get_zero(), ease_curve: downEffectEaseCurve, add_curve: downEffectAddCurve);
                        effects.Add(obj2);
                        playShadowSealingEffects.Add(obj2);
                    }
                }
            }
            yield return((object)new WaitForSeconds(downEffectTime));

            effects.ForEach(delegate(GameObject obj)
            {
                ((_003C_DirectionShadowSealingGauge_003Ec__Iterator1C1) /*Error near IL_025b: stateMachine*/)._003C_003Ef__this.playShadowSealingEffects.Remove(obj);
                EffectManager.ReleaseEffect(obj, true, false);
            });
        }
        Transform tmp = EffectManager.GetUIEffect("ef_ui_downgauge_01", shadowSealingGaugeUI.GetGaugeTransform(), -0.001f, 0, null);

        if (tmp != null)
        {
            tmp.set_localScale(kShadowSealingGaugeEffectScale);
        }
        shadowSealingGaugeUI.SetPercent(per, false);
        yield return((object)new WaitForSeconds(1f));

        if (per >= 1f && !targetEnemy.IsDebuffShadowSealing())
        {
            Transform trans = EffectManager.GetUIEffect("ef_ui_downgauge_02", shadowSealingGaugeUI.GetGaugeTransform(), -0.001f, 0, null);
            if (trans != null)
            {
                playShadowSealingEffects.Add(trans.get_gameObject());
                while (targetEnemy.actionID == (Character.ACTION_ID) 18)
                {
                    yield return((object)null);
                }
                playShadowSealingEffects.Remove(trans.get_gameObject());
                EffectManager.ReleaseEffect(trans.get_gameObject(), true, false);
            }
        }
        playShadowSealingEffectCount--;
    }
Пример #12
0
 protected void Awake()
 {
     this._myTransform = base.transform;
     this._takeDamage = base.GetComponent<TakeDamage>();
     this._wildMove = base.GetComponent<BaseAIMovement>();
     this._interp = base.GetComponent<TransformInterpolator>();
     UnityEngine.Object.Destroy(base.GetComponent<BasicWildLifeMovement>());
     UnityEngine.Object.Destroy(base.GetComponent<VisNode>());
     this._takeDamage.enabled = false;
 }
Пример #13
0
 private void uLink_OnNetworkInstantiate(NetworkMessageInfo info)
 {
     this._interp         = base.GetComponent <TransformInterpolator>();
     this._interp.running = true;
 }
Пример #14
0
 private void uLink_OnNetworkInstantiate(uLink.NetworkMessageInfo info)
 {
     this._interp = base.GetComponent<TransformInterpolator>();
     this._interp.running = true;
 }