Beispiel #1
0
        public void MoveToFrbLayer(FlatRedBall.Graphics.Layer layer, FlatRedBall.Gum.GumIdb containingScreen)
        {
            var gumLayer = containingScreen.GumLayersOnFrbLayer(layer).FirstOrDefault();

            if (gumLayer != null)
            {
                this.MoveToLayer(gumLayer);
            }
#if DEBUG
            else
            {
                throw new Exception("There is no associated Gum layer for the FRB Layer " + layer);
            }
#endif
        }
        public void MoveToFrbLayer(FlatRedBall.Graphics.Layer layer, FlatRedBall.Gum.GumIdb containingScreen)
        {
            var gumLayer = containingScreen.GumLayersOnFrbLayer(layer).FirstOrDefault();



#if DEBUG
            if (gumLayer == null)
            {
                string message = "There is no associated Gum layer for the FRB Layer " + layer + ".\n" +
                                 "To fix this, either add the Layer to Glue, or call AddGumLayerToFrbLayer on the GumIdb with " +
                                 "a new instance of a Gum layer. To see an example of how to use AddGumLayerToFrbLayer, add a FRB Layer to Glue and look at generated code.";
                throw new Exception(message);
            }
#endif

            MoveToFrbLayer(layer, gumLayer);
        }