Beispiel #1
0
    private IEnumerator OpenAnimation(Action callback)
    {
        GUICameraControll farmCamera = FarmRoot.Instance.Camera.GetComponent <GUICameraControll>();
        Vector3           position   = base.transform.position;

        position.y -= FarmRoot.Instance.gameObject.transform.localPosition.y;
        yield return(base.StartCoroutine(farmCamera.MoveCameraToLookAtPoint(position, 0.2f)));

        bool isEffectEnd = false;
        EffectAnimatorObserver effect = FarmRoot.Instance.GetBuildCompleteEffect(base.transform);

        if (null != effect)
        {
            EffectAnimatorEventTime component = effect.GetComponent <EffectAnimatorEventTime>();
            component.SetEvent(0, delegate
            {
                isEffectEnd = true;
            });
            effect.Play();
        }
        while (!isEffectEnd)
        {
            yield return(null);
        }
        if (callback != null)
        {
            callback();
        }
        yield break;
    }
Beispiel #2
0
        public void StartTranceEffect(Action finishAction)
        {
            this.iconCoverEffectParentObject.SetActive(true);
            SoundMng.Instance().TryPlaySE("SEInternal/Common/se_101", 0f, false, true, null, -1);
            this.iconCoverAnimation.Play("Awakening");
            EffectAnimatorEventTime component = this.iconCoverAnimation.GetComponent <EffectAnimatorEventTime>();

            component.SetEvent(0, finishAction);
            component.SetEvent(1, new Action(this.OnFinalize));
        }
Beispiel #3
0
        public void ShowLevelUpParticle(Action finishAction)
        {
            this.gaugeCoverEffectParentObject.SetActive(true);
            this.levelUpAnimtion.Play("LevelUp");
            EffectAnimatorEventTime component = this.levelUpAnimtion.GetComponent <EffectAnimatorEventTime>();

            component.SetEvent(0, finishAction);
            component.SetEvent(1, new Action(this.OnFinalize));
            SoundMng.Instance().TryPlaySE("SEInternal/Common/se_101", 0f, false, true, null, -1);
        }
    public void BuildCompleteEffect()
    {
        SoundMng.Instance().TryPlaySE("SEInternal/Farm/se_202", 0f, false, true, null, -1);
        FarmRoot instance = FarmRoot.Instance;
        EffectAnimatorObserver buildCompleteEffect = instance.GetBuildCompleteEffect(base.transform);

        if (null != buildCompleteEffect)
        {
            EffectAnimatorEventTime component = buildCompleteEffect.GetComponent <EffectAnimatorEventTime>();
            component.SetEvent(0, new Action(this.BuildEffect));
            buildCompleteEffect.Play();
        }
    }