Ejemplo n.º 1
0
        /// <summary>
        /// Pushes a new layer onto the Window's layer stack
        /// </summary>
        /// <param name="layer">The layer to be added</param>
        public void PushLayer(GameLayer layer)
        {
            GM.GeneralLog.BeginBlock("PushLayer() called");
            if (layer != null)
            {
                if (m_device != null)
                {
                    layer.OnCreateDevice(m_device);
                    layer.OnResetDevice(m_device);
                }

                m_layerList.Add(layer);
            }
            GM.GeneralLog.EndBlock("PushLayer() finished");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Removes a layer from the Window's layer stack
 /// </summary>
 /// <param name="layer">The layer to be removed</param>
 /// <returns>True if success, false otherwise (no such layer)</returns>
 public bool RemoveLayer(GameLayer layer)
 {
     if (layer != null)
     {
         m_layerList.Remove(layer);
         return true;
     }
     else
         return false;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Inserts a new layer into the Window's layer stack
 /// (not necessairly on the top of it)
 /// </summary>
 /// <param name="layer">The layer to be inserted</param>
 /// <param name="index">Position at which it is to be inserted(0 for the top of the stack)</param>
 public void InsertLayer(GameLayer layer, int index)
 {
     if (layer != null)
     {
         m_layerList.Insert(index, layer);
     }
 }