Пример #1
0
 public void RemovePrerequisite(NodeRemoveEvent e, [Combine] ScoreTableRowNode scoreTableRow, [JoinByScoreTable] TeamScoreTableNode scoreTable, [JoinByScoreTable] ICollection <ScoreTableRowNode> rows)
 {
     if (rows.Count <= 1)
     {
         scoreTable.visibilityPrerequisites.AddHidePrerequisite(this.HIDE_WHEN_EMPTY, false);
     }
 }
Пример #2
0
 public void DestroyTankHullIfTankNotAssembled(NodeRemoveEvent e, SingleNode <HullInstanceComponent> tank)
 {
     if (!tank.Entity.HasComponent <AssembledTankComponent>())
     {
         UnityUtil.Destroy(tank.component.HullInstance);
     }
 }
 public void LockScreen(NodeRemoveEvent e, ActiveNotificationNode notification)
 {
     if ((notification.lockScreenNotification.ScreenEntity != null) && notification.lockScreenNotification.ScreenEntity.HasComponent <LockedScreenComponent>())
     {
         notification.lockScreenNotification.ScreenEntity.RemoveComponent <LockedScreenComponent>();
     }
 }
Пример #4
0
        public void AcceptInviteAfterExitLobby(NodeRemoveEvent e, LobbyNode lobby, [JoinAll, Combine] SingleNode <WaitingLobbyExitComponent> dialog, [JoinAll] SingleNode <SelfUserComponent> user)
        {
            AcceptInviteEvent acceptInviteEvent = dialog.Entity.GetComponent <WaitingLobbyExitComponent>().AcceptInviteEvent;

            dialog.Entity.RemoveComponent <WaitingLobbyExitComponent>();
            base.ScheduleEvent(acceptInviteEvent, user);
        }
Пример #5
0
        public void SwitchFromShootingToIdleWhenSelfTankInactive(NodeRemoveEvent evt, SelfActiveTankNode selfActiveTank, [JoinByTank] VulcanWeaponShootingControllerNode vulcanShooting)
        {
            Entity entity = vulcanShooting.Entity;

            entity.RemoveComponent <WeaponStreamShootingComponent>();
            entity.AddComponent <VulcanIdleComponent>();
        }
Пример #6
0
 public void SoftRemove(NodeRemoveEvent e, SingleNode <MatchMakingLobbyStartTimeComponent> lobby)
 {
     if (lobby.Entity.HasComponent <ClientMatchMakingLobbyStartTimeComponent>())
     {
         lobby.Entity.RemoveComponent <ClientMatchMakingLobbyStartTimeComponent>();
     }
 }
Пример #7
0
 public void ShowOnMainScreenAndNotificationLeave(NodeRemoveEvent e, SingleNode <ActiveNotificationComponent> activeNotification, [JoinAll] SingleNode <MainScreenComponent> homeScreen, UserWithIncompleteRegNode userWithIncompleteReg, [JoinAll] ICollection <SingleNode <ActiveNotificationComponent> > activeNotifications)
 {
     if (this.IsRegistartionTime(userWithIncompleteReg) && (activeNotifications.Count == 1))
     {
         base.NewEvent <ShowScreenDownEvent <RegistrationScreenComponent> >().Attach(homeScreen).ScheduleDelayed(0f);
     }
 }
 public void ShowMountButton(NodeRemoveEvent e, NotMountedUserItemWithRestrictionNode item, [JoinAll] ScreenNode screenNode, [JoinByScreen] SingleNode <SelectedItemComponent> selectedItemNode)
 {
     if (ReferenceEquals(selectedItemNode.component.SelectedItem, item.Entity))
     {
         this.ShowMountButton(screenNode, true);
     }
 }
 public void SwitchToBattleState(NodeRemoveEvent e, SingleNode <SelfUserRankSoundEffectInstanceComponent> effect, [JoinAll] SoundListenerNotBattleFinishStateNode listener, [JoinAll] SingleNode <MapInstanceComponent> map, [JoinAll] SingleNode <RoundActiveStateComponent> round, [JoinAll] ICollection <SingleNode <SelfUserRankSoundEffectInstanceComponent> > effects)
 {
     if (effects.Count <= 1)
     {
         base.ScheduleEvent <SwitchSoundListenerStateEvent <SoundListenerStates.SoundListenerBattleState> >(listener);
     }
 }
 public void CheckInventoryAsTemporaryBlocked(NodeRemoveEvent e, SingleNode <InventorySlotTemporaryBlockedByClientComponent> node)
 {
     if (!node.Entity.HasComponent <InventorySlotTemporaryBlockedByServerComponent>())
     {
         node.Entity.RemoveComponentIfPresent <InventorySlotTemporaryBlockedComponent>();
     }
 }
 public void CancelPreload(NodeRemoveEvent e, SingleNode <PreloadAllResourcesComponent> preload, [JoinAll] ICollection <PreloadNode> loadingRequests)
 {
     foreach (PreloadNode node in loadingRequests)
     {
         base.DeleteEntity(node.Entity);
     }
 }
 public void RemoveTargetFromBurningBloomPostEffect(NodeRemoveEvent e, SingleNode <TankActiveStateComponent> tank, [JoinByTank] ICollection <RendererNode> rendererNodes, [JoinAll] SingleNode <BurningTargetBloomComponent> bloomPostEffect)
 {
     foreach (RendererNode node in rendererNodes)
     {
         bloomPostEffect.component.burningTargetBloom.targets.Remove(node.baseRenderer.Renderer);
     }
 }
Пример #13
0
 public void CalculateFlightToTank(NodeRemoveEvent e, HangarLocationScreenNode screen, [JoinAll] HangarCameraNode hangar, [JoinAll] Optional <NewHangarLocationScreenNode> newLocationScreen)
 {
     if (!newLocationScreen.IsPresent())
     {
         this.StartFlightToTank(hangar);
     }
 }
Пример #14
0
 public void RemovePrerequisite(NodeRemoveEvent e, [Combine] ScoreTableRowNode scoreTableRow, [JoinByScoreTable] ScoreTableNode scoreTable, [JoinByScreen] SingleNode <DMBattleScpectatorScreenComponent> dmSpectatorScreen, [JoinByScreen] ScoreTableNode scoreTable2, [JoinByScoreTable] ICollection <ScoreTableRowNode> rows)
 {
     if (rows.Count <= 1)
     {
         scoreTable.visibilityPrerequisites.AddHidePrerequisite(this.HIDE_WHEN_EMPTY, false);
     }
 }
 public void HideFlag(NodeRemoveEvent e, CarriedFlagNode flag1, [JoinByTank] TankNode user, [JoinByUser] FlagIndicatorNode flagIndicator, CarriedFlagNode flag2, [JoinByTank] ICollection <CarriedFlagNode> flags)
 {
     if (flags.Count <= 1)
     {
         flagIndicator.scoreTableFlagIndicator.SetFlagIconActivity(false);
     }
 }
Пример #16
0
 public void Cancel(NodeRemoveEvent e, SingleNode <LocalDurationComponent> node)
 {
     if (!node.component.IsComplete)
     {
         node.component.LocalDurationExpireEvent.Cancel();
     }
 }
Пример #17
0
 public void ClearUpsideDownMarkOnTankRemove(NodeRemoveEvent e, UpsideDownSelfTankForNRNode nr, [JoinSelf] UpsideDownSelfTankNode tank)
 {
     if (!tank.upsideDownTank.Removed)
     {
         tank.Entity.RemoveComponent <UpsideDownTankComponent>();
     }
 }
Пример #18
0
 public void StopOptixMovementEffect(NodeRemoveEvent evt, ShaftAimingWorkingStateSoundEffectNode weapon)
 {
     if (weapon.shaftAimingOptixMovementSoundEffect != null)
     {
         weapon.shaftAimingOptixMovementSoundEffect.Stop();
     }
 }
Пример #19
0
        public void SetOpaqueModeOnExitTankActiveState(NodeRemoveEvent evt, TankNode tank, [JoinByTank] ShaftAimingRendererEffectNode weapon, [JoinByTank] ICollection <RendererNode> renderers)
        {
            float alpha = ClientGraphicsConstants.OPAQUE_ALPHA;

            this.SetTransparentMode(renderers, tank, null, alpha);
            base.ScheduleEvent(new StopTankShaderEffectEvent(ClientGraphicsConstants.SHAFT_AIMING_EFFECT, false), tank);
        }
Пример #20
0
 public void SendRequestUnloadUserProfile(NodeRemoveEvent e, ProfileScreenContextNode context, [JoinByScreen] ProfileScreenNode profileScreen, [JoinAll] SelfUserNode selfUser)
 {
     if (!context.profileScreenContext.UserId.Equals(selfUser.Entity.Id))
     {
         base.ScheduleEvent(new RequestUnloadUserProfileEvent(context.profileScreenContext.UserId), selfUser);
     }
 }
Пример #21
0
        public void DisableShadowOnDeadState(NodeRemoveEvent evt, DeadTankNode state, [Combine, JoinByTank] TankPartRendererNode renderer)
        {
            Renderer renderer2 = renderer.baseRenderer.Renderer;

            renderer2.enabled = false;
            TankMaterialsUtil.SetAlpha(renderer2, 0f);
        }
        public void OnLocalTankDestruction(NodeRemoveEvent e, RemoteTankNode node)
        {
            Entity entity = node.Entity;

            entity.RemoveComponent <KalmanFilterComponent>();
            entity.RemoveComponent <RemoteTankSmootherComponent>();
        }
Пример #23
0
 public void Destroy(NodeRemoveEvent e, InstantiatedBonusNode bonus)
 {
     if (!bonus.bonusBoxInstance.Removed)
     {
         bonus.bonusBoxInstance.BonusBoxInstance.RecycleObject();
     }
 }
 public void HideUpgradeLevelRestrictionIndicator(NodeRemoveEvent e, UserItemWithUpgradeLevelRestrictionNode userItem)
 {
     userItem.upgradeLevelRestrictionBadgeGUI.SendMessageUpwards("Unlock", SendMessageOptions.DontRequireReceiver);
     userItem.upgradeLevelRestrictionBadgeGUI.SendMessageUpwards("OnItemEnabled", SendMessageOptions.DontRequireReceiver);
     userItem.upgradeLevelRestrictionBadgeGUI.gameObject.SetActive(false);
     userItem.upgradeLevelRestrictionBadgeGUI.SendMessageUpwards("MoveToItem", userItem.upgradeLevelRestrictionBadgeGUI.gameObject, SendMessageOptions.DontRequireReceiver);
 }
Пример #25
0
        public void SwitchFromSpeedUpToIdleWhenSelfTankInactive(NodeRemoveEvent evt, SelfActiveTankNode selfActiveTank, [JoinByTank] VulcanWeaponSpeedUpControllerNode vulcanSpeedUp)
        {
            Entity entity = vulcanSpeedUp.Entity;

            entity.RemoveComponent <VulcanSpeedUpComponent>();
            entity.AddComponent <VulcanIdleComponent>();
        }
Пример #26
0
 public void CancelMapPreloadOnLobbyDroped(NodeRemoveEvent e, MatchMakingLobbyNodeWithMapPreload lobby)
 {
     if (lobby.mapPreloadOnLobby.LoaderEntity.Alive)
     {
         base.DeleteEntity(lobby.mapPreloadOnLobby.LoaderEntity);
     }
 }
Пример #27
0
 public void StopBeingTranparent(NodeRemoveEvent e, TankDeadStateVisibleActivatedNode tank, [JoinByTank] ICollection <TransparnetRendererNode> renderers)
 {
     foreach (TransparnetRendererNode node in renderers)
     {
         node.Entity.RemoveComponent <TransparentComponent>();
     }
 }
Пример #28
0
 public void CleanContainer(NodeRemoveEvent e, MapInstance map)
 {
     if (map.Entity.HasComponent <MainPoolContainerComponent>())
     {
         map.Entity.RemoveComponent <MainPoolContainerComponent>();
     }
 }
        public void Clean(NodeRemoveEvent evt, SelfDeadTankNode deadTank, [JoinByTank] StreamWeaponNode idleWeapon)
        {
            Entity entity = idleWeapon.Entity;

            entity.RemoveComponentIfPresent <StreamWeaponIdleComponent>();
            entity.RemoveComponentIfPresent <StreamWeaponWorkingComponent>();
        }
 public void DisableHangarCamera(NodeRemoveEvent e, HangarCameraEnabledNode hangar)
 {
     if (hangar.camera.Enabled)
     {
         hangar.camera.Enabled = false;
     }
 }
Пример #31
0
 private void notifyChildRemoved(Preferences child)
 {
     NodeChangeEvent nce = new NodeRemoveEvent(this, child);
     lock (events) {
     events.add(nce);
     events.notifyAll();
     }
 }