Пример #1
0
        public IFOWRevealer AddObjRevealer(Transform trans, float radius)
        {
            var revealer = FOWObjectRevealer.Get();

            revealer.InitInfo(trans, radius);
            FOWSystem.AddRevealer(revealer);
            _fowRevealers.Add(revealer);

            return(revealer);
        }
Пример #2
0
 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);
         }
     }
 }
Пример #3
0
        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);
        }
Пример #4
0
 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();
         }
     }
 }
Пример #5
0
 private void ReleaseRevealer(IFOWRevealer revealer)
 {
     FOWSystem.RemoveRevealer(revealer);
     revealer.Release();
 }