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; }
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; }
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; }