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

Project1

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

[已经解决] 怎样做一个点击图片触发事件的插件

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
42 小时
注册时间
2017-6-8
帖子
36
跳转到指定楼层
1
发表于 2017-7-17 14:46:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
我想用element.addeventlistener做,但是不知道图片的element名字在哪里找{:2_253:}

Lv1.梦旅人

梦石
0
星屑
50
在线时间
42 小时
注册时间
2017-6-8
帖子
36
2
 楼主| 发表于 2017-7-17 14:54:37 | 只看该作者
为什么内置脚本里面只有设定图片属性的内容,表示显示图片的代码在哪里
  1. Game_Picture.prototype.initTarget = function() {
  2.     this._targetX = this._x;
  3.     this._targetY = this._y;
  4.     this._targetScaleX = this._scaleX;
  5.     this._targetScaleY = this._scaleY;
  6.     this._targetOpacity = this._opacity;
  7.     this._duration = 0;
  8. };

  9. Game_Picture.prototype.initTone = function() {
  10.     this._tone = null;
  11.     this._toneTarget = null;
  12.     this._toneDuration = 0;
  13. };

  14. Game_Picture.prototype.initRotation = function() {
  15.     this._angle = 0;
  16.     this._rotationSpeed = 0;
  17. };

  18. Game_Picture.prototype.show = function(name, origin, x, y, scaleX,
  19.                                        scaleY, opacity, blendMode) {
  20.     this._name = name;
  21.     this._origin = origin;
  22.     this._x = x;
  23.     this._y = y;
  24.     this._scaleX = scaleX;
  25.     this._scaleY = scaleY;
  26.     this._opacity = opacity;
  27.     this._blendMode = blendMode;
  28.     this.initTarget();
  29.     this.initTone();
  30.     this.initRotation();
  31. };
复制代码
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
230
在线时间
174 小时
注册时间
2016-2-24
帖子
107
3
发表于 2017-7-18 00:43:41 | 只看该作者
YEP图片公共事件插件
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-7 11:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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