Example #1
0
 public ss(cc x)
 {
     str  = "sCNM";
     i    = 18;
     sc   = x;
     strs = null;
 }
Example #2
0
 public void b()
 {
     GC.SuppressFinalize(this);
     this.a();
     this.az.Clear();
     this.n   = null;
     this.ag  = null;
     this.au  = null;
     this.at  = null;
     this.@as = null;
     this.ar  = null;
     this.aq  = null;
     this.ap  = null;
     this.ao  = null;
     this.an  = null;
     this.am  = null;
     this.al  = null;
     this.ak  = null;
     this.aj  = null;
     this.ai  = null;
     this.ah  = null;
     this.af  = null;
     this.ae  = null;
     this.ad  = null;
     this.ac  = null;
     this.ab  = null;
     this.aa  = null;
     this.z   = null;
     this.y   = null;
     this.x   = null;
     this.w   = null;
     this.v   = null;
     this.u   = null;
     this.t   = null;
     this.s   = null;
     this.r   = null;
     this.q   = null;
     this.p   = null;
     this.c   = null;
     this.av  = null;
     this.o   = null;
     this.m   = null;
     this.l   = null;
     this.k   = null;
     this.j   = null;
     this.i   = null;
     this.h   = null;
     this.g   = null;
     this.f   = null;
     this.e   = null;
     this.d   = null;
     this.b   = null;
     this.a   = null;
     this.aw  = null;
     this.ax  = null;
     this.ay  = null;
 }
Example #3
0
        public void Call(string ss, string zl)
        {
            //InitCom();
            //try
            //{
            //    string StrMain = "实收:" + Convert.ToDouble( ss ).ToString();
            //    SendDataChar( StrMain , FontName , xColor , F_Width , F_Height ,LeftSpa , TopSpa , WordSpa , RowSpa , EnterMode , ExitMode , EnterSpeed , ExitSpeed , StopTime );

            //    System.Threading.Thread.Sleep( 1 * 2000 );

            //    StrMain = "找零:" + Convert.ToDouble( zl ).ToString();
            //    SendDataChar( StrMain , FontName , xColor , F_Width , F_Height ,LeftSpa , TopSpa , WordSpa , RowSpa , EnterMode , ExitMode , EnterSpeed , ExitSpeed , StopTime );
            //}
            //catch ( System.Exception err )
            //{
            //    throw new Exception( err.Message );
            //}

            cc     c = new cc(ss, zl);
            Thread t = new Thread(new ThreadStart(c.call));

            t.Start();
        }
Example #4
0
 public void Initialize(string _id = "", int _p = 0, int _v = 0)
 {
     id = _id;
     cc = new cc(_p, _v);
 }
Example #5
0
 public ev(CoreManager A_0, PluginHost A_1, PluginCore A_2)
 {
     this.aw = A_0;
     this.ax = A_1;
     this.ay = A_2;
     this.a  = new b2(this.ay);
     this.az.Add(this.a);
     this.b = new j();
     this.az.Add(this.b);
     this.d = new aj();
     this.az.Add(this.d);
     this.e = new cd((FileService)this.aw.get_FileService(), this);
     this.az.Add(this.e);
     this.f = new d6();
     this.az.Add(this.f);
     this.g = new dv(this);
     this.az.Add(this.g);
     this.z = new s(this.aw);
     this.az.Add(this.z);
     this.h = new cs(this);
     this.az.Add(this.h);
     this.i = new dg(this);
     this.az.Add(this.i);
     this.j = new dl(this);
     this.az.Add(this.j);
     this.k = new eo(this);
     this.az.Add(this.k);
     this.l = new bh();
     this.az.Add(this.l);
     this.m = new fq();
     this.az.Add(this.m);
     this.o = new bw();
     this.az.Add(this.o);
     this.c = new cLogic(this.g, this.ay, this.z);
     this.az.Add(this.c);
     this.p = new cj(new cj.a(ad.a), A_1.get_Actions());
     this.az.Add(this.p);
     this.q = new b5(this.aw, this.ay);
     this.az.Add(this.q);
     this.r = new cz(this.ay, this.aw, this.ax, this.p);
     this.az.Add(this.r);
     this.s = new ag();
     this.az.Add(this.s);
     this.t = new fc(this.aw, this.ay);
     this.az.Add(this.t);
     this.u = new b0(this.aw, this.ay, this.p);
     this.az.Add(this.u);
     this.v = new el(this.aw);
     this.az.Add(this.v);
     this.w = new bd();
     this.az.Add(this.w);
     this.x = new bv(this.aw);
     this.az.Add(this.x);
     this.y = new a7(this.aw);
     this.az.Add(this.y);
     this.n = new fn(this.aw, this.p);
     this.az.Add(this.n);
     this.aa = new d0(this.aw);
     this.az.Add(this.aa);
     this.ab = new da(this.p, this.ay);
     this.az.Add(this.ab);
     this.ac = new bj();
     this.az.Add(this.ac);
     this.ad = new fs();
     this.az.Add(this.ad);
     this.ae = new b9();
     this.az.Add(this.ae);
     this.af = new en();
     this.az.Add(this.af);
     this.ah = new e0();
     this.az.Add(this.ah);
     this.ai = new ar();
     this.az.Add(this.ai);
     this.aj = new y(this.ai);
     this.az.Add(this.aj);
     this.ak = new cRechargeManager();
     this.az.Add(this.ak);
     this.al = new q();
     this.az.Add(this.al);
     this.am = new fr();
     this.az.Add(this.am);
     this.an = new ei(this.g, this.p);
     this.az.Add(this.an);
     this.ao = new ca(this.x, this.an);
     this.az.Add(this.ao);
     this.ap = new cr(this.ay);
     this.az.Add(this.ap);
     this.aq = new bp();
     this.az.Add(this.aq);
     this.ar = new ay(this.p);
     this.az.Add(this.ar);
     this.@as = new h();
     this.az.Add(this.@as);
     this.at = new du();
     this.az.Add(this.at);
     this.au = new ac();
     this.az.Add(this.au);
     this.ag = new cc();
     this.az.Add(this.ag);
 }
Example #6
0
 public static void t(cc cc, string t)
 {
     xCon.WriteLine(ccDict[cc] + t);
 }
Example #7
0
    public static void Main()
    {
        Console.Title         = "Движение врагов";
        Console.CursorVisible = false;

        int width     = 55;
        int height    = 25;
        int max_enemy = 10;

        int[,] mass = new int[height, width];
        Random r = new Random();

        int cur_enemy = 0;

        for (int j = 0; j < height; j++)
        {
            for (int i = 0; i < width; i++)
            {
                int rn = r.Next(0, 50);
                if (rn == 0)
                {
                    mass[j, i] = 1;
                }
                else if (rn == 1 && cur_enemy < max_enemy)
                {
                    cur_enemy++;
                    mass[j, i] = 2;
                }
                if (j == 0 || i == 0 || j == height - 1 || i == width - 1)
                {
                    mass[j, i] = 1;
                }
            }
        }
        for (int j = 0; j < height; j++)
        {
            for (int i = 0; i < width; i++)
            {
                if (mass[j, i] == 1)
                {
                    Console.ForegroundColor = ConsoleColor.DarkGreen;
                    Console.Write(Convert.ToChar(0x2593));
                }
                else if (mass[j, i] == 2)
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.Write((char)2);
                }
                else
                {
                    Console.Write(" ");
                }
            }
            Console.WriteLine();
        }

        int k = 0; // количество врагов

        for (int j = 0; j < height; j++)
        {
            for (int i = 0; i < width; i++)
            {
                if (mass[j, i] == 2)
                {
                    k++;
                }
            }
        }

        Console.WriteLine();
        Console.WriteLine();



        cc[] enemy = new cc[k];

        int cur = 0; // заполнение информации о координатах и направлении врагов

        for (int j = 0; j < height; j++)
        {
            for (int i = 0; i < width; i++)
            {
                if (mass[j, i] == 2)
                {
                    enemy[cur]     = new cc();
                    enemy[cur].dir = 2;
                    enemy[cur].c.x = i;
                    enemy[cur].c.y = j;
                    cur++;
                }
            }
        }



        while (true)
        {
            for (int j = 0; j < height; j++)
            {
                for (int i = 0; i < width; i++)
                {
                    if (mass[j, i] == 2)
                    {
                        int num = -1;
                        for (int q = 0; q < k; q++)
                        {
                            if (enemy[q].c.x == i && enemy[q].c.y == j)
                            {
                                num = q; break;
                            }
                        }
                        if (num < 0)
                        {
                            continue;
                        }
                        if (enemy[num].dir == 1)
                        {
                            Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                            Console.Write(" ");
                            mass[enemy[num].c.y, enemy[num].c.x] = 0;
                            enemy[num].c.x--;
                            if (mass[enemy[num].c.y, enemy[num].c.x] != 0)
                            {
                                enemy[num].dir = r.Next(1, 5);
                                enemy[num].c.x++;
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                            }
                            else
                            {
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                            }
                        }
                        else if (enemy[num].dir == 2)
                        {
                            Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                            Console.Write(" ");
                            mass[enemy[num].c.y, enemy[num].c.x] = 0;
                            enemy[num].c.y--;
                            if (mass[enemy[num].c.y, enemy[num].c.x] != 0)
                            {
                                enemy[num].dir = r.Next(1, 5);
                                enemy[num].c.y++;
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                            }
                            else
                            {
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                            }
                        }
                        else if (enemy[num].dir == 3)
                        {
                            Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                            Console.Write(" ");
                            mass[enemy[num].c.y, enemy[num].c.x] = 0;
                            enemy[num].c.x++;
                            if (mass[enemy[num].c.y, enemy[num].c.x] != 0)
                            {
                                enemy[num].dir = r.Next(1, 5);
                                enemy[num].c.x--;
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                            }
                            else
                            {
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                            }
                            if (i < width - 1)
                            {
                                i++;
                            }
                        }
                        else if (enemy[num].dir == 4)
                        {
                            Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                            Console.Write(" ");
                            mass[enemy[num].c.y, enemy[num].c.x] = 0;
                            enemy[num].c.y++;
                            if (mass[enemy[num].c.y, enemy[num].c.x] != 0)
                            {
                                enemy[num].dir = r.Next(1, 5);
                                enemy[num].c.y--;
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                            }
                            else
                            {
                                Console.SetCursorPosition(enemy[num].c.x, enemy[num].c.y);
                                Console.ForegroundColor = ConsoleColor.Red;
                                Console.Write((char)2);
                                mass[enemy[num].c.y, enemy[num].c.x] = 2;
                            }
                            if (j < height - 1)
                            {
                                j++;
                            }
                        }
                    }
                }
            }
            Thread.Sleep(15);
        }
    }