createjs tween用法

setInterval(()=>{
Let Coin =new lib.Coin();
Coin.x=Math.floor(Math.random()*(600-30+1))+30);
Coin.y=-50;
exportRoot.addChildAt(Coin,1);
createjs.Tween.get(Coin)
    .to({y:400},2500)
    .call(()=>{
    exportRoot.removeChild(Coin);
    })
.addEventListener("change",()=>{
        let hit=ndgmr.checkRectCollision();
        if(hit){
            createjs.Tween.removeTween();
            exportRoot.removeChild(Coin);
            Score++;
            document.querySelector(".winNum").innerHTML=winNum;
        }
    })
},1000)

教程地址

posted @   多见多闻  阅读(25)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2023-08-21 C#窗体之间的拥有者
2023-08-21 奇门遁甲、五行八卦和周易的关系
点击右上角即可分享
微信分享提示