Buenas, estoy creando un videojuego en el cual tengo que mover un objeto de tipo "Heroe" en un TableLayoutPanel de 8*8...
Public Class Casilla
Inherits Encasillable
Dim e As Elemento
Dim p As Pastilla
' Sub New(ByVal elemento As Elemento, ByVal pastilla As Pastilla)
' elemento = e
' pastilla = p
' End Sub
Public Property setElemento() As Elemento
Get
Return e
End Get
Set(ByVal value As Elemento)
e = value
End Set
End Property
End Class
y luego.. en clase Tablero
Function addElemento(ByVal elemento As Elemento, ByVal x As Integer, ByVal y As Integer)
dimensiones(x, y).setElemento(elemento)
Return True
End Function
al hacer esto me salta el error, o qué tengo que hacer exactamente para que el setElemento me "trague" dicho "elemento"? Disculpad, soy novato en esto ( Al ser posible explicadlo "para tontos".GRACIAS