Exemple #1
0
        protected override void CreateScene()
        {
            this.mountainLayer = new MountainLayer(this.RenderManager);
            this.RenderManager.RegisterLayerBefore(this.mountainLayer, DefaultLayers.Alpha);

            this.Load(WaveContent.Scenes.MyScene);

            var textBlock = new TextBlock()
            {
                Text = "Touch the screen to control fireball",
                HorizontalAlignment = WaveEngine.Framework.UI.HorizontalAlignment.Left,
                VerticalAlignment = WaveEngine.Framework.UI.VerticalAlignment.Top,
                Margin = new WaveEngine.Framework.UI.Thickness(20),
                DrawOrder = 0.1f
            };
            this.EntityManager.Add(textBlock);

            var mountains = EntityManager.Find("mountains");
            var mountainsRenderer = mountains.FindComponent<SpriteRenderer>();
            mountainsRenderer.LayerType = this.mountainLayer.GetType();
        }
Exemple #2
0
        protected override void CreateScene()
        {
            this.mountainLayer = new MountainLayer(this.RenderManager);
            this.RenderManager.RegisterLayerBefore(this.mountainLayer, DefaultLayers.Alpha);

            this.Load(WaveContent.Scenes.MyScene);

            var textBlock = new TextBlock()
            {
                Text = "Touch the screen to control fireball",
                HorizontalAlignment = WaveEngine.Framework.UI.HorizontalAlignment.Left,
                VerticalAlignment   = WaveEngine.Framework.UI.VerticalAlignment.Top,
                Margin    = new WaveEngine.Framework.UI.Thickness(20),
                DrawOrder = 0.1f
            };

            this.EntityManager.Add(textBlock);

            var mountains         = EntityManager.Find("mountains");
            var mountainsRenderer = mountains.FindComponent <SpriteRenderer>();

            mountainsRenderer.LayerType = this.mountainLayer.GetType();
        }