Draft
Conversation
Author
|
To load linezData.ParseFile("./Resource/linez/catmaster.lnz");
linezData.ParseFile("./Resource/linez/calico-petz3.lnz");Reason for that other file? The |
Author
|
To handle Ommited ballz if( linezData.IsBallOmmited( ballID )) This feature needs some extra work to add ... I tried different approach, but not adding Ball:Node2D to scene and marking it as ommited feels easier. |
Author
|
To add addbalz:
_Ready() {
...
for (var index = 0; index < linezData.AddBallz.Count; index++)
{
// get parent ball
var addBallInfo = linezData.AddBallz[index];
var parentBall = this.ballz[addBallInfo.ParentBallID];
int addBallId = (int)catBhd.NumBallz + index;
/*
if (linezData.IsBallOmmited(addBallId))
{
continue;
}
*/
Ball dummyBall = new Ball(
texture, palette, (int)addBallInfo.BallSize, addBallInfo.Color, (int)addBallInfo.Fuzz,
addBallInfo.Outline, addBallInfo.OutlineColor
);
// position is = parent ball position + addball offset
dummyBall.Position = parentBall.Position + new Vector2(addBallInfo.Offset.X, addBallInfo.Offset.Y);
dummyBall.ZIndex = (int)-addBallInfo.Offset.Z;
this.addBallz.Add(dummyBall);
AddChild(dummyBall);
}
_Render() {
foreach (var addBall in this.addBallz)
{
// get the parent ball
Lnz.AddBall addBallInfo = GetAddballInfo(addBall.id);
// and its orientation
var orien = frame.BallOrientation(addBallInfo.ParentBallID);
// add the offset
float xf = orien.Position.X + addBallInfo.Offset.X;
float yf = orien.Position.Y + addBallInfo.Offset.Y;
float zf = orien.Position.Z + addBallInfo.Offset.Z;
// ... rotate |
Author
|
Whiskerz seem to be just linez ... I didn't figured out how to do their width yet. foreach (var whisker in linezData.Whiskers)
{
// Either ball or add ball
Ball startBall = GetBallByID( whisker.StartBallID );
Ball endBall = GetBallByID( whisker.EndBallID );
// omitted?
if (startBall == null || endBall == null)
{
continue;
}
Line newLine = new Line(null, null, startBall,endBall,whisker.Color,1,-1,-1);
//add them to the lists
this.linez.Add(newLine);
AddChild(newLine);
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Sorry for 2 previously closed pr. This one contains just the LNZ parsing stuff, so the integration can be done more easily.