m969 / EGamePlay

一个基于Entity-Component模式的灵活、通用、可扩展的轻量战斗(技能)框架,配置可选使用ScriptableObject或是Excel表格. A flexible, generic, easy to extend, lightweight combat (skills) framework based on Entity-Component pattern. Configuration can choose to use ScriptableObject or Excel tables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

个人感觉框架中Entity与Component的区别与定义有点模糊了

Siuver opened this issue · comments

AttributeComponent作为一个逻辑分块,属于Component类型,然而其中管理的FloatNumeric却是Entity类型并且是挂载在父Entity下的,只在字典中对其保留引用,并没有真正直观合理的树形结构,究其原因就是因为在设计上Component是不支持挂载子节点的。

实际上我能否只抽象出一个支持目前树形结构的BaseEntity类,不做Entity与Compoennt的分化,使得任何已有的Component类也能够挂载子节点,是否会更加合理呢?

希望大佬不吝赐教。