Лабораторная работа: Greating game on visual basic with multiplayer system
End If
End If
onconnect = True
Select Case msgtype
'Below is where you define your message structure types and add responding code, cool.
Case MSG_STARTGAME
onconnect = True
multiplayermode = True
' Number of players
numplayers = dpmsg. ReadByte
' Player IDs,
MyPlayer = dpmsg. ReadLong
' Show the game board.
Connect. Hide
MainBoard. Enabled = True
MainBoard. Show
MainBoard. hostagame. Enabled = False
MainBoard. joinagame. Enabled = False
MainBoard. mnudisconnect. Enabled = True
Case MSG_MOVE 'Sent when square is click
Dim t As Byte
t = dpmsg. ReadByte
Select Case t
Case 0
Call MainBoard. layer_A_online (0)
Case 1
Call MainBoard. layer_A_online (1)
Case 2
Call MainBoard. layer_A_online (2)