Live2d Cubsim SDK

Spade-Atek2021/01/31SoftwareLive2D

live2d cubsim 的组成

/**
  ** 新建事件,是由设置传输的来决定*
  ** 教学动作*
  */

 public onTeaching() : void{
   if (teaching_state){
   console.log("当前处于教学动作");
    for (let i = 0; i < this._models.getSize(); i++) {
//动作 mp3 表情
//this._models.at(i).startMotion(LAppDefine.MotionGroupTeaching,2,2,this._finishedMotion);
this._models.at(i).startMotion(LAppDefine**.**MotionGroupTeaching,4,2,this._finishedMotion);
this._models.*at(i).startSound(LAppDefine.MotionGroupTeaching,1);
this._models.at(i).setExpressionBySize(6);
//对动作的调用方法增加一个判断当前是否有动作才能继续执行*
   }
  }else{
   console.log("当前不是教学动作");
  }
 }