예제 #1
0
        public override void Load()
        {
            base.Load();

            parentShader         = GetParent <ComposedShader>();
            parentProtoInterface = GetParent <ProtoInterface>();

            if (parentShader != null)
            {
                parentShader.Fields.Add(this);
            }
        }
예제 #2
0
        public override void Load()
        {
            base.Load();

            BaseDefinition   = this.Parent;
            PrototypeBody    = BaseDefinition != null ? (ProtoBody)BaseDefinition.Parent : null;
            ProtoDeclaration = PrototypeBody != null ? (ProtoDeclare)PrototypeBody.Parent : null;
            ProtoInterface   = ProtoDeclaration != null?ProtoDeclaration.ItemsByType <ProtoInterface>().FirstOrDefault() : null;

            if (ProtoInterface != null)
            {
                Console.WriteLine("Initilizing prototype IS.");

                Fields = ProtoInterface.ItemsByType <field>();

                Connections = this.ItemsByType <connect>();

                ProtoDeclaration.Initilize(BaseDefinition, Fields, Connections);
            }
            else
            {
                Console.WriteLine("ProtoInterface could not be found within IS {0}", this.ErrorStringWithLineNumbers());
            }
        }