C# 클래스 Dwarrowdelf.EnvironmentExtensions

파일 보기 프로젝트 열기: tomba/dwarrowdelf 1 사용 예제들

공개 메소드들

메소드 설명
AdjustMoveDir ( this env, IntVector3 location, Direction dir ) : Direction

For PlanarUpDown directions, return Direction.None if the direction cannot be entered, or the direction, adjusted by slopes (i.e. or'ed with Up or Down)

CanBeSeen ( this env, IntVector3 location ) : bool

Can the given tile be seen from any adjacent tile

CanEnter ( this env, IntVector3 location ) : bool

Tile can be entered and stood upon

CanMoveFrom ( this env, IntVector3 srcLoc, Direction dir ) : bool

Determine if a living can move from srcLoc to dir, without considering the destination

CanMoveFromTo ( this env, IntVector3 srcLoc, Direction dir ) : bool

Determine if a living can move from srcLoc to dir

CanMoveTo ( this env, IntVector3 dstLoc, Direction dir ) : bool

Determine if a living can move to dir, ending to dstLoc, without considering the source

GetDirectionsFrom ( this env, IntVector3 p ) : IEnumerable

Return all possible move directions. XXX Some room for optimization...

GetPositioningLocations ( this env, IntVector3 pos, DirectionSet positioning ) : IEnumerable

Return enterable positions around the given location, based on positioning

GetPossibleMiningPositioning ( this env, IntVector3 p, MineActionType mineActionType ) : DirectionSet

Get possible positioning to perform mining to given location

메소드 상세

AdjustMoveDir() 공개 정적인 메소드

For PlanarUpDown directions, return Direction.None if the direction cannot be entered, or the direction, adjusted by slopes (i.e. or'ed with Up or Down)
public static AdjustMoveDir ( this env, IntVector3 location, Direction dir ) : Direction
env this
location IntVector3
dir Direction
리턴 Direction

CanBeSeen() 공개 정적인 메소드

Can the given tile be seen from any adjacent tile
public static CanBeSeen ( this env, IntVector3 location ) : bool
env this
location IntVector3
리턴 bool

CanEnter() 공개 정적인 메소드

Tile can be entered and stood upon
public static CanEnter ( this env, IntVector3 location ) : bool
env this
location IntVector3
리턴 bool

CanMoveFrom() 공개 정적인 메소드

Determine if a living can move from srcLoc to dir, without considering the destination
public static CanMoveFrom ( this env, IntVector3 srcLoc, Direction dir ) : bool
env this
srcLoc IntVector3
dir Direction
리턴 bool

CanMoveFromTo() 공개 정적인 메소드

Determine if a living can move from srcLoc to dir
public static CanMoveFromTo ( this env, IntVector3 srcLoc, Direction dir ) : bool
env this
srcLoc IntVector3
dir Direction
리턴 bool

CanMoveTo() 공개 정적인 메소드

Determine if a living can move to dir, ending to dstLoc, without considering the source
public static CanMoveTo ( this env, IntVector3 dstLoc, Direction dir ) : bool
env this
dstLoc IntVector3
dir Direction
리턴 bool

GetDirectionsFrom() 공개 정적인 메소드

Return all possible move directions. XXX Some room for optimization...
public static GetDirectionsFrom ( this env, IntVector3 p ) : IEnumerable
env this
p IntVector3
리턴 IEnumerable

GetPositioningLocations() 공개 정적인 메소드

Return enterable positions around the given location, based on positioning
public static GetPositioningLocations ( this env, IntVector3 pos, DirectionSet positioning ) : IEnumerable
env this
pos IntVector3
positioning DirectionSet
리턴 IEnumerable

GetPossibleMiningPositioning() 공개 정적인 메소드

Get possible positioning to perform mining to given location
public static GetPossibleMiningPositioning ( this env, IntVector3 p, MineActionType mineActionType ) : DirectionSet
env this
p IntVector3
mineActionType MineActionType
리턴 DirectionSet