Beispiel #1
0
    public static void PrepareData()
    {
        BattleLogic instance = Singleton <BattleLogic> .get_instance();

        if (!FogOfWar.enable || !instance.isFighting)
        {
            return;
        }
        SLevelContext curLvelContext = instance.GetCurLvelContext();

        if (curLvelContext == null || curLvelContext.m_horizonEnableMethod != Horizon.EnableMethod.EnableAll)
        {
            return;
        }
        GameFowManager instance2 = Singleton <GameFowManager> .get_instance();

        GameFowCollector collector = instance2.m_collector;

        collector.UpdateFowVisibility(false);
        collector.CollectExplorer(false);
        if (Singleton <FrameSynchr> .get_instance().CurFrameNum % instance2.GPUInterpolateFrameInterval == 0u)
        {
            FogOfWar.CommitToMaterials();
        }
    }
Beispiel #2
0
 private static void ClearAllFog(bool bCommit)
 {
     if (FogOfWar._bitmapData == null)
     {
         return;
     }
     for (int i = 0; i < FogOfWar._bitmapData.Length; i++)
     {
         FogOfWar._bitmapData[i] = 255;
     }
     if (bCommit)
     {
         FogOfWar.CommitToMaterials();
     }
 }
Beispiel #3
0
 private void ForceUpdate(COM_PLAYERCAMP camp, bool bSubmit)
 {
     this.m_collector.CollectExplorer(true);
     this.CopyActorInfoData(this.m_collector.m_explorerPosList);
     this.ComputeFow(camp);
     FogOfWar.CopyBitmap();
     if (bSubmit)
     {
         FogOfWar.CommitToMaterials();
     }
     if (bSubmit)
     {
         this.m_collector.UpdateFowVisibility(true);
     }
 }
Beispiel #4
0
 public void ForceUpdate(bool bSubmit)
 {
     this.m_collector.CollectExplorer(true);
     this.CopyActorInfoData(this.m_collector.m_explorerPosList);
     for (int i = 1; i < 3; i++)
     {
         this.ComputeFow((COM_PLAYERCAMP)i);
     }
     FogOfWar.CopyBitmap();
     if (bSubmit)
     {
         FogOfWar.CommitToMaterials();
     }
     if (bSubmit)
     {
         this.m_collector.UpdateFowVisibility(true);
     }
 }