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

firstgid小于lastgid导致contains判断不成立 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adoontheway
Copy link

this._image.width < (this._tilewidth + this._spacing)且this._image.height < (this._tileheight + this._margin)的时候this._lastgid < this._firstgid,会导致contains里面的判断问题

…ght < (this._tileheight + this._margin)的时候this._lastgid < this._firstgid,会导致contains里面的判断问题
@adoontheway
Copy link
Author

标题写错了,应该是firstgid大于lastgid的时候,

p.contains = function (gid) {
            return gid >= this._firstgid && gid <= this._lastgid;
        };

导致上面的判断前项true,后项false。

这个是今天遇到的问题,tmx文件还保留着在,论坛提不了,说有非法输入的什么鬼

@zkactivity
Copy link

确实是有这个问题

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

Successfully merging this pull request may close these issues.

2 participants