以下引用hitlerson于2009-4-11 18:06:55的发言:
def inside(x0,y0,x1,y1)
mouse_x,mouse_y = Mouse.get_mouse_pos
if mouse_x > x0 and mouse_x < x0+x1 and mouse_y > y0 and mouse_y < y0+y1
return true
end
return false
end
以下引用hitlerson于2009-4-15 9:39:22的发言:
哦,看了范例才知道是这样个东西啊。。。
if Input.trigger?(Input::C)
# 不是在事件执行中或菜单禁止中
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
# 设置菜单调用标志以及 SE 演奏
if @x == -1 and @y == -1
@x,@y = Mouse.get_mouse_pos
@sprite_k.x,@sprite_k.y = @x,@y
else
@sprite_k.bitmap.clear
@x,@y = -1,-1
end
end
end
if @x != -1 and @y != -1
x,y = Mouse.get_mouse_pos
@sprite_k.bitmap.clear
@sprite_k.bitmap.fill_rect(0,0,(x-@x).abs,(y-@y).abs,Color.new(0,0,0,255))
@sprite_k.x = x < @x ? @x-(x-@x).abs : @x
@sprite_k.y = y < @y ? @y-(y-@y).abs : @y
end
没加滚屏
以下引用hitlerson于2009-4-19 12:00:48的发言:
你测试下就知道是什么效果了嘛。
话说您要实现能选中选择范围内的事件,估计还要经过一番努力。
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |