美文网首页
2021-06-10

2021-06-10

作者: 江左金天氏牧 | 来源:发表于2021-06-11 09:06 被阅读0次

今日收获
完成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');
                    }
                }

相关文章

网友评论

      本文标题:2021-06-10

      本文链接:https://www.haomeiwen.com/subject/leumeltx.html