AxiosEngine-old 

AxiosEngine-old Mercurial Source Tree


Root/axios/Engine/Gleed2D/Layer.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
 
namespace Axios.Engine.Gleed2D
{
    public partial class Layer
    {
        /// <summary>
        /// The name of the layer.
        /// </summary>
        [XmlAttribute()]
        public String Name;
 
        /// <summary>
        /// Should this layer be visible?
        /// </summary>
        [XmlAttribute()]
        public bool Visible;
 
        /// <summary>
        /// The list of the items in this layer.
        /// </summary>
        public List<Item> Items;
 
        /// <summary>
        /// The Scroll Speed relative to the main camera. The X and Y components are
        /// interpreted as factors, so (1;1) means the same scrolling speed as the main camera.
        /// Enables parallax scrolling.
        /// </summary>
        public Vector2 ScrollSpeed;
 
 
        public Layer()
        {
            Items = new List<Item>();
            ScrollSpeed = Vector2.One;
        }
 
        public void draw(SpriteBatch sb)
        {
            if (!Visible) return;
            foreach (Item item in Items) item.draw(sb);
        }
 
    }
}
Source at commit 0d5aac94bce0 created 12 years 7 months ago.
By Nathan Adams, Adding Contact extension

Archive Download this file

Page rendered in 0.83791s using 11 queries.