⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pawn.vb

📁 OOP With Microsoft VB.NET And Csharp Step By Step
💻 VB
字号:
Public Class Pawn
    Implements IMoveable

    Public Sub Move(ByVal aDirection As MoveIt.Direction, ByVal howFar _
    As Integer) Implements MoveIt.IMoveable.Move
        Select Case aDirection
            Case Direction.Up
                m_y += howFar
            Case Direction.Down
                m_y -= howFar
            Case Direction.Left
                m_x -= howFar
            Case Direction.Right
                m_x += howFar
        End Select
    End Sub

    Private m_x As Integer = 0

    Public Property X() As Integer Implements MoveIt.IMoveable.X
        Get
            Return m_x
        End Get
        Set(ByVal Value As Integer)
            m_x = Value
        End Set
    End Property

    Private m_y As Integer = 0
    Public Property Y() As Integer Implements MoveIt.IMoveable.Y
        Get
            Return m_y
        End Get
        Set(ByVal Value As Integer)
            m_y = Value
        End Set
    End Property

    Private m_captured As Boolean = False
    Public Property Captured() As Boolean
        Get
            Return m_captured
        End Get
        Set(ByVal Value As Boolean)
            m_captured = Value
        End Set
    End Property

End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -