I have question on some point, as we decided to fully decouple the viewlayer, we need hide the
direct refrence of Unity engine code. But as we can see, the engine use it's own data struct such like "Vector3D", "Color", in this article, we still use these define directly in component, and all the related interfaces use them too. It seems break the rules we setup before. My question is that the way to handle it?
Here's the code:
[Game, Event(EventTarget.Self)] // generates events that are bound to the entities that raise them
public sealed class PositionComponent : IComponent {
public Vector2D value;
}
Hi,
I have question on some point, as we decided to fully decouple the viewlayer, we need hide the direct refrence of Unity engine code. But as we can see, the engine use it's own data struct such like "Vector3D", "Color", in this article, we still use these define directly in component, and all the related interfaces use them too. It seems break the rules we setup before. My question is that the way to handle it?
Here's the code:
[Game, Event(EventTarget.Self)] // generates events that are bound to the entities that raise them public sealed class PositionComponent : IComponent { public Vector2D value; }
Cheers