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

animate 的 callback 的 scope 不是角色自己 #59

Open
kevin-shu opened this issue Jun 2, 2017 · 0 comments
Open

animate 的 callback 的 scope 不是角色自己 #59

kevin-shu opened this issue Jun 2, 2017 · 0 comments
Assignees

Comments

@kevin-shu
Copy link
Contributor

kevin-shu commented Jun 2, 2017

sheep.walk = function(){
        this.animate([0,1,2,3], 5, this.walk);
};
sheep.walk();

上述程式碼會噴錯:

Uncaught TypeError: this.animate is not a function

可參考: http://edge.koding.school/projects/vngsk9/edit

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

2 participants