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

快速制作第一个2D游戏 #3073

Open
liuweipeng-ken opened this issue Nov 21, 2024 · 0 comments
Open

快速制作第一个2D游戏 #3073

liuweipeng-ken opened this issue Nov 21, 2024 · 0 comments

Comments

@liuweipeng-ken
Copy link

在快速制作第一个2D游戏的示例中,在PlayerController.ts中,关于reset()函数的代码里:

reset(){
    this._curMoveIndex=0; //重置当前步数
    //this.node.setPosition(this._curPos);  //获取当前节点的位置,并将信息存储在_curPos变量中。这个代买会导致初始位置不在最开始
    this._targetPos.set(0,0,0);
}

this.node.setPosition(this._curPos) 这个代买会导致初始位置不在最开始

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant