class flixel.addons.display.FlxGridOverlay

Available on all platforms

FlxGridOverlay * * @link http://www.photonstorm.com * @author Richard Davey / Photon Storm

Class Fields

static function addLegend(Sprite:FlxSprite, CellWidth:Int, CellHeight:Int, ?AxisX:Bool = true, ?AxisY:Bool = true):FlxSprite

static function create(CellWidth:Int, CellHeight:Int, ?Width:Int = -1, ?Height:Int = -1, ?AddLegend:Bool = false, ?Alternate:Bool = true, ?Color1:Int = -1579290, ?Color2:Int = -2501163):FlxSprite

Creates an FlxSprite of the given width and height filled with a checkerboard pattern. * Each grid cell is the specified width and height, and alternates between two colors. * If alternate is true each row of the pattern will be offset, for a proper checkerboard style. If false each row will be the same colour, creating a striped-pattern effect. * So to create an 8x8 grid you'd call create(8,8) * *

CellWidth

The grid cell width *

CellHeight

The grid cell height *

Width

The width of the FlxSprite. If -1 it will be the size of the game (FlxG.width) *

Height

The height of the FlxSprite. If -1 it will be the size of the game (FlxG.height) *

AddLegend

TODO *

Alternate

Should the pattern alternate on each new row? Default true = checkerboard effect. False = vertical stripes *

Color1

The first fill colour in 0xAARRGGBB format *

Color2

The second fill colour in 0xAARRGGBB format *

returns

FlxSprite of given width/height

static function createGrid(CellWidth:Int, CellHeight:Int, Width:Int, Height:Int, Alternate:Bool, Color1:Int, Color2:Int):BitmapData

static function overlay(Sprite:FlxSprite, CellWidth:Int, CellHeight:Int, ?Width:Int = -1, ?Height:Int = -1, ?AddLegend:Bool = false, ?Alternate:Bool = true, ?Color1:Int = -1998067994, ?Color2:Int = -1998989867):FlxSprite

Creates a checkerboard pattern of the given width/height and overlays it onto the given FlxSprite. * Each grid cell is the specified width and height, and alternates between two colors. * If alternate is true each row of the pattern will be offset, for a proper checkerboard style. If false each row will be the same colour, creating a striped-pattern effect. * So to create an 8x8 grid you'd call create(8,8, * *

Sprite

The FlxSprite you wish to draw the grid on-top of. This updates its pixels value, not just the current frame (don't use animated sprites!) *

CellWidth

The grid cell width *

CellHeight

The grid cell height *

Width

The width of the FlxSprite. If -1 it will be the size of the game (FlxG.width) *

Height

The height of the FlxSprite. If -1 it will be the size of the game (FlxG.height) *

AddLegend

TODO *

Alternate

Should the pattern alternate on each new row? Default true = checkerboard effect. False = vertical stripes *

Color1

The first fill colour in 0xAARRGGBB format *

Color2

The second fill colour in 0xAARRGGBB format *

returns

The modified source FlxSprite