public NewbieQueItem(string str, int idid)
        {
            string[]        arrStr = str.Split(';');
            NewbieTeachItem last   = null;

            id = idid;
            for (int i = 0; i < arrStr.Length; i++)
            {
                if (arrStr[i] == "")
                {
                    continue;
                }

                NewbieTeachItem item = NewbieTeachItem.initWithStr(arrStr[i]);
                item.idx = i;
                item.id  = id;
                if (last != null)
                {
                    last.nextItem = item;
                }

                last = item;
                list.Add(item);
            }

            list[0].doit();
        }
Beispiel #2
0
        public NewbieQueItem(string str, int idid)
        {
            string[] array = str.Split(new char[]
            {
                ';'
            });
            NewbieTeachItem newbieTeachItem = null;

            this.id = idid;
            for (int i = 0; i < array.Length; i++)
            {
                bool flag = array[i] == "";
                if (!flag)
                {
                    NewbieTeachItem newbieTeachItem2 = NewbieTeachItem.initWithStr(array[i]);
                    newbieTeachItem2.idx = i;
                    newbieTeachItem2.id  = this.id;
                    bool flag2 = newbieTeachItem != null;
                    if (flag2)
                    {
                        newbieTeachItem.nextItem = newbieTeachItem2;
                    }
                    newbieTeachItem = newbieTeachItem2;
                    this.list.Add(newbieTeachItem2);
                }
            }
            this.list[0].doit(false, false);
        }
        public NewbieQueItem(List <string> lStr, int idid)
        {
            NewbieTeachItem last = null;

            id = idid;
            for (int i = 0; i < lStr.Count; i++)
            {
                if (lStr[i] == "")
                {
                    continue;
                }

                NewbieTeachItem item = NewbieTeachItem.initWithStr(lStr[i]);
                item.idx = i;
                item.id  = id;
                if (last != null)
                {
                    last.nextItem = item;
                }

                last = item;
                list.Add(item);
            }

            list[0].doit();
        }
Beispiel #4
0
        public static NewbieTeachItem initWithStr(string str)
        {
            string[] arrMain = str.Split(':');
            if (arrMain.Length != 3 && arrMain.Length != 2)
            {
                Debug.LogError("新手脚本初始化错误,冒号:" + str);
                return(null);
            }

            string[] arrTeach = arrMain[0].Split(',');



            string tempname = arrTeach[0];

            if (!dListener.ContainsKey(tempname))
            {
                Debug.LogError("新手脚本初始化错误文字错误:" + arrTeach[0] + ":" + arrMain[0] + "::::" + str);
                return(null);
            }

            NewbieTeachItem item = dListener[tempname](arrTeach);

            if (item == null)
            {
                Debug.LogError("初始化新手错误:" + arrMain[0]);
                return(null);
            }
            if (arrTeach[0] == "stop")
            {
                item.checkToDo = null;
                string[] arrDo = arrMain[1].Split('|');
                item.initDo(arrDo);
            }
            else
            {
                item.initCheck(arrMain[1]);
                string[] arrDo = arrMain[2].Split('|');
                item.initDo(arrDo);
            }

            return(item);
        }
Beispiel #5
0
		public static void initCommand()
		{
			NewbieTeachItem.regItem("onlv", new NewbieTeachItem.itemDelegate(NbLevel.create));
			NewbieTeachItem.regItem("onclick", new NewbieTeachItem.itemDelegate(NbClick.create));
			NewbieTeachItem.regItem("onwin", new NewbieTeachItem.itemDelegate(NbWinOpen.create));
			NewbieTeachItem.regItem("onwinclose", new NewbieTeachItem.itemDelegate(NbWinClose.create));
			NewbieTeachItem.regItem("stop", new NewbieTeachItem.itemDelegate(NbStop.create));
			NewbieTeachItem.regItem("go", new NewbieTeachItem.itemDelegate(NbGo.create));
			NewbieTeachItem.regItem("onmap", new NewbieTeachItem.itemDelegate(NbChangeWorld.create));
			NewbieTeachItem.regItem("delay", new NewbieTeachItem.itemDelegate(NbDelay.create));
			NewbieTeachItem.regItem("newskill", new NewbieTeachItem.itemDelegate(NbNewSkill.create));
			NewbieTeachItem.regItem("ontask", new NewbieTeachItem.itemDelegate(NbTask.create));
			NewbieTeachItem.regItem("onskillon", new NewbieTeachItem.itemDelegate(NbSkillOn.create));
			NewbieTeachItem.regItem("onJoystick", new NewbieTeachItem.itemDelegate(NbJoystick.create));
			NewbieTeachItem.regItem("onaddpoint", new NewbieTeachItem.itemDelegate(NbAddPoint.create));
			NewbieTeachItem.regItem("oninitFb", new NewbieTeachItem.itemDelegate(NbFBInit.create));
			NewbieTeachItem.regDoItem("st", new Action<object[], Action>(NbDoItems.showWithNorlCamera), 4);
			NewbieTeachItem.regDoItem("std", new Action<object[], Action>(NbDoItems.showWithOutClick), 2);
			NewbieTeachItem.regDoItem("stn", new Action<object[], Action>(NbDoItems.showWithNext), 4);
			NewbieTeachItem.regDoItem("sts", new Action<object[], Action>(NbDoItems.showWithClick), 2);
			NewbieTeachItem.regDoItem("sta", new Action<object[], Action>(NbDoItems.showWithOutAvatar), 3);
			NewbieTeachItem.regDoItem("hideteach", new Action<object[], Action>(NbDoItems.hideTeachWin), 1);
			NewbieTeachItem.regDoItem("closeallwin", new Action<object[], Action>(NbDoItems.closeAllwin), 1);
			NewbieTeachItem.regDoItem("stopmove", new Action<object[], Action>(NbDoItems.stopMove), 1);
			NewbieTeachItem.regDoItem("stopmove1", new Action<object[], Action>(NbDoItems.stopmove1), 1);
			NewbieTeachItem.regDoItem("hidefui", new Action<object[], Action>(NbDoItems.hidefloatUI), 1);
			NewbieTeachItem.regDoItem("showfui", new Action<object[], Action>(NbDoItems.showfloatUI), 1);
			NewbieTeachItem.regDoItem("playact", new Action<object[], Action>(NbDoItems.playact), 3);
			NewbieTeachItem.regDoItem("playeff", new Action<object[], Action>(NbDoItems.playEff), 3);
			NewbieTeachItem.regDoItem("continue", new Action<object[], Action>(NbDoItems.ContinueDo), 1);
			NewbieTeachItem.regDoItem("openskill", new Action<object[], Action>(NbDoItems.openSkill), 2);
			NewbieTeachItem.regDoItem("showobj", new Action<object[], Action>(NbDoItems.showObj), 3);
			NewbieTeachItem.regDoItem("stl", new Action<object[], Action>(NbDoItems.showTeachLine), 3);
			NewbieTeachItem.regDoItem("endnewbie", new Action<object[], Action>(NbDoItems.endNewbie), 1);
			NewbieTeachItem.regDoItem("dialog", new Action<object[], Action>(NbDoItems.showDialog), 3);
			NewbieTeachItem.regDoItem("cleargo", new Action<object[], Action>(NbDoItems.clearLGo), 1);
			NewbieTeachItem.regDoItem("playcameraani", new Action<object[], Action>(NbDoItems.playCameani), 2);
			NewbieTeachItem.regDoItem("endstory", new Action<object[], Action>(NbDoItems.endStory), 2);
			NewbieTeachItem.regDoItem("skilldraw", new Action<object[], Action>(NbDoItems.skillDraw), 1);
			NewbieTeachItem.regDoItem("closeexpbar", new Action<object[], Action>(NbDoItems.closeexpbar), 1);
			NewbieTeachItem.regDoItem("openexpbar", new Action<object[], Action>(NbDoItems.openexpbar), 1);
		}
Beispiel #6
0
        public NewbieQueItem(List <string> lStr, int idid)
        {
            NewbieTeachItem newbieTeachItem = null;

            this.id = idid;
            for (int i = 0; i < lStr.Count; i++)
            {
                bool flag = lStr[i] == "";
                if (!flag)
                {
                    NewbieTeachItem newbieTeachItem2 = NewbieTeachItem.initWithStr(lStr[i]);
                    newbieTeachItem2.idx = i;
                    newbieTeachItem2.id  = this.id;
                    bool flag2 = newbieTeachItem != null;
                    if (flag2)
                    {
                        newbieTeachItem.nextItem = newbieTeachItem2;
                    }
                    newbieTeachItem = newbieTeachItem2;
                    this.list.Add(newbieTeachItem2);
                }
            }
            this.list[0].doit(false, false);
        }
 public NewbieTeachMgr()
 {
     NewbieTeachItem.initCommand();
 }
Beispiel #8
0
		public static NewbieTeachItem initWithStr(string str)
		{
			string[] array = str.Split(new char[]
			{
				':'
			});
			bool flag = array.Length != 3 && array.Length != 2;
			NewbieTeachItem result;
			if (flag)
			{
				Debug.LogError("新手脚本初始化错误,冒号:" + str);
				result = null;
			}
			else
			{
				string[] array2 = array[0].Split(new char[]
				{
					','
				});
				string key = array2[0];
				bool flag2 = !NewbieTeachItem.dListener.ContainsKey(key);
				if (flag2)
				{
					Debug.LogError(string.Concat(new string[]
					{
						"新手脚本初始化错误文字错误:",
						array2[0],
						":",
						array[0],
						"::::",
						str
					}));
					result = null;
				}
				else
				{
					NewbieTeachItem newbieTeachItem = NewbieTeachItem.dListener[key](array2);
					bool flag3 = newbieTeachItem == null;
					if (flag3)
					{
						Debug.LogError("初始化新手错误:" + array[0]);
						result = null;
					}
					else
					{
						bool flag4 = array2[0] == "stop";
						if (flag4)
						{
							newbieTeachItem.checkToDo = null;
							string[] dos = array[1].Split(new char[]
							{
								'|'
							});
							newbieTeachItem.initDo(dos);
						}
						else
						{
							newbieTeachItem.initCheck(array[1]);
							string[] dos2 = array[2].Split(new char[]
							{
								'|'
							});
							newbieTeachItem.initDo(dos2);
						}
						result = newbieTeachItem;
					}
				}
			}
			return result;
		}