Exemplo n.º 1
0
                public Stump(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
                    : base(x, y, name, Width, Height, bm)
                {
                    Random random = new Random();

                    if (name[1] == '1')
                    {
                        Weight = random.Next(4, 6);
                        map.Fill(x, y, Width, Height, 21, 44, 0, 22);
                    }
                    else if (name[1] == '2')
                    {
                        Weight = random.Next(3, 5);
                        map.Fill(x, y, Width, Height, 26, 45, 5, 24);
                    }
                    else if (name[1] == '3')
                    {
                        Weight = random.Next(8, 12);
                        map.Fill(x, y, Width, Height, 21, 92, 0, 22);
                    }
                    else if (name[1] == '4')
                    {
                        Weight = random.Next(6, 10);
                        map.Fill(x, y, Width, Height, 26, 93, 5, 24);
                    }
                }
Exemplo n.º 2
0
                public Tree(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
                    : base(x, y, name, Width, Height, bm)
                {
                    Random random = new Random();

                    if (name[1] == '1')
                    {
                        Weight = random.Next(9, 16);
                        map.Fill(x, y, Width, Height, 0, 41, 53, 74);
                    }
                    else if (name[1] == '2')
                    {
                        Weight = random.Next(25, 30);
                        map.Fill(x, y, Width, Height, 0, 96, 53, 74);
                    }
                    else if (name[1] == '3')
                    {
                        Weight = random.Next(8, 14);
                        map.Fill(x, y, Width, Height, 0, 28, 68, 92);
                    }
                    else if (name[1] == '4')
                    {
                        Weight = random.Next(27, 33);
                        map.Fill(x, y, Width, Height, 0, 89, 68, 92);
                    }
                }
Exemplo n.º 3
0
 public PlowedSoil(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
     : base(x, y, name, Width, Height, bm)
 {
     timerOfWatering          = new System.Timers.Timer(UpdateInterval);
     timerOfWatering.Elapsed += timerOfWateringTimer_Elapsed;
     timerOfGrowth            = new System.Timers.Timer(UpdateInterval * 2);
     timerOfGrowth.Elapsed   += timerOfGrowthTimer_Elapsed;
     map.Fill(x, y, Width, Height, 1, 53, 1, 40);
     isSowed         = false;
     stageOfGrowth   = 0;
     stageOfWatering = 0;
 }
Exemplo n.º 4
0
                public Stone(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
                    : base(x, y, name, Width, Height, bm)
                {
                    Random random = new Random();

                    if (Width == 28)
                    {
                        Weight = random.Next(8, 14);
                        map.Fill(x, y, Width, Height, 5, 21, 0, 12);
                    }
                    else if (Width == 24)
                    {
                        Weight = random.Next(9, 19);
                        map.Fill(x, y, Width, Height, 4, 19, 0, 14);
                    }
                    else if (Width == 46)
                    {
                        Weight = random.Next(25, 30);
                        map.Fill(x, y, Width, Height, 9, 37, 0, 29);
                    }
                }
Exemplo n.º 5
0
                public Grass(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
                    : base(x, y, name, Width, Height, bm)
                {
                    map.Fill(x, y, Width, Height, 0, 0, 0, 0);
                    Random random = new Random();

                    if (name == "g9")
                    {
                        Weight = random.Next(3, 4);
                    }
                    else
                    {
                        Weight = random.Next(1, 2);
                    }
                }
Exemplo n.º 6
0
 public Pond(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
     : base(x, y, name, Width, Height, bm)
 {
     map.Fill(x, y, Width, Height, 0, 62, 0, 52);
 }
Exemplo n.º 7
0
 public Building(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
     : base(x, y, name, Width, Height, bm)
 {
     map.Fill(x, y, Width, Height, 0, 94, 0, 84);
     NumOfItemsInStorage = 0;
 }
Exemplo n.º 8
0
 public Mushroom(int x, int y, string name, int Width, int Height, Bitmap bm, Map map)
     : base(x, y, name, Width, Height, bm)
 {
     map.Fill(x, y, Width, Height, 0, 0, 0, 0);
     Weight = Name[2] - '0';
 }