⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brush test.lua

📁 J2ME手机游戏开发中地图生成软件 可以将地图以数组形式输出
💻 LUA
字号:
-- Brush Test.lua

function main ()
 local w = mappy.getValue(mappy.MAPWIDTH)

 if (w == 0) then
  mappy.msgBox ("Brush Test", "You need to load or create a map first", mappy.MMB_OK, mappy.MMB_ICONINFO)
 else
 
  bnum = mappy.getValue (mappy.NUMBRUSHES)
  mappy.msgBox ("Brush Test", "This will create a new brush and rename it.\nMap name: "..mappy.getValue(mappy.MAPFILENAME).."\n\nNumber of brushes = "..bnum, mappy.MMB_OK, mappy.MMB_ICONINFO)
  
-- This will create a brush and copy the area described
  mappy.createBrush (bnum, 0, 0, 16, 16)
  mappy.renameBrush (bnum, "Brush Test");
  mappy.msgBox ("Brush Test", "New brush created, "..mappy.getBrushValue (bnum, mappy.BRUSHNAME), mappy.MMB_OK, mappy.MMB_ICONINFO)

  mappy.updateScreen ()
 
 end
end

test, errormsg = pcall( main )
if not test then
    mappy.msgBox("Error ...", errormsg, mappy.MMB_OK, mappy.MMB_ICONEXCLAMATION)
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -