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

Project1

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

[有事请教] 使用代码创建事件时,为什么不显示图片?(已解决)

[复制链接]

Lv3.寻梦者

梦石
0
星屑
4740
在线时间
667 小时
注册时间
2021-3-24
帖子
523
1
发表于 2023-11-19 18:50:07 | 显示全部楼层
把事件在地图显示出来是分两步的
你只做了 Game_Map.prototype.setupEvents这里干的
而行走图是在这步装到地图上的
  1. Spriteset_Map.prototype.createCharacters = function() {
  2.     this._characterSprites = [];
  3.     for (const event of $gameMap.events()) {
  4.         this._characterSprites.push(new Sprite_Character(event));
  5.     }
  6.     for (const vehicle of $gameMap.vehicles()) {
  7.         this._characterSprites.push(new Sprite_Character(vehicle));
  8.     }
  9.     for (const follower of $gamePlayer.followers().reverseData()) {
  10.         this._characterSprites.push(new Sprite_Character(follower));
  11.     }
  12.     this._characterSprites.push(new Sprite_Character($gamePlayer));
  13.     for (const sprite of this._characterSprites) {
  14.         this._tilemap.addChild(sprite);
  15.     }
  16. };  
复制代码
全家活光光~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-17 01:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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