Skip to content

Conversation

@Arcnor
Copy link

@Arcnor Arcnor commented Oct 1, 2016

No description provided.


public static function parseXmlId(id: String): IdType {
return Std.parseInt(id);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseXmlId is a little weird to me because it's not parsing from Fast or Xml, but String. Simple parseId might be better.

* Get the ID of a scene by name.
*
* @return The ID current scene or 0 if it doesn't exist.
* @return The ID current scene or "" if it doesn't exist.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't true yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this should be INVALID_ID

scale = Std.parseInt(xml.att.scale);
defaultSceneID = 0;
defaultSceneID = IdUtils.INVALID_ID;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not equivalent, but this shouldn't be an issue because if the defaultSceneID can't be read, something is really wrong anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not, but 0 is also wrong, I guess?

If I create a game, add two scenes, then delete the first one 0 is not a valid scene either...

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