Esempio n. 1
0
        /// <summary>
        /// Constructs an ObjectPlacementInfo instance.
        /// </summary>
        /// <param name="view">The view to be used.</param>
        /// <param name="sprites">The sprite group to be used.</param>
        public ObjectPlacementInfo(IObjectPlacementView view, ISpriteGroup sprites)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }
            if (sprites == null)
            {
                throw new ArgumentNullException("sprites");
            }

            this.view    = view;
            this.sprites = sprites;
        }
Esempio n. 2
0
 /// <summary>
 /// Starts placing object with the given view & sprite group. If another object placement is currently in progress then
 /// it will be stopped automatically.
 /// </summary>
 /// <param name="view">The view to be used.</param>
 /// <param name="sprites">The sprite group to be used.</param>
 public void StartPlacingObject(IObjectPlacementView view, ISpriteGroup sprites)
 {
     this.StopPlacingObject();
     this.objectPlacementInfo = new ObjectPlacementInfo(view, sprites);
     this.mapEditorService.AnimationsUpdated += this.objectPlacementInfo.View.StepPreviewAnimation;
 }