Sprite暴露错误 [英] Sprite Exposed Errors

查看:125
本文介绍了Sprite暴露错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个sprite暴露错误。如何更正以下错误:



Sprite无法通过类板在项目外公开Sprite



'替代方法

Public Sub AddPiece(ByVal Sprite As Sprite)



'使用下面的方法添加这件作品

AddPiece(雪碧,新填充(0))



结束子



Sprite无法通过类板在项目外暴露Sprite



'使用此方法添加新板块类型到板上

Public Sub AddPiece(ByVal Sprite As Sprite,ByVal Margin As System.Windows.Forms.Padding)



'创造一件新作品

昏暗的新作品作为新作品



'设置其属性

使用newPiece

.Index = Pieces.Count + 1

.Sprite = Sprite

结束与



'在收藏中添加新作品

Pieces.Add(newPiece)



结束子



Sprite不能通过class Piece暴露项目外的Sprite



公共类作品

公共精灵作为精灵

Public Index As Int32

公共标签为字符串

结束类

I have several sprite exposed errors. How do I correct the following errors:

Sprite cannot expose Sprite outside the project through class Board

' Alternative method
Public Sub AddPiece(ByVal Sprite As Sprite)

' Add this piece using the below methid
AddPiece(Sprite, New Padding(0))

End Sub

Sprite cannot expose Sprite outside the project through class Board

' Use this method to add a new piece type to the board
Public Sub AddPiece(ByVal Sprite As Sprite, ByVal Margin As System.Windows.Forms.Padding)

' Create a new piece
Dim newPiece As New Piece

' Set its properties
With newPiece
.Index = Pieces.Count + 1
.Sprite = Sprite
End With

' Add a new piece to the collection
Pieces.Add(newPiece)

End Sub

Sprite cannot expose Sprite outside the project through class Piece

Public Class Piece
Public Sprite As Sprite
Public Index As Int32
Public Tag As String
End Class

推荐答案

这篇关于Sprite暴露错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆