Exemplo n.º 1
0
        /// <summary>
        /// Creates the background.
        /// </summary>
        private void CreateBackground()
        {
            this.EntityManager.Add(EntitiesFactory.CreateBackground());
            this.EntityManager.Add(EntitiesFactory.CreateBackgroundCloud());
            this.EntityManager.Add(EntitiesFactory.CreateBackgroundPlane());

            float XOffset          = 0;
            float screenWidthOver2 = WaveServices.ViewportManager.VirtualWidth / 4;

            for (int i = 0; i < 4; i++)
            {
                var initialX = XOffset + WaveServices.Random.Next((int)screenWidthOver2);
                XOffset += screenWidthOver2;

                this.EntityManager.Add(EntitiesFactory.CreateBackgroundKite(initialX));
            }
        }