Exemplo n.º 1
0
        public void flush()
        {
            System.Console.WriteLine("FLSH!!!!!!!!!");

            string tag = this.obj.dicTag ["tag"];

            System.Globalization.TextInfo tf = new System.Globalization.CultureInfo("en-US", false).TextInfo;

            string className = "Novel." + tf.ToTitleCase(tag) + "Component";

            //Novel.Bg_removeComponent

            //リフレクションで動的型付け 
            Debug.Log(className);
            Type masterType = Type.GetType(className);

            AbstractComponent cmp;

            cmp = (AbstractComponent)Activator.CreateInstance(masterType);

            this.obj.dicParamDefault = cmp.originalParam;

            Dictionary <string, string> tmpDic = new Dictionary <string, string> ();
            List <string> l = cmp.arrayVitalParam;

            for (var i = 0; i < l.Count; i++)
            {
                string vital = l [i];
                tmpDic [vital] = "yes";
            }

            this.obj.dicParamVital = tmpDic;
            //必須パラメータとかデフォルト値を取得

            this.arrDoc.Add(this.obj);
            this.obj    = new DocObject();
            this.status = "";
        }
Exemplo n.º 2
0
Arquivo: Doc.cs Projeto: 2ty/race3d
		public void flush(){
			System.Console.WriteLine ("FLSH!!!!!!!!!");
			
			string tag = this.obj.dicTag ["tag"];

			System.Globalization.TextInfo tf = new System.Globalization.CultureInfo ("en-US", false).TextInfo;

			string className = "Novel." + tf.ToTitleCase (tag) + "Component";

			//Novel.Bg_removeComponent

			//リフレクションで動的型付け 
			Debug.Log (className);
			Type masterType = Type.GetType (className);

			AbstractComponent cmp;
			cmp = (AbstractComponent)Activator.CreateInstance (masterType);

			this.obj.dicParamDefault = cmp.originalParam;

			Dictionary<string,string> tmpDic = new Dictionary<string,string> ();
			List<string> l = cmp.arrayVitalParam;
			for (var i = 0; i < l.Count; i++) {
				string vital = l [i];
				tmpDic [vital] = "yes";
			}

			this.obj.dicParamVital	= tmpDic; 
			//必須パラメータとかデフォルト値を取得

			this.arrDoc.Add (this.obj);
			this.obj = new DocObject ();
			this.status = "";
		}