示例#1
0
        public Rotation(BaseEvent be, Character caster, Environment environment)
        {
            this.be          = be;
            this.caster      = caster;
            this.environment = environment;
            ra = (RotationAction)be.ShowAction();
            Entity entity = caster.GameObject().GetComponent <EntityReference>().Entity;

            movementComponent = entity.GetComponent <MovementComponent>();
            TimelineTrigger timelineTrigger = (TimelineTrigger)be.ShowTrigger();

            duration            = ra.ShowDurationInSeconds(timelineTrigger.ShowScaleTime());
            interpolationMethod = ra.ShowInterpolation();
            interpolator        = EasingFunctions.GetEasingFunction(interpolationMethod);
            movingDirection     = ra.ShowMovingDirection();
            mode = ra.mode.ShowRotationMode();
            switch (mode)
            {
            case RotationAction.RotationMode.Delta:
                deltaRotationMode = (RotationAction.DeltaRotationMode)ra.mode;
                break;

            case RotationAction.RotationMode.Destination:
                destinationRotationMode = (RotationAction.DestinationRotationMode)ra.mode;
                break;
            }
        }
示例#2
0
 private void SetDashFunctions()
 {
     _dashFunction = EasingFunctions.GetEasingFunction(dashEasingFunction);
     _dashDerivativeFunction = EasingFunctions.GetEasingFunctionDerivative(dashEasingFunction);
     _currentDashEasingFunction = dashEasingFunction;
 }
示例#3
0
 private void SetDashFunctions()
 {
     _dashFunction              = EasingFunctions.GetEasingFunction(dashEasingFunction);
     _dashDerivativeFunction    = EasingFunctions.GetEasingFunctionDerivative(dashEasingFunction);
     _currentDashEasingFunction = dashEasingFunction;
 }