Ejemplo n.º 1
0
        protected override async ETTask Run(AppEventType.MoveStop args)
        {
            DAnimatorComponent animatorComponent = args.Unit.GetComponent <DAnimatorComponent>();

            if (animatorComponent == null)
            {
                return;
            }

            animatorComponent.SetFloatValue("Speed", 0);

            await ETTask.CompletedTask;
        }
Ejemplo n.º 2
0
        protected override async ETTask Run(AppEventType.MoveStart args)
        {
            DAnimatorComponent animatorComponent = args.Unit.GetComponent <DAnimatorComponent>();

            if (animatorComponent == null)
            {
                return;
            }

            float speed = args.Unit.GetComponent <NumericComponent>().GetAsFloat(NumericType.Speed);

            animatorComponent.SetFloatValue("Speed", speed);

            await ETTask.CompletedTask;
        }