public GAFBakedObjectImpl(
			  IGAFObjectSerializedProperties	_Data
			, GAFRenderProcessor				_Processor
			, GAFBakedObjectController			_Controller)
            : base(_Data, _Processor.renderer, _Processor.filter)
        {
            m_RenderProcessor	= _Processor;
            m_Controller		= _Controller;
        }
Beispiel #2
0
 public GAFBakedObjectImpl(
     IGAFObjectSerializedProperties _Data
     , GAFRenderProcessor _Processor
     , GAFBakedObjectController _Controller)
     : base(_Data, _Processor.renderer, _Processor.filter)
 {
     m_RenderProcessor = _Processor;
     m_Controller      = _Controller;
 }
Beispiel #3
0
        public void reload(GAFRenderProcessor _Processor)
        {
            cachedFilter.hideFlags		= HideFlags.NotEditable;
            cachedRenderer.hideFlags	= HideFlags.NotEditable;

            if (m_Impl != null)
                m_Impl.cleanUp();

            m_Impl = GAFObjectImplsFactory.getImpl(gameObject, m_Data, cachedRenderer, cachedFilter);
        }
        public GAFBakedMaskedObjectImpl(
			  Material							_MaskedMaterial
			, IGAFObjectSerializedProperties	_Data
			, GAFRenderProcessor				_Processor
			, GAFBakedObjectController			_Controller)
            : base(_Data, _Processor, _Controller)
        {
            m_MaskedMaterial = _MaskedMaterial;

            var clip = serializedProperties.clip;
            m_SharedMaterial = clip.getSharedMaterial(System.IO.Path.GetFileNameWithoutExtension(texturesData.getFileName(clip.settings.csf)));
        }
Beispiel #5
0
        public void reload(GAFRenderProcessor _Processor)
        {
            cachedFilter.hideFlags   = HideFlags.NotEditable;
            cachedRenderer.hideFlags = HideFlags.NotEditable;

            if (m_Impl != null)
            {
                m_Impl.cleanUp();
            }

            m_Impl = GAFObjectImplsFactory.getImpl(gameObject, m_Data, cachedRenderer, cachedFilter);
        }
        public GAFBakedMaskedObjectImpl(
			  IGAFObjectSerializedProperties	_Data
			, GAFRenderProcessor				_Processor
			, GAFBakedObjectController			_Controller)
            : base(_Data, _Processor, _Controller)
        {
            m_MaskedMaterial = new Material(Shader.Find("GAF/GAFMaskedObject"));
            m_MaskedMaterial.mainTexture = texture;
            m_MaskedMaterial.renderQueue = 3000;

            var clip = serializedProperties.clip;
            m_SharedMaterial = clip.getSharedMaterial(System.IO.Path.GetFileNameWithoutExtension(texturesData.getFileName(clip.settings.csf)));
        }
Beispiel #7
0
        public GAFBakedMaskedObjectImpl(
            Material _MaskedMaterial
            , IGAFObjectSerializedProperties _Data
            , GAFRenderProcessor _Processor
            , GAFBakedObjectController _Controller)
            : base(_Data, _Processor, _Controller)
        {
            m_MaskedMaterial = _MaskedMaterial;

            var clip = serializedProperties.clip;

            m_SharedMaterial = clip.getSharedMaterial(System.IO.Path.GetFileNameWithoutExtension(texturesData.getFileName(clip.settings.csf)));
        }
Beispiel #8
0
        public void reload(GAFRenderProcessor _Processor)
        {
            if (hasController())
            {
                m_Controller.registerObject(this);
            }

            if (m_Impl != null)
            {
                m_Impl.cleanUp();
            }

            m_Impl = GAFBakedObjectImplsFactory.getImpl(m_Data, _Processor, m_Controller);
        }
Beispiel #9
0
        public GAFBakedMaskedObjectImpl(
            IGAFObjectSerializedProperties _Data
            , GAFRenderProcessor _Processor
            , GAFBakedObjectController _Controller)
            : base(_Data, _Processor, _Controller)
        {
            m_MaskedMaterial             = new Material(Shader.Find("GAF/GAFMaskedObject"));
            m_MaskedMaterial.mainTexture = texture;
            m_MaskedMaterial.renderQueue = 3000;

            var clip = serializedProperties.clip;

            m_SharedMaterial = clip.getSharedMaterial(System.IO.Path.GetFileNameWithoutExtension(texturesData.getFileName(clip.settings.csf)));
        }
Beispiel #10
0
        public GAFBakedMaskObjectImpl(
            IGAFObjectSerializedProperties _Data
            , GAFRenderProcessor _Processor
            , GAFBakedObjectController _Controller)
            : base(_Data, _Processor, _Controller)
        {
            m_MaskMaterial             = new Material(Shader.Find("GAF/GAFMaskObject"));
            m_MaskMaterial.mainTexture = texture;
            m_MaskMaterial.renderQueue = 3000;

            m_StencilID = GAFStencilMaskManager.registerMask(serializedProperties.clip.GetInstanceID(), serializedProperties.objectID, this);
            m_MaskMaterial.SetFloat("_StencilID", m_StencilID);

            material = m_MaskMaterial;
        }
        public GAFBakedMaskObjectImpl(
			  IGAFObjectSerializedProperties	_Data
			, GAFRenderProcessor				_Processor
			, GAFBakedObjectController			_Controller)
            : base(_Data, _Processor, _Controller)
        {
            m_MaskMaterial = new Material(Shader.Find("GAF/GAFMaskObject"));
            m_MaskMaterial.mainTexture = texture;
            m_MaskMaterial.renderQueue = 3000;

            m_StencilID = GAFStencilMaskManager.registerMask(serializedProperties.clip.GetInstanceID(), serializedProperties.objectID, this);
            m_MaskMaterial.SetFloat("_StencilID", m_StencilID);

            material = m_MaskMaterial;
        }
Beispiel #12
0
        public static GAFBakedObjectImpl getImpl(GAFObjectData _Data, GAFRenderProcessor _Processor, GAFBakedObjectController _Controller)
        {
            GAFBakedObjectImpl impl = null;

            switch (_Data.type)
            {
            case ObjectType.Simple:         impl = new GAFBakedObjectImpl(_Data, _Processor, _Controller); break;

            case ObjectType.Masked:         impl = new GAFBakedMaskedObjectImpl(_Data, _Processor, _Controller); break;

            case ObjectType.Mask:           impl = new GAFBakedMaskObjectImpl(_Data, _Processor, _Controller); break;

            case ObjectType.Filtered:       impl = new GAFBakedObjectImpl(_Data, _Processor, _Controller); break;

            case ObjectType.Complex:        impl = new GAFBakedMaskedObjectImpl(_Data, _Processor, _Controller); break;
            }

            return(impl);
        }
        public void reload(GAFRenderProcessor _Processor)
        {
            if (hasController())
                m_Controller.registerObject(this);

            if (m_Impl != null)
                m_Impl.cleanUp();

            m_Impl = GAFBakedObjectImplsFactory.getImpl(m_Data, _Processor, m_Controller);
        }
 public void ChangeRenderOrder(int order, GameObject obj)
 {
     GAF.Objects.GAFRenderProcessor rend;
     rend = new GAF.Objects.GAFRenderProcessor ();
     obj.GetComponent<GAF.Core.GAFMovieClip>().settings.spriteLayerValue = order;
     rend.init(obj.GetComponent<GAF.Core.GAFMovieClip>(),
               obj.GetComponent<MeshFilter>(),
               obj.GetComponent<Renderer>());
 }