游戏开发论坛

 找回密码
 立即注册
搜索
查看: 5083|回复: 10

???????????

[复制链接]

5

主题

9

帖子

9

积分

新手上路

Rank: 1

积分
9
发表于 2003-12-1 14:46:00 | 显示全部楼层 |阅读模式
????????????????????
???????
For i=1 to ????????
   For j=1 to ????????
      If  ??(i).??<??(j).?? And ??(i).??>??(j).?? _
          ??(i).??<??(j).?? And ??(i).??>??(j).?? Then
          ----??????????
      End
   Next j
Next i
???????????????????30?????10????????????300?????????????????1???????????????????????????????????????????????????????????????????????????????????????????????????????????????????7???

15

主题

73

帖子

81

积分

注册会员

Rank: 2

积分
81
发表于 2003-12-1 15:51:00 | 显示全部楼层

Re:???????????

??????????????????
??????(????????????)??????????(?????,?????,??????????),???????????????????????????????(??????),????????????????.?????????,???????????????????????(?????????????????).?????????????...

2

主题

52

帖子

52

积分

注册会员

Rank: 2

积分
52
发表于 2003-12-1 16:02:00 | 显示全部楼层

Re:???????????

??????????
????????????????????????????????
?????????????????

15

主题

73

帖子

81

积分

注册会员

Rank: 2

积分
81
发表于 2003-12-2 10:52:00 | 显示全部楼层

Re:???????????

csj_alan

???????? AN ???????.??????????????????????????????????????????????

8

主题

68

帖子

68

积分

注册会员

Rank: 2

积分
68
发表于 2004-8-21 10:52:00 | 显示全部楼层

Re:???????????

?winapi????.?~~
IntersectRect
What is IntersectRect?
This function takes to RECT types and determines whether they overlap each other. Lets take a look at this function.



Public Declare Function IntersectRect Lib "user32" (lpDestRect As RECT, lpSrc1Rect As RECT, lpSrc2Rect As RECT) As Long



lpDestRect ? This RECT will receive the area that the 2 RECTs crossed over. You would be able to use this RECT for pixel perfect detection. More on that in a later lesson (maybe)

lpSrc1Rect ? The first source RECT

lpSrc2Rect ? The second source RECT



[Code Start]

Dim tmpRECT as RECT
Dim PlayerX as Integer, PlayerY As Integer

Dim CompX As Integer, CompY as Integer

Dim PlayerRect as RECT, CompRect As RECT



//We are assuming the dimenions of the player are 50x50 and the comp 50x50

//createrect is a helper function I wrote for creating rects.

PlayerRect = CreateRect(PlayerX, PlayerY, PlayerX +50, PlayerY + 50)

CompRect = CreateRect(CompX,CompY,CompX + 50, CompY + 50)



If IntersectRect(tmpRECT,PlayerRect,CompRect) = True Then //there was an overlap between the 2 rects

            //code here

End If

[Code Stop]

140

主题

1228

帖子

1233

积分

金牌会员

Rank: 6Rank: 6

积分
1233
QQ
发表于 2004-8-21 21:24:00 | 显示全部楼层

Re:???????????

????????200????150????????????200,150??????????????????

12

主题

54

帖子

56

积分

注册会员

Rank: 2

积分
56
发表于 2004-8-23 22:13:00 | 显示全部楼层

Re:???????????

2??????????????????---??????????????????????????????????????????
?????????????30?????10?????????????300??
??????????????????????????Collection??????????????????????
dim ZDcoll as collection'????
set ZDcoll=new collection
dim ZDNum as long
ZDNum=ZDcoll.count'????????
for i=1 to ZDNum'????????
'???????
next
?????????

32

主题

1583

帖子

1589

积分

金牌会员

Rank: 6Rank: 6

积分
1589
发表于 2004-9-2 20:25:00 | 显示全部楼层

Re:???????????

7??Collection????????????????????????????????????????

????????Collection???????????????????VB?????????
?????????????????????????????????????????????????????Collection????????

73

主题

612

帖子

618

积分

高级会员

Rank: 4

积分
618
发表于 2004-9-3 09:39:00 | 显示全部楼层

Re:???????????

Collection?????????????,????????,????

32

主题

1583

帖子

1589

积分

金牌会员

Rank: 6Rank: 6

积分
1589
发表于 2004-9-10 10:23:00 | 显示全部楼层

Re:???????????

?????????????????????????

???????????????????????????????
????????????????????????????????
???????????????????????????????
?????????????????
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-8-18 22:04

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表