设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2756|回复: 2
打印 上一主题 下一主题

[已经解决] 怎样在游戏左下角添加坐标?

[复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2010-8-12
帖子
27
跳转到指定楼层
1
发表于 2010-9-13 11:26:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

Lv2.观梦者

神隐的主犯

梦石
0
星屑
273
在线时间
271 小时
注册时间
2008-2-22
帖子
7691

贵宾

2
发表于 2010-9-13 11:36:43 | 只看该作者
本帖最后由 铃仙·优昙华院·因幡 于 2010-9-13 12:24 编辑
  1. class Scene_Map < Scene_Base
  2.   alias reisen_old_initialize initialize
  3.   def initialize
  4.     reisen_old_initialize
  5.     @reisen_map = Sprite.new
  6.     @reisen_map.x = 5
  7.     @reisen_map.y = 5
  8.     @reisen_map.z = 999
  9.     @reisen_map.opacity = 255
  10.     @reisen_map.visible = true
  11.     @reisen_map.bitmap = Bitmap.new(100, 140)
  12.   end
  13.   alias reisen_old_update update
  14.   def update
  15.     if @old_x != $game_player.x or @old_y != $game_player.y
  16.       @old_x, @old_y = $game_player.x, $game_player.y
  17.       @reisen_map.bitmap.clear
  18.       @reisen_map.bitmap.draw_text(0, 0, 100, 32, "X(#{@old_x}) Y(#{@old_y})")
  19.     end
  20.     reisen_old_update
  21.   end
  22.   alias reisen_old_terminate terminate
  23.   def terminate
  24.     reisen_old_terminate
  25.     @reisen_map.dispose
  26.   end
  27. end
复制代码
坐标自己调整

点评

大侠,忘了怎么把坐标调到左下角了。。。请指教。。。  发表于 2010-9-13 12:44
我想要的是没背景,没边框,文字是横着的,格式为 X ( ), Y ( )  发表于 2010-9-13 12:05

评分

参与人数 1星屑 +100 收起 理由
八云紫 + 100 认可答案

查看全部评分


《天空之城 —— 破碎的命运》
回复 支持 反对

使用道具 举报

Lv2.观梦者

神隐的主犯

梦石
0
星屑
273
在线时间
271 小时
注册时间
2008-2-22
帖子
7691

贵宾

3
发表于 2010-9-13 12:53:40 | 只看该作者
@reisen_map.x = 5

@reisen_map.y = 5

回帖啊回帖~~~

《天空之城 —— 破碎的命运》
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-21 21:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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