C# Class LOSManager, ES2015C

Inheritance: MonoBehaviour
Show file Open project: jgirald/ES2015C Class Usage Examples

Public Properties

Property Type Description
Entities List
HeightBlockers HeightBlockerParameters
PreviewInEditor bool
Size SizeParameters
Terrain Terrain
Visual VisualParameters
visibleEntities List

Public Methods

Method Description
AddEntity ( LOSEntity, entity ) : void
GetFOWColor ( Rect rect ) : Color32
GetFOWColor ( Vector2 pos ) : Color32
GetQuantizedFOW ( Color32 px ) : Color32
GetRevealFromFOW ( Color32 px ) : LOSEntity.RevealStates
InitializeTexture ( ) : void
InvalidateTerrainHeightsCache ( ) : void
IsVisible ( Rect rect ) : LOSEntity.RevealStates
IsVisible ( Vector2 pos ) : LOSEntity.RevealStates
RemoveEntity ( LOSEntity, entity ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
AddAO ( Rect rect, float height ) : void
AddHeightBlocker ( Rect rect, float height ) : void
EaseToward ( byte from, byte to, int amount ) : byte
GenerateParameterHash ( ) : int
GetExtents ( Rect rect, int inflateRange, int &xMin, int &yMin, int &xMax, int &yMax ) : void
GetExtents ( Vector2 pos, int inflateRange, int &xMin, int &yMin, int &xMax, int &yMax ) : void
RevealLOS ( LOSEntity, sight, float los, float fow, float grayscale ) : void
RevealLOS ( Rect rect, float range, float height, float los, float fow, float grayscale ) : void
SizeFromParams ( int desired, float terrainSize, float scale ) : int

Method Details

AddEntity() public static method

public static AddEntity ( LOSEntity, entity ) : void
entity LOSEntity,
return void

GetFOWColor() public method

public GetFOWColor ( Rect rect ) : Color32
rect Rect
return UnityEngine.Color32

GetFOWColor() public method

public GetFOWColor ( Vector2 pos ) : Color32
pos Vector2
return UnityEngine.Color32

GetQuantizedFOW() public method

public GetQuantizedFOW ( Color32 px ) : Color32
px UnityEngine.Color32
return UnityEngine.Color32

GetRevealFromFOW() public method

public GetRevealFromFOW ( Color32 px ) : LOSEntity.RevealStates
px UnityEngine.Color32
return LOSEntity.RevealStates

InitializeTexture() public method

public InitializeTexture ( ) : void
return void

InvalidateTerrainHeightsCache() public method

public InvalidateTerrainHeightsCache ( ) : void
return void

IsVisible() public method

public IsVisible ( Rect rect ) : LOSEntity.RevealStates
rect Rect
return LOSEntity.RevealStates

IsVisible() public method

public IsVisible ( Vector2 pos ) : LOSEntity.RevealStates
pos Vector2
return LOSEntity.RevealStates

RemoveEntity() public static method

public static RemoveEntity ( LOSEntity, entity ) : void
entity LOSEntity,
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

Entities public property

public List Entities
return List

HeightBlockers public property

public HeightBlockerParameters HeightBlockers
return HeightBlockerParameters

PreviewInEditor public property

public bool PreviewInEditor
return bool

Size public property

public SizeParameters Size
return SizeParameters

Terrain public property

public Terrain Terrain
return Terrain

Visual public property

public VisualParameters Visual
return VisualParameters

visibleEntities public property

public List visibleEntities
return List