LuaQuick框架(客户端)

996传奇引擎三端lua快速开发


特效(Animate)

<p>[TOC]</p> <h3>创建特效</h3> <pre><code>co.Animate:create(parent,p)</code></pre> <h3>特效播放</h3> <pre><code>co.Animate:playAnimate(widget,p)</code></pre> <pre><code>                local tx = co.Animate:playAnimate(cls.ccui.xmlPanel,{                     id = 12569,                     speed = 2,                     x = 603,                     y = 266,                 })</code></pre> <pre><code>widget 特效对象</code></pre> <h3>特效停止</h3> <pre><code>co.Animate:stop(widget, index, act, dir)</code></pre> <pre><code>widget 特效对象 index  第几帧 act    动作 [0.待机; 1.走; 2.攻击; 3.施法; 4.死亡; 5.跑步] dir    方向</code></pre> <pre><code>                co.Animate:addEventListener(tx,function()                     co.Animate:setVisible(tx,false)                     co.Animate:setAutoRemove(tx)                     player:push_lua_table(cls.name, {                         action = &amp;quot;confirm1&amp;quot;,                         data = {                             id = o.id                         }                     })                     co.Animate:setAutoRemove(tx)                 end)</code></pre> <h3>特效播放完成事件</h3> <pre><code>co.Animate:addEventListener(widget, callback)</code></pre> <pre><code>widget   特效对象 callback 回调函数</code></pre> <h3>设置特效播放完自动移除 [3.40.3版本]</h3> <pre><code>co.Animate:setAutoRemove(widget)</code></pre> <h3>创建人物模型</h3> <pre><code>co.Animate:createModel(parent, id, x, y, sex, feature, scale, useStaticScale, job, ext_param)</code></pre> <pre><code>parent         父节点对象 id             唯一ID x              位置 横坐标 y              位置 纵坐标 sex            0 男性 1 女性 feature        模型属性 scale          缩放比例(0-1) useStaticScale 是否使用game_data配置staticSacle数据, 默认忽略 job            职业id 012 战法道等新增职业 [3.40.5版本新增字段] ext_param      额外参数列表[3.40.8版本新增字段] 模型属性 feature = {} feature.clothID                  -- 衣服 feature.weaponID                 -- 武器id feature.headID                   -- 头盔id feature.headEffectID             -- 头盔特效id feature.weaponEffectID           -- 武器特效id feature.clothEffectID            -- 衣服特效id feature.capID                    -- 斗笠id feature.shieldID                 -- 盾牌id feature.shieldEffectID           -- 盾牌特效id feature.tDressID                 -- 时装id feature.tDressEffectID           -- 时装特效id feature.tWeaponID feature.tWeaponEffectID feature.capEffectID              -- 斗笠特效id feature.veilID                   -- 面巾id feature.veilEffectID             -- 面巾特效id feature.notShowMold              -- 是否为裸模 feature.notShowHair              -- 是否显示头发</code></pre> <h3>通过装备位播放特效</h3> <pre><code>co.Animate:playAnimateByPos(parent,pos)</code></pre> <h3>创建静态角色裸模</h3> <pre><code>co.Animate:createRoleModel(parent,x,y,gender,job,scale,notShowHair)</code></pre> <pre><code>parent 父节点 gender 性别 scale  缩放比例 notShowHair  true则不显示头发</code></pre> <h3>给静态角色裸模设置武器</h3> <pre><code>co.Animate:setWeaponModel(model,itemId)</code></pre> <pre><code>model  裸体模型控件 itemId 武器ID</code></pre> <h3>给静态角色裸模设置衣服</h3> <pre><code>co.Animate:setClothModel(model,itemId)</code></pre> <pre><code>model  裸体模型控件 itemId 衣服ID</code></pre> <h3>给静态角色裸模设置头盔</h3> <pre><code>co.Animate:setHeadModel(model,itemId)</code></pre> <pre><code>model  裸体模型控件 itemId 头盔ID</code></pre> <h3>给静态角色裸模设置称号</h3> <pre><code>co.Animate:setTitleModel(model,animId,x,y)</code></pre> <pre><code>model  裸体模型控件 animId 称号特效ID x      x偏移位置 y      y偏移位置</code></pre> <h3>设置武器在裸模上的位置</h3> <pre><code>co.Animate:setWeaponPosition(parent,x,y)</code></pre> <pre><code>parent 裸模控件</code></pre> <h3>设置衣服在裸模上的位置</h3> <pre><code>co.Animate:setClotPosition(parent,x,y)</code></pre> <pre><code>parent 裸模控件</code></pre> <h3>设置头盔在裸模上的位置</h3> <pre><code>co.Animate:setHeadPosition(parent,x,y)</code></pre> <pre><code>parent 裸模控件</code></pre> <h3>设置称号在裸模上的位置</h3> <pre><code>co.Animate:setTitlePosition(parent,x,y)</code></pre> <pre><code>model 裸模控件</code></pre> <h3>删除角色裸模</h3> <pre><code>co.Animate:removeRoleModel(parent)</code></pre> <pre><code>parent 裸模的父节点</code></pre>

页面列表

ITEM_HTML