How could I reduce my use of switch statements when rendering components based on their type

后端 未结 0 785
暗喜
暗喜 2021-01-02 16:29

I have a array with objects that extend type Component. But the types are still different. So I have for example a SpriteComponent and a ButtonComponent. And the data I rece

相关标签:
回答
  • 消灭零回复
提交回复
热议问题