public void AddNewItemAtMouse(ItemEditor newEditor) { int nextNumber = _model.Level.GetNextItemNumber(); newEditor.SetPosition(MouseStatus.WorldPosition); newEditor.ItemProperties.Id = _model.Level.GenerateId(nextNumber); newEditor.ItemProperties.Name = @"{0}_{1}".FormatWith(newEditor.NameSeed, nextNumber); newEditor.ParentLayer = _model.ActiveLayer; _model.AddEditor(newEditor); }
public void AddNewItemAtMouse( ItemEditor newEditor ) { int nextNumber = _model.Level.GetNextItemNumber(); newEditor.SetPosition( MouseStatus.WorldPosition ); newEditor.ItemProperties.Id = _model.Level.GenerateId(nextNumber); newEditor.ItemProperties.Name = @"{0}_{1}".FormatWith(newEditor.NameSeed, nextNumber); newEditor.ParentLayer = _model.ActiveLayer ; _model.AddEditor(newEditor); }