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)); } } } } } } }