强大的地图传送式插件~~

我以自带demo进行分析,本篇地图Init setting map

1.----------------------------------

实例 创建地图

Galv.MAPT.createMap(0,"map3",

[["bg1",0.4,0.6,255],["bg2",-0.5,-0.3,160]],

[["fg1",0.2,-0.2,60]]

);

语法

Galv.MAPT.createMap(id,"mapImage",[[bg],[bg]],[[fg],[fg]]);

INFO:
id = a unique number to identify the map you created   创建的地图编号
"mapImage" = the name of the map graphic to use from /img/maptravel/    背景图名称(注意路径)
this image will determine the size of your map in the scene    此图片会影响你的地图尺寸
[bg] = an array to set up a background graphic behind the map image     一个数组,用于在地图图像后面设置背景图形
You can have as many bg arrays as desired each should have:   可以设置多个
["bgimage",xmove,ymove,opacity]
[fg] = works the same as bg arrays but instead for foreground images   原理与bg相同,但用于代替前景图
["fgimage",xmove,ymove,opacity]

注意,这里是两个大数组,内包含小数组

+++++++++++++++++++++++++++++++++华丽分割线+++++++++++++++++++++++++++++++++++++++++++++++++++

2.-----------------------------------

实例

Galv.MAPT.setLocation(0,"Gov's Mansion","loc_mansion",490,160,1,8,11,"This is the Governor's Mansion|It's just a test map with no actual mansion here");

Galv.MAPT.setLocation(0,"Your Mansion","loc_mansion",620,440,3,8,11,"This is your 'mansion' but you lost the key!|You can't get in!");

Galv.MAPT.setLocation(0,"Campsite","loc_tent",1240,300,4,8,11,"I think it's a tent. It looks like a tent|Yeah it's a tent.",1);

语法
Galv.MAPT.setLocation(id,"name","image",mx,my,tmid,tx,ty,"desc",f);

INFO:
id = the unique number identifying the map you created above   上级地图,上级地图!的ID,或者说包含地图
"name" = the name of the location (also used to reference it)
"image" = the name of the location graphic to use from /img/maptravel/     显示在大地图上的图标
this graphic requires 3 rows in the spritesheet for:
top = normal, middle = active, bottom = disabled
mx = the x postion on your map graphic for the location
my = the y postion on your map graphic for the location
tmid = transfer map id - the in-game map id to transfer to      跳转目标地图的ID
tx = the in-game map x co-ordinate to transfer to                   跳转后的的位置
ty = the in-game map y co-ordinate to transfer to
"desc" = a short description displayed when location is selected.   下方描述
Use the | symbol to specify a new line.
f = frames of animation in your location image. Don't include
this attribute to use the plugin setting default frames    动画针

Note that you can use this setLocation to overwrite a previously set one
using the same name if you want to change it to something else.

In addition to locations, you can add 'objects' that work in a similar
way but only have one row of graphics in the spritesheet and will not
appear in the location list.

+++++++++++++++++++++++++++++++++华丽分割线+++++++++++++++++++++++++++++++++++++++++++++++++++

3-----------------------------------

实例

Galv.MAPT.enableLocation(0,"Your Mansion",false);

语法

Galv.MAPT.enableLocation(id,"name",s); // s can be true or false to
// set the location "name" in the
// map id to enabled or disabled

最新文章

  1. Bootstrap学习笔记(一)
  2. powershell字符界面的,powershell加WPF界面的,2048游戏
  3. silk与opencore-amr音频编码对比
  4. mongodb学习04 操作详解(2)
  5. CAShapeLayer 与贝塞尔曲线
  6. socket模块
  7. Jquery each和map 的区别
  8. HTML特殊转义字符对照表
  9. zoj2432 hdoj1423 最长公共上升子序列(LCIS)
  10. php 返回json 解析 报Wide character in print
  11. spring mvc DispatcherServlet详解之二---request通过Controller获取ModelAndView过程
  12. python学习:匿名函数
  13. AngularJS1.X学习笔记9-自定义指令(中)
  14. 一个数组保存了N个结构,每个结构保存了一个坐标,结构间的坐标都不相同,请问如何找到指定坐标的结构(除了遍历整个数组,是否有更好的办法)?
  15. C++为什么要设计友元函数和友元类
  16. Java 学习资料整理
  17. Vue+Element的动态表单,动态表格(后端发送配置,前端动态生成)
  18. June. 24th 2018, Week 26th. Sunday
  19. [20170607]再论Private Strand Flush Not Complete.txt
  20. INS-20802 Oracle Cluster Verification Utility failed解释说明

热门文章

  1. c++ 格式字符串说明
  2. LinkedBlockingQueue源码分析
  3. 搭建Pypi转发服务
  4. 用SUMIF对超15位的代码进行条件求和,出错了,原因是....
  5. Delphi过程函数传递参数的几种方式
  6. ubuntu14.04 terminator字体挤在一起问题
  7. Eclipse的设置、调优、使用(解决启动卡顿等问题)----转
  8. mac 初次配置apache,及mac下安装mysql
  9. 【C++ mid-term exerises】
  10. 教师信息管理系统(方式一:数据库为oracle数据库;方式二:存储在文件中)