Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateUntil 会导致call执行2次 #17876

Open
shker-tt opened this issue Nov 18, 2024 · 0 comments
Open

updateUntil 会导致call执行2次 #17876

shker-tt opened this issue Nov 18, 2024 · 0 comments
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@shker-tt
Copy link

Cocos Creator version

3.8.4

System information

editor

Issue description

Relevant error log output

No response

Steps to reproduce

import { _decorator, Component, log, tween } from 'cc';
const { ccclass } = _decorator;

@ccclass('Test.UpdateUntil')
export class Test_UpdateUntil extends Component {
    private testNumber = 0
    start() {
        this.startTestTween()
    }

    private startTestTween() {
        log("startTestTween")

        let ended  = false

        tween(this)
            .delay(1)
            .call(()=>{

                tween(this)
                    .delay(1)
                    .call(()=>{
                        ended = true
                    })
                    .start()

                this.testNumber++
                if(this.testNumber > 1) {
                    debugger
                }
            })
            //.delay(1)
            .updateUntil(()=>{
                return ended
            })
            .call(()=>{
                this.testNumber = 0

                this.scheduleOnce(()=>{
                    this.startTestTween()
                }, 0.3)
            })
            .start()
    }
}

Minimal reproduction project

No response

@shker-tt shker-tt added Bug Needs Triage Needs to be assigned by the team labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

1 participant