Beispiel #1
0
        /// <summary>
        /// 创建xml
        /// </summary>
        /// <param name="type"></param>
        /// <param name="details"></param>
        private void creatXML(Type type, shootItem details)
        {
            path = Single <ToolHelp> .GetInstance.xmlPath(
                type.GetField("fileName").GetValue(null).ToString());

            secondNodStr = type.GetField("fileName").GetValue(null).ToString().ToLower();
            id           = Single <ToolHelp> .GetInstance.dictionaryId(secondNodStr);

            if (secondNodStr == "answer" || secondNodStr == "dealwith_c")
            {
                id += int.Parse(Single <ToolHelp> .GetInstance.SceneNum) * 100000;
            }

            Single <XMLData> .GetInstance.CreatXML(path); //创建一个空的XML,有名字的

            obj           = Activator.CreateInstance(type);
            propertyInfos = type.GetProperties();
            paramer[0]    = details;

            for (int i = 0; i < propertyInfos.Count(); i++)
            {
                methodReturn = (string)type.InvokeMember(propertyInfos[i].Name + "1",
                                                         BindingFlags.Default | BindingFlags.InvokeMethod, null, obj, paramer); //调用方法
                Single <XMLData> .GetInstance.addXML(path, secondNodStr, id, propertyInfos[i].Name, methodReturn);              //创建XML表
            }
        }
        public string pageIds1(shootItem t)
        {
            string[] pageIdContent = new string[Single <ToolHelp> .GetInstance.IdDictionary["当前应对界面页面数"]];
            int      pageId        = Single <ToolHelp> .GetInstance.IdDictionary["dealwith_c"];

            for (int i = Single <ToolHelp> .GetInstance.IdDictionary["当前应对界面页面数"] - 1; i >= 0; i--)
            {
                pageIdContent[i] = string.Format("{0}{1:d5}",
                                                 Single <ToolHelp> .GetInstance.SceneNum, pageId);
                pageId--;
                if (pageId < 0)
                {
                    break;
                }
            }
            string pageIDStr = null;

            for (int i = 0; i < pageIdContent.Length; i++)
            {
                if (i == 0)
                {
                    pageIDStr = pageIdContent[i];
                }
                else
                {
                    pageIDStr += "," + pageIdContent[i];
                }
            }
            return(pageIDStr);
        }
Beispiel #3
0
        public string yes1(shootItem t)
        {
            int id = Single <ToolHelp> .GetInstance.IdDictionary["answer"];

            id--;
            return(String.Format("{0}{1:d5}",
                                 Single <ToolHelp> .GetInstance.SceneNum, id));
        }
Beispiel #4
0
 public string ImgPaths1(shootItem t)
 {
     //return string.Format("Scene/{0}/{1}/IMG/DealWith/1",
     //    Single<ToolHelp>.GetInstance.GetSceneName().Split('_')[0],
     //    Single<ToolHelp>.GetInstance.GetSceneName());
     return(string.Format("Scene/{0}/{1}/IMG/DealWith/1",
                          Single <ToolHelp> .GetInstance.SceneClassName,
                          Single <ToolHelp> .GetInstance.GetSceneName()));
 }
Beispiel #5
0
 public string wendatishiMusic1(shootItem t)
 {
     //return string.Format("Scene/{0}/{1}/Music/answer/scenario_{2}/{3}",
     //    Single<ToolHelp>.GetInstance.GetSceneName().Split('_')[0],
     //    Single<ToolHelp>.GetInstance.GetSceneName(),
     //    t[Single<ToolHelp>.GetInstance.IdDictionary["情景号"]].ToString().Split('景')[1],
     //    t[Single<ToolHelp>.GetInstance.IdDictionary["镜头号"]]);
     return(string.Format("Scene/{0}/{1}/Music/answer/{2}/{3}",
                          Single <ToolHelp> .GetInstance.SceneClassName,
                          Single <ToolHelp> .GetInstance.GetSceneName(), t.scenesId, t.shootid));
 }
Beispiel #6
0
 public string xuanzetiXuanxiangPath1(shootItem t)
 {
     //return string.Format("Scene/{0}/{1}/Music/dialogue/scenario_{2}/XZ_{3}",
     //    Single<ToolHelp>.GetInstance.GetSceneName().Split('_')[0],
     //    Single<ToolHelp>.GetInstance.GetSceneName(),
     //    t[Single<ToolHelp>.GetInstance.IdDictionary["情景号"]].ToString().Split('景')[1],
     //    t[Single<ToolHelp>.GetInstance.IdDictionary["镜头号"]]);
     return(string.Format("Scene/{0}/{1}/Music/dialogue/{2}/xz_{3}",
                          Single <ToolHelp> .GetInstance.SceneClassName,
                          Single <ToolHelp> .GetInstance.GetSceneName(), t.scenesId, t.shootid));
 }
Beispiel #7
0
 public string YesOrNoID1(shootItem t)
 {
     if (boolCorrect())
     {
         return("100011");
     }
     else
     {
         return("100012");
     }
 }
Beispiel #8
0
 public string image1(shootItem t)
 {
     if (boolCorrect())
     {
         return("yes");
     }
     else
     {
         return("no");
     }
 }
Beispiel #9
0
 public string typePath1(shootItem t)
 {
     if (boolCorrect())
     {
         return("Music/Teach/回答正确");
     }
     else
     {
         return("Music/Teach/回答错误");
     }
 }
Beispiel #10
0
 public string type1(shootItem t)
 {
     if (boolCorrect())
     {
         return("[00ff00]回答正确,你真棒![-]");
     }
     else
     {
         return("[ff0000]很遗憾,回答错误![-]");
     }
 }
Beispiel #11
0
        public string contentPaths1(shootItem t)
        {
            //return string.Format("Scene/{0}/{1}/Music/answer/scenario_{2}/{3}",
            //    Single<ToolHelp>.GetInstance.GetSceneName().Split('_').First(),
            //    Single<ToolHelp>.GetInstance.GetSceneName(),
            //    t[Single<ToolHelp>.GetInstance.IdDictionary["情景号"]].ToString().Split('景').LastOrDefault(),
            //    t[Single<ToolHelp>.GetInstance.IdDictionary["镜头号"]]);

            return(string.Format("Scene/{0}/{1}/Music/answer/{2}/{3}",
                                 Single <ToolHelp> .GetInstance.SceneClassName,
                                 Single <ToolHelp> .GetInstance.GetSceneName(), t.scenesId, t.shootid));
        }
Beispiel #12
0
 public string image1(shootItem t)
 {
     if (Single <NPCName> .GetInstance.NpcNameDictionary.
         ContainsKey(Single <ToolHelp> .GetInstance.GetNPCName(t.word)))
     {
         return(Single <NPCName> .GetInstance.NpcNameDictionary
                [Single <ToolHelp> .GetInstance.GetNPCName(t.word)]);
     }
     else
     {
         return("moshengnanzi");
     }
 }
Beispiel #13
0
        public string contents1(shootItem t)
        {
            index = Single <ToolHelp> .GetInstance.dictionaryId("当前应对界面索引");

            index--;
            string contents = t.TeachWord.ToString().Split('*')[index].ToString();

            if (index == Single <ToolHelp> .GetInstance.IdDictionary["当前应对界面页面数"] - 1)
            {
                Single <ToolHelp> .GetInstance.IdDictionary["当前应对界面索引"] = 0;   //使用完后把索引归零
            }
            return(contents);
        }
Beispiel #14
0
        /// <summary> 选择answer这个配制表ID在Question配制的位置
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        private int[] PdIdNumber(shootItem t)
        {
            int[] id = new int[2];
            switch (t.Result)
            {
            case "正确":
                id[0] = Single <ToolHelp> .GetInstance.IdDictionary["answer"];
                id[0]--;
                id[1] = Single <ToolHelp> .GetInstance.IdDictionary["answer"];
                break;

            case "错误":
                id[1] = Single <ToolHelp> .GetInstance.IdDictionary["answer"];
                id[1]--;
                id[0] = Single <ToolHelp> .GetInstance.IdDictionary["answer"];
                break;
            }
            return(id);
        }
Beispiel #15
0
 public string cameraState1(shootItem t)
 {
     //return Single<ToolHelp>.GetInstance.GetCameraNumber(
     //    t[Single<ToolHelp>.GetInstance.IdDictionary["镜头号"]].ToString(), true);
     return(Single <ToolHelp> .GetInstance.GetCameraNumber(t.shootid, true));
 }
Beispiel #16
0
 public string wendatimu1(shootItem t)
 {
     return(Single <ToolHelp> .GetInstance.Getword(t.word));
 }
Beispiel #17
0
 public string wendaTishi1(shootItem t)
 {
     return(t.TeachWord);
 }
Beispiel #18
0
 public string npcName1(shootItem t)
 {
     return(string.Format("{0}/Chat1", image1(t)));
 }
Beispiel #19
0
 public string type1(shootItem t)
 {
     return("equipment");
 }
Beispiel #20
0
 public string name1(shootItem t)
 {
     return(Single <ToolHelp> .GetInstance.GetNPCName(t.word));
 }
Beispiel #21
0
        private PropertyInfo[] propertyInfos;     //公共属性

        /// <summary>
        /// 给内容分类,如选择、判断、对白等
        /// </summary>
        /// <param name="shootItm"></param>
        public void selectDetails(shootItem shootItm)
        {
            switch (shootItm.type)
            {
            case "log":     //对白
            {
                creatXML(typeof(XMLDialog), shootItm);
            }
            break;

            case "pd":     //判断
            {
                creatXML(typeof(XMLAnswer), shootItm);
                creatXML(typeof(XMLAnswer), shootItm);
                creatXML(typeof(XMLQuestion), shootItm);
            }
            break;

            case "xz":     //选择
            {
                creatXML(typeof(XMLAnswer), shootItm);
                creatXML(typeof(XMLAnswer), shootItm);
                creatXML(typeof(XMLXuanZeTi), shootItm);
            }
            break;

            case "wd":     //问答
            {
                creatXML(typeof(XMLWenda), shootItm);
            }
            break;

            case "tw":     //智者提问
            {
                creatXML(typeof(XMLWiseManAsk), shootItm);
            }
            break;

            case "gc":     //智者过场动画
            {
                creatXML(typeof(XMLGuochangdonghua), shootItm);
            }
            break;

            case "kp":     //科普
            {
                creatXML(typeof(XMLkepu), shootItm);
            }
            break;

            case "wx":     //应对界面
                Single <ToolHelp> .GetInstance.IdDictionary["当前应对界面页面数"] = shootItm.TeachWord.Split('*').Length;

                for (int i = 0; i < Single <ToolHelp> .GetInstance.IdDictionary["当前应对界面页面数"]; i++)
                {
                    creatXML(typeof(XMLDealWith_C), shootItm);
                }
                creatXML(typeof(XMLDealWith_T), shootItm);
                break;
            }
        }
Beispiel #22
0
 public string details1(shootItem t)
 {
     //return t[Single<ToolHelp>.GetInstance.IdDictionary["判断题_系"]].ToString();
     return(t.TeachWord);
 }
Beispiel #23
0
 public string wendajingtou1(shootItem t)
 {
     return(Single <ToolHelp> .GetInstance.GetCameraNumber(t.shootid, true));
 }
Beispiel #24
0
 public string bTip1(shootItem t)
 {
     return("false");
 }
Beispiel #25
0
        //public string name1(shootItem t)
        //{
        //    return Single<ToolHelp>.GetInstance.GetNPCName(t[Single<ToolHelp>.GetInstance.IdDictionary["对白"]].ToString());
        //}

        //public string image1(shootItem t)
        //{
        //    if (Single<NPCName>.GetInstance.NpcNameDictionary.
        //        ContainsKey(Single<ToolHelp>.GetInstance.GetNPCName(t[Single<ToolHelp>.GetInstance.IdDictionary["对白"]].ToString())))
        //    {
        //        return Single<NPCName>.GetInstance.NpcNameDictionary
        //            [Single<ToolHelp>.GetInstance.GetNPCName(t[Single<ToolHelp>.GetInstance.IdDictionary["对白"]].ToString())];
        //    }
        //    else
        //    {
        //        return "??";
        //    }


        //}

        //public string chatPoint1(shootItem t)
        //{
        //    return string.Format("{0}/Chat1", image1(t));
        //}

        public string type1(shootItem t)
        {
            return("1");
        }
 public string nextShoot1(shootItem t)
 {
     return(Single <ToolHelp> .GetInstance.GetCameraNumber(t.shootid, true));
 }
Beispiel #27
0
 public string askdetails1(shootItem t)
 {
     return(Single <ToolHelp> .GetInstance.Getword(t.word));
 }
Beispiel #28
0
 public string name1(shootItem t)
 {
     return("老师");
 }
Beispiel #29
0
 public string answerdetails1(shootItem t)
 {
     return(t.TeachWord);
 }
Beispiel #30
0
 public string cutCamera1(shootItem t)
 {
     return("CameraCube");
 }