赞 | 6 |
VIP | 2 |
好人卡 | 0 |
积分 | 22 |
经验 | 6348 |
最后登录 | 2024-10-26 |
在线时间 | 1102 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 2227
- 在线时间
- 1102 小时
- 注册时间
- 2006-1-10
- 帖子
- 800
|
x,y = 111,333 back = RPG::Sprite.new back.bitmap = Bitmap.new(640,480) back.bitmap.fill_rect(0,0,640,480,Color.new(0,0,0)) a = RPG::Sprite.new b = RPG::Sprite.new c = RPG::Sprite.new aaa = Bitmap.new(10,10) aaa.fill_rect(0,0,10,10,Color.new(255,0,255)) bbb = Bitmap.new(10,10) bbb.fill_rect(0,0,10,10,Color.new(0,255,255)) a.bitmap = aaa b.bitmap = bbb a.x = 320 a.y = 240 b.x = x b.y = y c.x = 320 c.y = 240 m = Math.sqrt((x - 320)**2 + (y - 240)**2) c.bitmap = Bitmap.new(m,1) c.bitmap.fill_rect(0,0,m,1,Color.new(255,255,255)) d = Math.atan2( (240 - y), (x - 320)) / Math::PI * 180 c.angle = d
x,y = 111,333
back = RPG::Sprite.new
back.bitmap = Bitmap.new(640,480)
back.bitmap.fill_rect(0,0,640,480,Color.new(0,0,0))
a = RPG::Sprite.new
b = RPG::Sprite.new
c = RPG::Sprite.new
aaa = Bitmap.new(10,10)
aaa.fill_rect(0,0,10,10,Color.new(255,0,255))
bbb = Bitmap.new(10,10)
bbb.fill_rect(0,0,10,10,Color.new(0,255,255))
a.bitmap = aaa
b.bitmap = bbb
a.x = 320
a.y = 240
b.x = x
b.y = y
c.x = 320
c.y = 240
m = Math.sqrt((x - 320)**2 + (y - 240)**2)
c.bitmap = Bitmap.new(m,1)
c.bitmap.fill_rect(0,0,m,1,Color.new(255,255,255))
d = Math.atan2( (240 - y), (x - 320)) / Math::PI * 180
c.angle = d
|
评分
-
查看全部评分
|