Справочник Жаркова по проектированию и программированию искусственного интеллекта. Том 6: Программирование на Visual Basic искусственного интеллекта. Продолжение 2
Шрифт:
'Initialize our base class with these…
MyBase.Initialize_DrawableMultiPlayfiedBitmapObject( _
x, y, col, True)
'Set the image index
Me.CurrentFrameIndex = BorisImagesIndexes.flyLeft1
'Set Boris' speed
m_xVelocityBoris = -4
m_y_accelerationBorris = 1
'–
'Set the collision rectangle for Hank
'–
Const BORIS_COLLISION_STARTX = 11
Const BORIS_COLLISION_DX = 31
Const BORIS_COLLISION_STARTY = 6
Const BORIS_COLLISION_DY = 7
Me.CollisionRectangle = New Rectangle( _
BORIS_COLLISION_STARTX, BORIS_COLLISION_STARTY, _
BORIS_COLLISION_DX, BORIS_COLLISION_DY)
End Sub
'–
'This function should be called to bring about any change
'of state
'It sets/resets any other variables we need to when we deal
'with state transitions
'–
Private Sub ChangeMyMovementState(ByVal newState As _
ModeOfMovement)
m_myModeOfMovement = newState
End Sub
'–
'MOVE Boris
'
'This function is called to move the character on the screen
Конец ознакомительного фрагмента.