https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    brave-kangaroo-30399

    05/27/2019, 4:42 PM
    Ok I see now
  • b

    brave-kangaroo-30399

    05/27/2019, 4:43 PM
    Sprite group xy will not work here at all
  • b

    brave-kangaroo-30399

    05/27/2019, 4:43 PM
    I already had to override the text/surface positioning to be local wrt the component
  • b

    brave-kangaroo-30399

    05/27/2019, 4:43 PM
    And fiddling with xy won’t do the same for items actually in the flixel “display list”
  • b

    brave-kangaroo-30399

    05/27/2019, 4:44 PM
    Gonna try it out in a few mins but I can see this never working as is
  • b

    brave-kangaroo-30399

    05/27/2019, 5:39 PM
    Ok the kha CompBase makes a lot of sense
  • b

    brave-kangaroo-30399

    05/27/2019, 5:39 PM
    Basically, if I already have access to the child component array, there’s little point in also having a FlxGroup since that’s a glorified array
  • b

    brave-kangaroo-30399

    05/27/2019, 5:40 PM
    You have the image and text parts handled manually, which is what I would have to do with Sprite or Group
  • b

    brave-kangaroo-30399

    05/27/2019, 5:41 PM
    Only issue is that FlxSprite isn’t an abstract sorta class, it basically is the image
  • b

    brave-kangaroo-30399

    05/27/2019, 5:42 PM
    Group and sprite group, as well as Kha’s impl, are kinda sorta not real
  • b

    brave-kangaroo-30399

    05/27/2019, 5:44 PM
    So I think I need to move a step back, and make a custom class extending FlxBasic or FlxObject
  • b

    brave-kangaroo-30399

    05/27/2019, 5:45 PM
    Object might be easier so I don’t have to reimplement every little thing
  • b

    bright-gpu-74537

    05/27/2019, 5:46 PM
    right... that sounds sensible.... i mean, i guess... 😃
  • b

    brave-kangaroo-30399

    05/27/2019, 5:46 PM
    I’m thinking out loud now 😃
  • b

    brave-kangaroo-30399

    05/27/2019, 5:46 PM
    Object is where flixel’s position and physics are defined
  • b

    brave-kangaroo-30399

    05/27/2019, 5:46 PM
    And Sprite extends that
  • b

    bright-gpu-74537

    05/27/2019, 5:46 PM
    sure, i mean, i cant help with flixel so much, but certainly happy to have ideas bounced off me 😄
  • b

    bright-gpu-74537

    05/27/2019, 5:47 PM
    right, so FlxObject might be the class... how would you draw to it?
  • b

    bright-gpu-74537

    05/27/2019, 5:47 PM
    or does that encpasulate drawing too?
  • b

    brave-kangaroo-30399

    05/27/2019, 5:47 PM
    So Basic is the core class, and it defines draw and update but doesn’t do anything with them
  • b

    brave-kangaroo-30399

    05/27/2019, 5:48 PM
    Sprite actually has some code in draw, for instance, and the Groups handle their children there
  • b

    brave-kangaroo-30399

    05/27/2019, 5:48 PM
    So this class would just override draw and then do basically the same as kha
  • b

    bright-gpu-74537

    05/27/2019, 5:49 PM
    ok, thats interesting
  • b

    brave-kangaroo-30399

    05/27/2019, 5:49 PM
    And they all get added to the main state the same so there’s no difference there
  • b

    bright-gpu-74537

    05/27/2019, 5:50 PM
    right, so group really is just a convience class that has many objects in it?
  • b

    brave-kangaroo-30399

    05/27/2019, 5:50 PM
    Yeah, it’s an array you can add to the stage in one go and have the kids auto managed
  • b

    brave-kangaroo-30399

    05/27/2019, 5:50 PM
    It’s a daycare 😛
  • b

    bright-gpu-74537

    05/27/2019, 5:50 PM
    right, gotcha
  • b

    bright-gpu-74537

    05/27/2019, 5:50 PM
    haha.. daycare
  • b

    bright-gpu-74537

    05/27/2019, 5:51 PM
    😄
1...414243...1687Latest