Exemple #1
0
        public override void DoUpdate(LFloat deltaTime)
        {
            if (InputAgent.isSpeedUp)
            {
                spdUpTimer = new LFloat(3);
            }

            spdUpTimer -= deltaTime;
            speed       = spdUpTimer > 0 ? fastSpd : normalSpd;
            if (spdUpTimer > 0)
            {
                PostEffectManager.StartEffect(EPostEffectType.RadialBlur, 0.1f, 0.2f,
                                              0.3f
                                              , new PostEffectRadialBlur.ParamsInfo(1, 1.5f));
            }

            var skillId = InputAgent.skillId;

            if (skillId >= 0 && !isFire)
            {
                if (skillId < this.allSkills.Count)
                {
                    allSkills[skillId].Fire();
                }
            }

            base.DoUpdate(deltaTime);
            if (!isFire)
            {
                eventHandler.Animating(CMover.hasReachTarget);
            }
            animator.DoLateUpdate(deltaTime);
        }
Exemple #2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        owner = target as CAnimation;
        if (GUILayout.Button("GenList"))
        {
            isGenAnimInfos = true;
            OnBeginGen();
            EditorApplication.update += UpdateFunc;
        }

        if (GUILayout.Button("SetTimer"))
        {
            owner.SetTime(owner.debugTimer);
        }

        if (GUILayout.Button("PE_RadialBlur"))
        {
            PostEffectManager.StartEffect(EPostEffectType.RadialBlur, owner.shaderDuration, owner.shaderFadeInTime,
                                          owner.shaderFadeOutTime
                                          , new PostEffectRadialBlur.ParamsInfo(owner.shadersSampleDist, owner.shadersSampleStrength));
        }
    }