public IFOWRevealer AddObjRevealer(Transform trans, float radius) { var revealer = FOWObjectRevealer.Get(); revealer.InitInfo(trans, radius); FOWSystem.AddRevealer(revealer); _fowRevealers.Add(revealer); return(revealer); }
protected void AddCharactor(int charaID) { if (!FOWCharactorRevealer.Contains(charaID)) { if (FOWCharactorRevealer.CheckIsValid(charaID)) { FOWCharactorRevealer revealer = FOWCharactorRevealer.Get(); revealer.InitInfo(charaID); FOWSystem.AddRevealer(revealer); m_revealers.Add(revealer); } } }
public void AddTempRevealer(Vector3 position, float radius, int leftMS) { if (leftMS <= 0) { return; } FOWTempRevealer tmpRevealer = FOWTempRevealer.Get(); tmpRevealer.InitInfo(position, radius, leftMS); FOWSystem.AddRevealer(tmpRevealer); m_revealers.Add(tmpRevealer); }
protected void UpdateRevealers(int deltaMS) { for (int i = m_revealers.Count - 1; i >= 0; i--) { IFOWRevealer revealer = m_revealers[i]; revealer.Update(deltaMS); if (!revealer.IsValid()) { m_revealers.RemoveAt(i); FOWSystem.RemoveRevealer(revealer); revealer.Release(); } } }
private void ReleaseRevealer(IFOWRevealer revealer) { FOWSystem.RemoveRevealer(revealer); revealer.Release(); }