Beispiel #1
0
        public void ActivateOrbitingStars(float screenWidth, float screenHeight)
        {
            Random randomizer = new Random();

            for (int i = 0; i < 20; i++)
            {
                OrbitingStarParticle star = new OrbitingStarParticle(randomizer.Next((int)screenWidth) - screenWidth / 2, randomizer.Next((int)screenHeight) - screenHeight / 2, Height, randomizer, CreateColor(255, 255, 255));
                star.SetTarget(0, 0);
                AddChild(star);
                star.SteerToTarget();
            }
        }
Beispiel #2
0
        public void ActivateOrbitingStars(float screenWidth, float screenHeight)
        {
            Random randomizer = new Random();

            for (int i = 0; i < 30; i++)
            {
                OrbitingStarParticle star = new OrbitingStarParticle(randomizer.Next((int)screenWidth) + screenWidth / 2,
                                                                     randomizer.Next((int)screenHeight) + screenHeight / 2,
                                                                     Radius / 4,
                                                                     randomizer,
                                                                     SKColor.FromHsl(21, 78, randomizer.Next(0, 6))
                                                                     );
                //OrbitingStarParticle star = new OrbitingStarParticle(randomizer.Next((int)screenWidth) - screenWidth / 2, randomizer.Next((int)screenHeight) - screenHeight / 2, Radius / 4, randomizer, CreateColor(0, 0, 0));
                star.SetTarget(0, 0);
                AddChild(star);
                _listOfStarParticles.Add(star);
                star.SteerToTarget();
            }
        }