The composite pattern/entity system and traditional OOP

前端 未结 4 842
無奈伤痛
無奈伤痛 2021-02-01 06:42

I\'m working on a small game written in Java (but the question is language-agnostic). Since I wanted to explore various design patterns, I got hung up on the Composite pattern/E

4条回答
  •  死守一世寂寞
    2021-02-01 07:28

    Ents seems to be designed to do exactly what you want. If you still want your own library, you could at least learn from its design.

    The previous answers all seem clunky and create tons of unnecessary objects, IMO.

提交回复
热议问题