示例#1
0
        public override void Update(
            MouseController MouseController,
            KeyController KeyController,
            int DeltaT,
            Transform Transform)
        {
            if (_Movement != null)
            {
                Position = _Movement.GetPoint(DeltaT);
                if (_Movement.Done)
                {
                    _Movement = null;
                }
            }
            Transform.Translate(Position);
            base.Update(MouseController, KeyController, DeltaT, Transform);

            // Display overlays since the text will not show up otherwise.
            if (!DISPLAYED)
            {
                Transform.Scale(1 / 64f, 1 / 64f);
                MOVED_DISPLAY.Update(MouseController, KeyController, DeltaT, Transform);
                FIRED_DISPLAY.Update(MouseController, KeyController, DeltaT, Transform);
                MOVING_DISPLAY.Update(MouseController, KeyController, DeltaT, Transform);
                WORKING_DISPLAY.Update(MouseController, KeyController, DeltaT, Transform);
                DISPLAYED = true;
            }

            _UnitConfigurationChangedBuffer.DispatchEvents();
        }
示例#2
0
 public void Move(MovementEventArgs E)
 {
     if (E.Path != null)
     {
         _Movement = new MovementDolly(this, E.Path, E.Carrier);
     }
     else
     {
         _Movement = null;
         Position  = E.Tile.Center;
     }
 }