| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > VB6 > SoS! QB Задача! |
| Автор: SoS! 8.6.2004, 22:49 | ||||
Есть у меня вот такая задача:
Есть пример как надо сделать....
Подскажите как мне сделать движение парахода (там где вопросы стоят! |
| Автор: ~FoX~ 9.6.2004, 16:41 |
| В цикле сначала стираешь параходик, потом перерисовываешь в новой позиции. Тока он мерцать будет! |
| Автор: Enflout 9.6.2004, 19:09 |
| Как я понимаю тебе нужно всего лишь переделать координаты объектов под себя. Вроде такого: x = 242: y = 246: dx = .3: dy = 1 DO x = x + dx: y = y + dy PUT (x, y), bug1, OR ... Могу ошибаться. |
| Автор: Jey_k 15.6.2004, 23:40 | ||
Так в общем-то и делается анимация в васике. Мерцать не будет если параход не закрашивать, а оставить нарисованным контурной линией. Думаю не стоит объяснять что стирать его надо вторичной пррисовкой но с кодом цвета для кисти таким же как у фона |
| Автор: Enflout 16.6.2004, 07:40 |
| Нет ему нужно все реализовать именно через операторы GET и PUT. GET [STEP](x1,y1)-[STEP](x2,y2),arrayname[(indices)] ? (x1,y1) and (x2,y2) are numeric expressions that are the screen coordinates of diagonally opposite corners of the rectangle to store ? STEP enables you to use relative screen coordinates ? arrayname indicates the array where the image will be stored ? indices enable you to start storing the image information in some array element other than the first one See Also ?PUT (Graphics)? ?SCREEN statement? PUT - a graphics statement that places a graphic image obtained by a GET statement onto the screen Syntax PUT [STEP](x, y),arrayname[(indices)][,actionverb] ? (x,y) are the screen coordinates of the upper-left corner of the displayed image ? STEP enables you to use relative screen coordinates ? arrayname indicates the array where the image is stored ? indices enable you to start retrieving the image information from an array element other than the first one ? actionverb enables you to display the image with special effects, and must be one of the following keywords (XOR is the default): PSET Draws image as stored, wiping ? XOR Reverses points in the image out any existing image ? with those in existing image PRESET Draws image in reverse colors ? or with background. wiping out any existing image ? Used in successive PUT AND Merges stored image with ? statements, with time delays, existing image ? causes stored image to appear OR Superimposes stored image on ? and disappear. With movement existing image ? of image, animation is achieved See also ?GET (Graphics)? Ему просто необходимо взять код 2 программы и вставить туда свои координаты. Поправьте, если неправ. |
| Автор: Jey_k 16.6.2004, 22:40 |
| Templar$ Тады точно мерцать будет. Но раз такие условия, то ничего не поделать |
| Автор: Enflout 17.6.2004, 07:26 |
| Обрати внимание на параметры PSET, PRESET, AND, OR. Давным-давно я писал залпом такие программы. Где-то валялся код летающего гроба |
| Автор: Akina 17.6.2004, 08:52 | ||
Да ну... выводи на одну страницу, показывай другую... конечно дрыгаться будет как паралитик, но без мерцания... |