|
郑重声明:不欢迎任何形式的转载,请自重。如果你的游戏中引用了我的脚本的话请注明作者secondsen,谢谢。
- sp = Sprite.new
- sp.bitmap = Bitmap.new(544,416)
- ary = []
- sp.bitmap.clear
- sp.z = 100
- sp2 = Sprite.new
- sp2.bitmap = Bitmap.new("Graphics/System/BOOK.png")
- bitmap = Bitmap.new("Graphics/System/BOOK_R.png")
- for i in 0...6
- a = 123 + 24 * i
- b = (50 + 30 * (i ** 1.5))# * 0.5
- x = 0
- y = b
- sp.bitmap.clear
- ary.clear
- sign = b*b/Math.sqrt(a*a+b*b)
- p = -1
- loop do
- break if sign > y
- ary.push([a-x,y])
- if p <= 0
- x += 1
- else
- x += 1
- y -= 1
- end
- p = b*b*(x+1)*(x+1) + a*a*(y*y-y) - a*a*b*b
- end
- p = b*b*(x*x + x) + a*a*(y*y - y) - a*a*b*b
- loop do
- break if y < 0
- ary.push([a-x,y])
- if p >= 0
- y -= 1
- p = p - 2*a*a*y - a*a
- else
- y -= 1
- x += 1
- p = p - 2*a*a*y - a*a + 2*b*b*x + 2*b*b
- end
- end
- ary.reverse!
- rect = Rect.new(0,0,1,317)
- i = 0
- sp.bitmap.blt(ary[0][0]+243,85-ary[0][1],bitmap,rect)
- d = 0
- p = 0
- for j in 1...ary.size
- d = (ary[j][0]-ary[j-1][0]).abs + (ary[j][1]-ary[j-1][1]).abs
- if d == 1
- i += 1
- else
- p += 0.414
- if p > 1
- i += 2
- i = 213 if i == 214
- else
- i += 1
- end
- p -= 1
- end
- rect = Rect.new(i,0,1,317)
- sp.bitmap.blt(ary[j][0]+243,85-ary[j][1],bitmap,rect)
- break if i == 213
- t = 243 + ary[j][0]
- end
- if i < 213
- ary.reverse!
- for j in 1...ary.size
- d = (ary[j][0]-ary[j-1][0]).abs + (ary[j][1]-ary[j-1][1]).abs
- if d == 1
- i += 1
- else
- p += 0.414
- if p > 1
- i += 2
- i = 213 if i == 214
- else
- i += 1
- end
- p -= 1
- end
- rect = Rect.new(i,0,1,317)
- sp.bitmap.blt(t-ary[j][0]+a,85-ary[j][1],bitmap,rect)
- break if i == 213
- end
- end
- for i in 0...5
- Graphics.update
- end
- end
- sp.bitmap.clear
- c = bitmap.get_pixel(213,0)
- for i in 0...398
- sp.bitmap.set_pixel(243,i,c)
- end
- for i in 0...300
- Graphics.update
- end
- sp2.bitmap.dispose
- sp2.dispose
- sp.bitmap.dispose
- sp.dispose
- bitmap.dispose
- exit
复制代码
放到脚本的最上头。。XP,VX均适用。。这个脚本演示的是0~90的翻页,而不是0~180度的
这个没有做成菜单,纯是一个演示,想做成菜单的话,自己动手丰衣足食
下边是所用的素材 |
|