Пример #1
0
        private void HandleFunScriptAction(ScriptActionEventArgs <FunScriptAction> eventArgs)
        {
            if (eventArgs.NextAction == null)
            {
                return;
            }

            eventArgs.CurrentAction.Position = TransformPosition(eventArgs.CurrentAction.Position);
            eventArgs.NextAction.Position    = TransformPosition(eventArgs.NextAction.Position);


            byte     position = eventArgs.NextAction.Position;
            TimeSpan duration = eventArgs.NextAction.TimeStamp - eventArgs.CurrentAction.TimeStamp;
            byte     speed    = SpeedPredictor.Predict2((byte)Math.Abs(eventArgs.CurrentAction.Position - position), duration);

            SetLaunch(position, speed);
        }