Exemplo n.º 1
0
        private void OnGameObjectLoaded(GameObjectLoadedMessage msg)
        {
            var cameraAware = msg.GameObject.GetComponentWithAwareness <ICameraAwareComponent>();

            if (cameraAware != null)
            {
                cameraAware.ActiveCamera = _camera;
            }

            var renderAware = msg.GameObject.GetComponentWithAwareness <IRenderAwareComponent>();

            if (renderAware != null)
            {
                AddComponent(renderAware);
            }
        }
Exemplo n.º 2
0
        private void OnGameObjectLoaded(GameObjectLoadedMessage msg)
        {
            var cameraAware = msg.GameObject.GetComponentWithAwareness<ICameraAwareComponent>();
            if (cameraAware != null)
            {
                cameraAware.ActiveCamera = _camera;
            }

            var renderAware = msg.GameObject.GetComponentWithAwareness<IRenderAwareComponent>();
            if (renderAware != null)
            {
                AddComponent(renderAware);
            }
        }