Beispiel #1
0
 void ModifyFog(float[,] alphaMap, FogAgent fogAgent)
 {
     if (fogAgent != null && (fogAgent.IsStatic || fogAgent.IsInView))
     {
         ModifyFog(alphaMap, fogAgent.Position, fogAgent.MinRadius, fogAgent.MaxRadius, fogAgent.Cone, fogAgent.Angle, fogAgent.Strength, fogAgent.PreFalloff, fogAgent.Falloff, fogAgent.Inverted);
     }
 }
Beispiel #2
0
        public FogAgent GetAgent(int index)
        {
            FogAgent agent = null;

            try
            {
                agent = fogAgents[index];
            }
            catch
            {
                Debug.LogError(string.Format("Fog agent at index {0} could not be found.", index));
            }

            return(agent);
        }
Beispiel #3
0
 public void RemoveAgent(FogAgent agent)
 {
     fogAgents.Remove(agent);
     UpdateFogOfWar = true;
 }
Beispiel #4
0
 public void AddAgent(FogAgent agent)
 {
     fogAgents.Add(agent);
     UpdateFogOfWar = true;
 }
Beispiel #5
0
 void ModifyFog(float[,] alphaMap, FogAgent fogAgent)
 {
     if (fogAgent != null && (fogAgent.IsStatic || fogAgent.IsInView))
         ModifyFog(alphaMap, fogAgent.Position, fogAgent.MinRadius, fogAgent.MaxRadius, fogAgent.Cone, fogAgent.Angle, fogAgent.Strength, fogAgent.PreFalloff, fogAgent.Falloff, fogAgent.Inverted);
 }
Beispiel #6
0
 public void RemoveAgent(FogAgent agent)
 {
     fogAgents.Remove(agent);
     UpdateFogOfWar = true;
 }
Beispiel #7
0
 public void AddAgent(FogAgent agent)
 {
     fogAgents.Add(agent);
     UpdateFogOfWar = true;
 }