Exemplo n.º 1
0
        public void ReloadFruits()
        {
            string[][] fruit_info = SoufTools.GetAllFruits();

            ReloadFruitsMainScreen(fruit_info);

            Fruit.fruit_info = fruit_info;
        }
Exemplo n.º 2
0
        public void randomFruit()
        {
            Random r = new Random();

            for (int p = 0; p < planks.Count; p++)
            {
                for (int f = 0; f < planks[p].fruits.Count; f++)
                {
                    planks[p].fruits[f].Change(r.Next(0, SoufTools.GetAllFruits().Count()));
                }
            }
        }
Exemplo n.º 3
0
 public void ReloadFoods()
 {
     fruit_info = SoufTools.GetAllFruits();
 }
Exemplo n.º 4
0
        public MainWindow()
        {
            InitializeComponent();

            if (Settings1.Default.Font8 == true)
            {
                btn.FontSize      = 8;
                settings.FontSize = 8;
                oldcomp.FontSize  = 8;
                stats.FontSize    = 8;
            }

            if (Settings1.Default.Font10 == true)
            {
                btn.FontSize      = 10;
                settings.FontSize = 10;
                oldcomp.FontSize  = 10;
                stats.FontSize    = 10;
            }

            if (Settings1.Default.Font12 == true)
            {
                btn.FontSize      = 12;
                settings.FontSize = 12;
                oldcomp.FontSize  = 12;
                stats.FontSize    = 12;
            }

            if (Settings1.Default.Font14 == true)
            {
                btn.FontSize      = 14;
                settings.FontSize = 14;
                oldcomp.FontSize  = 14;
                stats.FontSize    = 14;
            }

            if (Settings1.Default.Font16 == true)
            {
                btn.FontSize      = 16;
                settings.FontSize = 16;
                oldcomp.FontSize  = 16;
                stats.FontSize    = 16;
            }

            if (Settings1.Default.Stilstaan == false)
            {
                CreateTimer();
            }



            SoufShape.canvas = canvas;

            // gets all custom fruit and adds it's colors to the list
            string[][] fruits = SoufTools.GetAllFruits();
            for (int i = 0; i < fruits.Length; i++)
            {
                colors.Add(fruits[i][1]);
            }

            if (Settings1.Default.verdwijnen == false)
            {
                // for every color there exists there is a shape
                for (int i = 0; i < shapeAmount; i++)
                {
                    Shape s;
                    int   x    = rng.Next(width);
                    int   y    = rng.Next(height);
                    int   size = rng.Next(30, 50);


                    if (rng.NextDouble() < 0.5)
                    {
                        s = CreateSquare(x, y, size);
                    }
                    else
                    {
                        s = CreateCircle(x, y, size);
                    }

                    shapes.Add(new SoufShape(s));
                }
            }


            if (Settings1.Default.lightmode == true)
            {
                canvas.Background = new SolidColorBrush(Colors.White);
            }

            if (Settings1.Default.lightblue == true)
            {
                canvas.Background = new SolidColorBrush(Colors.LightBlue);
            }

            if (Settings1.Default.blue == true)
            {
                canvas.Background = new SolidColorBrush(Colors.Blue);
            }

            if (Settings1.Default.darkblue == true)
            {
                canvas.Background = new SolidColorBrush(Colors.DarkBlue);
            }

            if (Settings1.Default.darkmodehome == true)

            {
                canvas.Background = new SolidColorBrush(Colors.Black);
            }
        }
Exemplo n.º 5
0
 public void ReloadFruits()
 {
     Fruit.fruit_info = SoufTools.GetAllFruits();
 }