Пример #1
0
        public void DoZoomIn(Queue <IMoveAction> actions)
        {
            if (ScaleRotateFlag)
            {
                actions.ActionScaleSquadToPosition(this, 0.1, SquadCenter, 60);
            }
            else
            {
                DoRotateJerk(actions);
            }

            ScaleRotateFlag = !ScaleRotateFlag;
            LastScaleTick   = MyStrategy.Universe.World.TickIndex;
            //UpdateLastCallTime(MyStrategy.Universe.World.TickIndex);
        }
Пример #2
0
        internal void DoScaleJerk(Queue <IMoveAction> actions, List <DeferredAction> deferredActionsList, double factor, AbsolutePosition nukeCenter, int duration, int deferredTickIndex)
        {
            actions.ActionScaleSquadToPosition(this, factor, nukeCenter, duration);

            var deferredActions = new Queue <IMoveAction>();

            deferredActions.ActionScaleSquadToPosition(this, 0.1, nukeCenter, (int)1.5 * duration);

            // TODO if queue is log, there is not time for movement, planned combining time is behind.
            foreach (var action in deferredActions)
            {
                //TODO impossible to set exact required time for deferred action
                deferredActionsList.Add(new DeferredAction(action, deferredTickIndex));
            }
            UpdateLastCallTime(MyStrategy.Universe.World.TickIndex);
        }