Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

张树文 / mvp_xhc

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • mvp_xhc
  • vampire_copy
  • assets
  • script
  • game
  • ui
  • ItemBaiFadeOut.ts
  • 张树文's avatar
    项目文件copy · 7caf4b12
    张树文 committed Jan 20, 2022
    7caf4b12
ItemBaiFadeOut.ts 347 Bytes
BlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

const { ccclass, property } = cc._decorator;

@ccclass
export default class ItemBaiFadeOut extends cc.Component {

    onLoad() { }

    onEnable() {
        cc.tween(this.node)
            .to(0.5, {opacity: 200})
            .to(0.5, {opacity: 0})
            .call(() => {
                this.node.active = false;
        }).start();
    }
}