Beispiel #1
0
		private static void regDoItem(string name, Action<object[], Action> fun, int paramNum)
		{
			TeachDoObj value = default(TeachDoObj);
			value._doFun = fun;
			value._pramNum = paramNum;
			NewbieTeachItem.dDo[name] = value;
		}
Beispiel #2
0
		public void initDo(object[] dos)
		{
			for (int i = 0; i < dos.Length; i++)
			{
				debug.Log(":" + (dos[i] as string));
				string[] array = (dos[i] as string).Split(new char[]
				{
					','
				});
				string text = array[0];
				TeachDoObj teachDoObj = NewbieTeachItem.dDo[text];
				bool flag = array.Length < teachDoObj._pramNum;
				if (flag)
				{
					Debug.LogError("新手指引参数不足:" + (dos[i] as string));
					break;
				}
				teachDoObj._param = array;
				bool flag2 = text == "st" || text == "sth" || text == "stn" || text == "sts" || text == "sta";
				if (flag2)
				{
					teachDoObj.forcedo = new Action(this.forceDoNext);
				}
				this.needToDo.Add(teachDoObj);
			}
		}
Beispiel #3
0
        public void initDo(object[] dos)
        {
            for (int i = 0; i < dos.Length; i++)
            {
                //debug.Log(":" + (dos[i] as string));
                string[] args   = (dos[i] as string).Split(',');
                string   doName = args[0] as string;

                TeachDoObj obj = dDo[doName];
                if (args.Length < obj._pramNum)
                {
                    Debug.LogError("新手指引参数不足" + ":" + (dos[i] as string));
                    return;
                }



                obj._param = args;
                if (doName == "st" || doName == "sth" || doName == "stn" || doName == "sts" || doName == "sta")
                {
                    obj.forcedo = forceDoNext;
                }
                //  debug.Log(":" + doName + " " + obj._param + " " + dDo[doName]);
                needToDo.Add(obj);
            }
        }
Beispiel #4
0
        private static void regDoItem(string name, Action <object[], Action> fun, int paramNum)
        {
            TeachDoObj obj = new TeachDoObj();

            obj._doFun   = fun;
            obj._pramNum = paramNum;

            dDo[name] = obj;
        }