Справочник Жаркова по проектированию и программированию искусственного интеллекта. Том 6: Программирование на Visual Basic искусственного интеллекта. Продолжение 2. Валерий Алексеевич Жарков

Читать онлайн книгу.

Справочник Жаркова по проектированию и программированию искусственного интеллекта. Том 6: Программирование на Visual Basic искусственного интеллекта. Продолжение 2 - Валерий Алексеевич Жарков


Скачать книгу
m_myModeOfMovement As ModeOfMovement

      Public Enum ModeOfMovement As Integer

       Flying = 1

      End Enum

      'When did we last update a flipped image

      Private m_lastTickCountWhenImageFlipped As Integer

      Const DTIME_TO_FLAP_WINGS = 400      'Every 600 ms we should

      'flap our wings

      '–

      'These are the current image states for Hank

      '–

      Private Enum BorisImagesIndexes

       flyLeft1 = 1

       flyLeft2 = 2

      End Enum

      '–

      '[in] X,Y : Position to start Hank at

      '[in] worldHankInhabits : Playfield in which Hank lives

      '–

      Sub New(ByVal x As Integer, ByVal y As Integer, _

      ByVal world_I_Inhabit As PlayFieldManager)

       '–

       'Get the bitmaps for our character

       '–

       Dim col As Collection

       col = g_FlyingBirdPictureCollection()

       m_world_I_Inhabit = world_I_Inhabit

       ChangeMyMovementState(ModeOfMovement.Flying)

       'Start him off as falling.

       '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

      Конец ознакомительного фрагмента.

      Текст предоставлен ООО «ЛитРес».

      Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.

      Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.

/9j/4AAQSkZJRgABAQEAZABkAAD/4gHbSUNDX1BST0ZJTEUAAQEAAAHLAAAAAAJAAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLVF0BQ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlyWFlaAAAA8AAAABRnWFlaAAABBAAAABRiWFlaAAABGAAAABR3dHB0AAABLAAAABRjcHJ0AAABQAAAAAxyVFJDAAABTAAAACBnVFJDAAABTAAAACBiVFJDAAABTAAAACBkZXNjAAABbAAAAF9YWVogAAAAAAAAb58AADj0AAADkVhZWiAAAAAAAABilgAAt4cAABjcWFlaIAAAAAAAACShAAAPhQAAttNYWVogAAAAAAAA808AAQAAAAEWwnRleHQAAAAATi9BAHBhcmEAAAAAAAMAAAACZmYAAPKnAAANWQAAE9AAAApbZGVzYwAAAAAAAAAFc1JHQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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