示例#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();
        }
    }
        private void CreateBullet()
        {
            if (this.actorRoot)
            {
                Singleton <GameObjMgr> .get_instance().AddBullet(ref this.actorRoot);

                BulletWrapper bulletWrapper = this.actorRoot.get_handle().ActorControl as BulletWrapper;
                if (bulletWrapper != null)
                {
                    if (this.bMoveCollision)
                    {
                        bulletWrapper.SetMoveCollision(this.bMoveCollision);
                    }
                    if (FogOfWar.enable)
                    {
                        bulletWrapper.SightRadius = this.sightRadius;
                        COM_PLAYERCAMP playerCamp = Singleton <GamePlayerCenter> .get_instance().GetHostPlayer().PlayerCamp;

                        if (bulletWrapper.actor.TheActorMeta.ActorCamp != playerCamp)
                        {
                            bulletWrapper.m_bVisibleByFow   = this.bVisibleByFow;
                            bulletWrapper.m_bVisibleByShape = this.bCheckVisibleByShape;
                            if (this.bVisibleByFow)
                            {
                                if (this.bCheckVisibleByShape)
                                {
                                    GameFowCollector.SetObjWithColVisibleByFow(this.actorRoot, Singleton <GameFowManager> .get_instance(), playerCamp);
                                }
                                else
                                {
                                    GameFowCollector.SetObjVisibleByFow(this.actorRoot.get_handle().gameObject, Singleton <GameFowManager> .get_instance(), playerCamp);
                                }
                            }
                        }
                    }
                }
            }
        }
        private void CreateBullet()
        {
            if (this.actorRoot)
            {
                Singleton <GameObjMgr> .instance.AddBullet(ref this.actorRoot);

                BulletWrapper bulletWrapper = this.actorRoot.handle.ActorControl as BulletWrapper;
                if (bulletWrapper != null)
                {
                    if (this.bMoveCollision)
                    {
                        bulletWrapper.SetMoveCollision(this.bMoveCollision);
                    }
                    if (FogOfWar.enable)
                    {
                        bulletWrapper.SightRadius = this.sightRadius;
                        if (Singleton <WatchController> .instance.IsWatching || !Singleton <WatchController> .instance.CoversCamp(bulletWrapper.actor.TheActorMeta.ActorCamp))
                        {
                            bulletWrapper.m_bVisibleByFow   = this.bVisibleByFow;
                            bulletWrapper.m_bVisibleByShape = this.bCheckVisibleByShape;
                            if (this.bVisibleByFow)
                            {
                                if (this.bCheckVisibleByShape)
                                {
                                    bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjWithColVisibleByFow(this.actorRoot, Singleton <GameFowManager> .instance, Singleton <WatchController> .instance.HorizonCamp));
                                }
                                else
                                {
                                    bulletWrapper.UpdateSubParObjVisibility(GameFowCollector.SetObjVisibleByFow(this.actorRoot, this.actorRoot.handle.gameObject, Singleton <GameFowManager> .instance, Singleton <WatchController> .instance.HorizonCamp));
                                }
                            }
                        }
                    }
                }
            }
        }
示例#4
0
 public override bool AcceptFowVisibilityCheck(COM_PLAYERCAMP inHostCamp, GameFowManager fowMgr)
 {
     return(GameFowCollector.VisitFowVisibilityCheck(this, this.owner, inHostCamp, fowMgr));
 }