[]解析sk资源报错
GameDemo.max.js:21170 Uncaught RangeError: Offset is outside the bounds of the DataView
代码:
package com.ppt.components.role
{
import laya.ani.bone.Skeleton;
import laya.ani.bone.Templet;
import laya.events.Event;
public class CombatRole extends BaseRole
{
private var _templet:Templet;
public function CombatRole()
{
super();
initView();
}
private function initView():void
{
_templet = new Templet();
_templet.on(Event.COMPLETE,this,parseComplete);
_templet.on(Event.ERROR,this,onError);
_templet.loadAni("res/role/1/left/left.sk");
}
private function parseComplete():void
{
var skeleton0:Skeleton;
skeleton0 = _templet.buildArmature();
addChild(skeleton0);
skeleton0.play("walk_left",true);
}
private function onError():void
{
console.log("parse error");
}
}
}
代码:
package com.ppt.components.role
{
import laya.ani.bone.Skeleton;
import laya.ani.bone.Templet;
import laya.events.Event;
public class CombatRole extends BaseRole
{
private var _templet:Templet;
public function CombatRole()
{
super();
initView();
}
private function initView():void
{
_templet = new Templet();
_templet.on(Event.COMPLETE,this,parseComplete);
_templet.on(Event.ERROR,this,onError);
_templet.loadAni("res/role/1/left/left.sk");
}
private function parseComplete():void
{
var skeleton0:Skeleton;
skeleton0 = _templet.buildArmature();
addChild(skeleton0);
skeleton0.play("walk_left",true);
}
private function onError():void
{
console.log("parse error");
}
}
}
没有找到相关结果
已邀请:
要回复问题请先登录
4 个回复
OneWay
赞同来自: cuixueying
cuixueying
赞同来自:
kukucck
赞同来自:
cyl117
赞同来自: