| Package | com.whirled.contrib.platformer.util |
| Class | public class SectionalIndex |
| Property | Defined by | ||
|---|---|---|---|
| _maxWidth : int | SectionalIndex | ||
| _secHeight : int | SectionalIndex | ||
| _secWidth : int | SectionalIndex | ||
| Method | Defined by | ||
|---|---|---|---|
|
SectionalIndex(secWidth:int, secHeight:int, maxWidth:int = 1000)
| SectionalIndex | ||
|
getLocalX(sx:int):int
Converts a global x value to the local x value in a section.
| SectionalIndex | ||
|
getLocalY(sy:int):int
Converts a global y value to the local y value in a section.
| SectionalIndex | ||
|
getSectionFromTile(tx:int, ty:int):int
Returns the section index for the supplied global coordinates.
| SectionalIndex | ||
|
getSectionHeight():int
The display height of a section.
| SectionalIndex | ||
|
getSectionIndex(sx:int, sy:int):int
Returns the index for the supplied section.
| SectionalIndex | ||
|
getSectionWidth():int
The display width of a section.
| SectionalIndex | ||
|
getSectionX(section:int):int
Returns the section x coordinate from a section index.
| SectionalIndex | ||
|
getSectionXFromTile(tx:int):int
Returns the x value of the section this global x value resides in.
| SectionalIndex | ||
|
getSectionY(section:int):int
Returns the section y coordinate from a section index.
| SectionalIndex | ||
|
getSectionYFromTile(ty:int):int
Returns the y value of the section this global y value resides in.
| SectionalIndex | ||
|
validX(x:int):Boolean
Returns true if this x value is inside the area being indexed.
| SectionalIndex | ||
|
validY(y:int):Boolean
Returns true if this y value is inside the area being indexed.
| SectionalIndex | ||
| _maxWidth | property |
protected var _maxWidth:int
| _secHeight | property |
protected var _secHeight:int
| _secWidth | property |
protected var _secWidth:int
| SectionalIndex | () | constructor |
public function SectionalIndex(secWidth:int, secHeight:int, maxWidth:int = 1000)Parameters
secWidth:int |
|
secHeight:int |
|
maxWidth:int (default = 1000) |
| getLocalX | () | method |
public function getLocalX(sx:int):intConverts a global x value to the local x value in a section.
Parameterssx:int |
int |
| getLocalY | () | method |
public function getLocalY(sy:int):intConverts a global y value to the local y value in a section.
Parameterssy:int |
int |
| getSectionFromTile | () | method |
public function getSectionFromTile(tx:int, ty:int):intReturns the section index for the supplied global coordinates.
Parameterstx:int |
|
ty:int |
int |
| getSectionHeight | () | method |
public function getSectionHeight():intThe display height of a section.
Returnsint |
| getSectionIndex | () | method |
public function getSectionIndex(sx:int, sy:int):intReturns the index for the supplied section.
Parameterssx:int |
|
sy:int |
int |
| getSectionWidth | () | method |
public function getSectionWidth():intThe display width of a section.
Returnsint |
| getSectionX | () | method |
public function getSectionX(section:int):intReturns the section x coordinate from a section index.
Parameterssection:int |
int |
| getSectionXFromTile | () | method |
public function getSectionXFromTile(tx:int):intReturns the x value of the section this global x value resides in.
Parameterstx:int |
int |
| getSectionY | () | method |
public function getSectionY(section:int):intReturns the section y coordinate from a section index.
Parameterssection:int |
int |
| getSectionYFromTile | () | method |
public function getSectionYFromTile(ty:int):intReturns the y value of the section this global y value resides in.
Parametersty:int |
int |
| validX | () | method |
public function validX(x:int):BooleanReturns true if this x value is inside the area being indexed.
Parametersx:int |
Boolean |
| validY | () | method |
public function validY(y:int):BooleanReturns true if this y value is inside the area being indexed.
Parametersy:int |
Boolean |