Exemplo n.º 1
0
        public override void Load(System.Xml.XmlNode node)
        {
            base.Load(node);
            image = new Nineslice(Library.GetTexture("assets/platform.png"), 3, 3);

            image.ScaleX = Width / image.Width;
            image.ScaleY = Height / image.Height;

            Graphic = image;
        }
Exemplo n.º 2
0
        public Platform(int width, int height)
        {
            Width  = width;
            Height = height;

            Type = Collision;

            image         = new Nineslice(Library.GetTexture("platform.png"), 3, 3);
            image.Columns = (int)(Width / 5f);
            image.Rows    = (int)(Height / 5f);
            image.ScaleX  = Width / image.Width;
            image.ScaleY  = Height / image.Height;

            AddComponent(image);

            Layer = ObjectLayers.Platforms;
        }
Exemplo n.º 3
0
        public Crumble(int width, int height)
        {
            Width  = width;
            Height = height;
            Type   = Platform.Collision;

            canMakeAHellaRacket = true;

            image        = new Nineslice(Library.GetTexture("crumble.png"), (int)(Width / 5f), (int)(Height / 5f));
            image.ScaleX = Width / image.Width;
            image.ScaleY = Height / image.Height;

            AddComponent(image);

            AddResponse(Player.Message.OnLand, OnBump);
            AddResponse(Platform.Message.Bump, OnBump);

            Layer = ObjectLayers.Platforms;
        }