AOS Fog of War
Loading...
Searching...
No Matches
FischlWorks_FogWar.csFogWar.FogRevealer Class Reference

Public Member Functions

 FogRevealer (Transform revealerTransform, int sightRange, bool updateOnlyOnMove)
 
Vector2Int GetCurrentLevelCoordinates (csFogWar fogWar)
 

Properties

Vector2Int _CurrentLevelCoordinates [get]
 
Vector2Int _LastSeenAt [get]
 
Transform _RevealerTransform [get]
 
int _SightRange [get]
 
bool _UpdateOnlyOnMove [get]
 

Constructor & Destructor Documentation

◆ FogRevealer()

FischlWorks_FogWar.csFogWar.FogRevealer.FogRevealer ( Transform  revealerTransform,
int  sightRange,
bool  updateOnlyOnMove 
)
inline
143 {
144 this.revealerTransform = revealerTransform;
145 this.sightRange = sightRange;
146 this.updateOnlyOnMove = updateOnlyOnMove;
147 }

Member Function Documentation

◆ GetCurrentLevelCoordinates()

Vector2Int FischlWorks_FogWar.csFogWar.FogRevealer.GetCurrentLevelCoordinates ( csFogWar  fogWar)
inline
150 {
151 currentLevelCoordinates = new Vector2Int(
152 fogWar.GetUnitX(revealerTransform.position.x),
153 fogWar.GetUnitY(revealerTransform.position.z));
154
155 if (lastSeenAt == new Vector2Int(Int32.MaxValue, Int32.MaxValue))
156 {
157 lastSeenAt = currentLevelCoordinates;
158 }
159
160 return currentLevelCoordinates;
161 }

Property Documentation

◆ _CurrentLevelCoordinates

Vector2Int FischlWorks_FogWar.csFogWar.FogRevealer._CurrentLevelCoordinates
get
178 {
179 get {
180 lastSeenAt = currentLevelCoordinates;
181
182 return currentLevelCoordinates;
183 }
184 }

◆ _LastSeenAt

Vector2Int FischlWorks_FogWar.csFogWar.FogRevealer._LastSeenAt
get

◆ _RevealerTransform

Transform FischlWorks_FogWar.csFogWar.FogRevealer._RevealerTransform
get

◆ _SightRange

int FischlWorks_FogWar.csFogWar.FogRevealer._SightRange
get

◆ _UpdateOnlyOnMove

bool FischlWorks_FogWar.csFogWar.FogRevealer._UpdateOnlyOnMove
get

The documentation for this class was generated from the following file: