void Update() { if (revealFOW) { if (NJGMapBase.instance == null || NJG.UIMiniMapBase.inst == null) { return; } if (mRevealer == null) { mRevealer = NJGFOW.CreateRevealer(); } if (isActive) { mRevealer.pos = NJG.UIMiniMapBase.inst.WorldToMap(cachedTransform.position, false); mRevealer.revealDistance = revealDistance > 0 ? revealDistance : NJGMapBase.instance.fow.revealDistance; mRevealer.isActive = true; } else { mRevealer.isActive = false; } } }
void Update() { if (revealFOW) { if (NJGMap.instance == null || miniMap == null) { return; } if (mRevealer == null) { mRevealer = NJGFOW.CreateRevealer(); } if (isActive) { mRevealer.pos = miniMap.WorldToMap(transform.position, false); mRevealer.revealDistance = revealDistance > 0 ? revealDistance : NJGMap.instance.fow.revealDistance; mRevealer.isActive = true; } else { mRevealer.isActive = false; } } /*if (transform.hasChanged) * { * if (worldMap != null) worldMap.UpdateItem(this); * if (miniMap != null) miniMap.UpdateItem(this); * transform.hasChanged = false; * }*/ }
void Start() { if (NJGMapBase.instance != null) { if (revealFOW && NJGMapBase.instance.fow.enabled) { mRevealer = NJGFOW.CreateRevealer(); } } //enabled = revealFOW; }
void Start() { if (NJGMap.instance != null) { if (revealFOW && NJGMap.instance.fow.enabled) { mRevealer = NJGFOW.CreateRevealer(); } } if (miniMap != null) { icon = miniMap.GetEntry(this); arrow = miniMap.GetArrow(this); } if (worldMap != null) { icon = worldMap.GetEntry(this); arrow = worldMap.GetArrow(this); } mColorSet = false; //enabled = revealFOW; }