Exemplo n.º 1
0
 public void LoadContent(ContentManager contentManager, string[] assets)
 {
     for (int i = 0; i < assets.Length; i++)
     {
         BGLayer layer = new BGLayer();
         layer.LoadContent(contentManager, assets[i], i);
         layers.Add(layer);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Swaps out a layer with another while fading in / out
        /// </summary>
        /// <param name="asset"></param>
        public void SwapWithFade(string asset, int index)
        {
            bIsSwapping = true;
            iSwapIndex = index;

            // Make the new layer and push it on the front of the list
            BGLayer layer = new BGLayer();
            layer.LoadContent(CUtil.ContentManager, asset, iSwapIndex);
            layer.Tint = Color.Black;
            layer.Alpha = 0;

            layers.Insert(iSwapIndex,layer);
        }