stevehalliwell / ulox

A bytecode interpreted scripting language for games in Unity.
MIT License
24 stars 0 forks source link

More flexible data syntax #200

Closed stevehalliwell closed 1 year ago

stevehalliwell commented 1 year ago
data WaterLinePoint
{
    x = 0,
    y = 0, 
    py = 0,
    anchorY = 0,
    pullY = 0,
}

is great but if we could also allow

data WaterLineData
{
    points = [],
    var pullFactor = 2;
    var firstNeighScale = 0.75;
    var secondNeighScale = 0.65;
    var thirdNeighScale = 0.35;
    var pDevScale = 0.5;
    var dragSharpness = 3;
}

Then the effort to move things from local scope vars to a data object is basically zero.

stevehalliwell commented 1 year ago

Yep, do it, we care about flexibility more than 1 way to do things