今日收获
完成websocket集群双向推送调试
synchronized(this.session){
stringRedisTemplate.convertAndSend(this.userSocketInfo.getRoomId(), message);
}
public void onMessage(Message message, byte[] pattern) {
String msg = new String(message.getBody());
log.debug(new String(pattern) + "主题发布:" + msg);
if (null != session && session.isOpen()) {
try {
session.getBasicRemote().sendText(msg);
} catch (IOException e) {
e.printStackTrace();
}
}
}
完成动画测试
tween(this.node)
.to(1, { position: new Vec3(20,0,0) }, { easing: 'circInOut' })
//.target(hitNode)
//.union()
.repeat(1) // 执行 2 次
.call(() => {
if (this.cocosAnim){
this.cocosAnim.play('cocos_anim_idle');
}
})
.start();
if (this.cocosAnim){
this.cocosAnim.getState('cocos_anim_attack').wrapMode=AnimationClip.WrapMode.Normal;
this.cocosAnim.getState('cocos_anim_attack').speed = 3;
this.cocosAnim.play('cocos_anim_attack');
}
}
网友评论