public void AddMaterialComponent(NodeAddedEvent evt, SingleNode <BonusBoxInstanceComponent> bonus) { bonus.Entity.AddComponent(new MaterialComponent(MaterialAlphaUtils.GetMaterial(bonus.component.BonusBoxInstance))); }
public void SetItemName(NodeAddedEvent e, GarageListItemNode listItemNode) { DescriptionItemComponent descriptionItem = listItemNode.descriptionItem; listItemNode.garageListItemContent.Header.text = descriptionItem.Name; }
public void EnableUpgrade(NodeAddedEvent e, GarageListUserUpgradeItemNode item, [JoinAll] ScreenWithVisibleItemsInfoNode screen) { item.garageListItemContent.UpgradeGameObject.SetActive(true); }
public void SwitchToMelodySilentWhenRoundFinish(NodeAddedEvent e, SoundListenerBattleFinishStateNode listener) { this.SwitchToMelodySilent(listener, listener.soundListenerBattleMixerSnapshotTransition.TransitionTimeToMelodySilent); }
public void SwitchToSilentWhenSpawnState(NodeAddedEvent e, SoundListenerSpawnStateNode listener) { this.SwitchToSilent(listener, 0f); }
public void StopCollide(NodeAddedEvent e, TransparentDetachedWeapon weapon) { this.StopCollide(weapon.weaponDetachCollider); }
public void SwitchToLoudWhenBattleState(NodeAddedEvent e, SoundListenerBattleStateNode listener) { this.SwitchToLoud(listener, listener.soundListenerBattleMixerSnapshotTransition.TransitionToLoudTimeInBattle); }
public void SetMaskForIsisTargeting(NodeAddedEvent evt, IsisTargetCollectorNode weapon) { weapon.targetCollector.TargetValidator.LayerMask = LayerMasks.GUN_TARGETING_WITHOUT_DEAD_UNITS; }
public void CreateBonusRegionMaterialComponent(NodeAddedEvent evt, SingleNode <BonusRegionInstanceComponent> bonusRegion) { bonusRegion.Entity.AddComponent(new MaterialComponent(MaterialAlphaUtils.GetMaterial(bonusRegion.component.BonusRegionInstance))); }
public void AddMainScreen(NodeAddedEvent e, SingleNode <ChatDialogComponent> chatDialog, SingleNode <MainScreenComponent> mainScreen) { mainScreen.component.AddListener(chatDialog.component); }
public void EnableStreamHit(NodeAddedEvent e, WorkingNode weapon, [Context, JoinByTank] SelfTankNode tank) { weapon.Entity.AddComponentIfAbsent <StreamHitCheckingComponent>(); }
public void OnMainScreen(NodeAddedEvent e, SingleNode <ChatScreenComponent> chatScreen, SingleNode <MainScreenComponent> main) { chatScreen.component.BuildDialog(); }
public void LogTutorialStep(NodeAddedEvent e, SingleNode <TutorialScreenComponent> tutorial, SingleNode <ChatDialogComponent> dialog) { dialog.component.Hide(); }
public void CreateRegionConfigEntity(NodeAddedEvent e, SingleNode <SelfBattleUserComponent> user) { Entity entity = base.CreateEntity <BonusRegionAssetsTemplate>(REGION_CONFIG_PATH); }
public void CalculateFlightToLocation(NodeAddedEvent e, HangarLocationScreenNode screen, [JoinAll] HangarCameraNode hangar, [JoinAll] ICollection <HangarLocationScreenNode> activeLocationScreen) { Transform transform; if ((activeLocationScreen.Count <= 1) && hangar.hangarLocations.Locations.TryGetValue(screen.hangarLocation.HangarLocation, out transform)) { base.ScheduleEvent <HangarCameraStopFlightEvent>(hangar); HangarConfigComponent hangarConfig = hangar.hangarConfig; Vector3 position = hangar.cameraRootTransform.Root.position; Vector3 a = hangar.hangarTankPosition.transform.position; a.y = position.y; Vector3 b = transform.position; b.y = position.y; Vector3 from = position - a; from.y = 0f; from.Normalize(); Vector3 to = b - a; to.y = 0f; to.Normalize(); float num = Vector3.Distance(a, position); float num2 = Vector3.Angle(from, to) * 0.01745329f; Vector3 vector8 = Vector3.Cross(to, from); Vector3 vector9 = ((from + to) / 2f).normalized * (num / Mathf.Cos(num2 / 2f)); float num4 = 3.141593f - num2; float num5 = (num * Mathf.Tan(num2 / 2f)) * num4; Vector3 vector10 = a + (to * num); float num6 = Vector3.Distance(vector10, b); if (num5 > num6) { num5 = 0f; } float num7 = hangarConfig.FlightToLocationTime / (num5 + num6); Vector3 vector11 = Vector3.Cross((Vector3)(hangar.cameraRootTransform.Root.rotation * Vector3.forward), (Vector3)(transform.rotation * Vector3.forward)); Quaternion quaternion = Quaternion.Slerp(hangar.cameraRootTransform.Root.rotation, transform.rotation, 0.5f); if ((MathUtil.Sign(vector8.y) > 0f) && (MathUtil.Sign(vector11.y) < 0f)) { quaternion = Quaternion.AngleAxis(180f, Vector3.up) * quaternion; } HangarCameraFlightDataComponent component = new HangarCameraFlightDataComponent { FlightTime = hangarConfig.FlightToLocationTime, ArcFlightPivotPoint = vector9, ArcFlightTime = num5 * num7 }; if (num5 > 0f) { component.ArcFlightAngleSpeed = ((num4 * 57.29578f) / component.ArcFlightTime) * MathUtil.Sign(vector8.y); } component.ArcToLinearPoint = vector10; component.LinearFlightTime = num6 * num7; component.OriginCameraRotation = hangar.cameraRootTransform.Root.rotation; component.OriginCameraPosition = hangar.cameraRootTransform.Root.position; component.MiddleCameraRotation = quaternion; component.DestinationCameraPosition = transform.position; component.DestinationCameraRotation = transform.rotation; component.StartFlightTime = UnityTime.time; if (hangar.Entity.HasComponent <HangarCameraFlightDataComponent>()) { hangar.Entity.RemoveComponent <HangarCameraFlightDataComponent>(); } hangar.Entity.AddComponent(component); hangar.hangarCameraViewState.Esm.ChangeState <HangarCameraViewState.FlightToLocationState>(); } }
public void SetRegionTransparent(NodeAddedEvent e, InvisibleBonusRegionNode region) { region.opacityBonusRegion.Opacity = 0f; }
public void Empty(NodeAddedEvent e, SingleNode <InventoryLimitBundleEffectsComponent> node) { }
public void HideActivateNotification(NodeAddedEvent e, SingleNode <ActiveNotificationComponent> notif, [JoinAll] SingleNode <Dialogs60Component> dialogs) { dialogs.component.Get <PremiumActivatedUIComponent>().HideImmediate(); }
public void Reset(NodeAddedEvent e, TankIncarnationNode tankIncarnation, [JoinByTank] SingleNode <DetachedWeaponComponent> weapon) { weapon.Entity.RemoveComponent <DetachedWeaponComponent>(); }
public void ShowPremiumActivatedDialog(NodeAddedEvent e, SingleNode <MainScreenComponent> homeScreen, PremiumBoostItemDurationChangedNode boostItem, [JoinByUser] SelfPremiumUserNode user, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens, [JoinAll] SingleNode <Dialogs60Component> dialogs) { Entity[] entities = new Entity[] { user.Entity, boostItem.Entity }; base.NewEvent <ShowPremiumActivatedDialogEvent>().AttachAll(entities).ScheduleDelayed(0f); }
public void SwitchToLoudWhenNewRoundInBattle(NodeAddedEvent e, ActiveRoundNode round, [Context, JoinByBattle] SelfBattleUserNode battleUser, [JoinAll] SoundListenerBattleStateNode listener) { this.SwitchToLoud(listener, listener.soundListenerBattleMixerSnapshotTransition.TransitionToLoudTimeInBattle); }
public void ActivatePremiumMainScreenActiveIcon(NodeAddedEvent e, SelfPremiumUserNode user, SingleNode <PremiumMainScreenButtonComponent> button) { button.component.ActivatePremium(); }
public void SwitchToSelfUserSnapshot(NodeAddedEvent e, SoundListenerSelfRankRewardStateNode listener) { this.Switch(listener, listener.soundListenerResources.Resources.SfxMixerSnapshots[listener.soundListenerBattleMixerSnapshots.SelfUserSnapshotIndex], 0f); }
public void ActivatePremiumQuestLine(NodeAddedEvent e, SelfPremiumQuestUserNode user, SingleNode <PremiumToolbarUiComponent> toolbar) { toolbar.component.ActivatePremiumTasks(); }
public void LockSlot(NodeAddedEvent e, SlotLockedNode slot, [JoinByModule] SingleNode <ItemButtonComponent> hud) { hud.component.LockByEMP(true); }
public void InitSemiActiveTransition(NodeAddedEvent e, SemiActiveTankNode tank, [Combine, Context, JoinByTank] RendererNode renderer) { base.ScheduleEvent(new AddTankShaderEffectEvent(ClientGraphicsConstants.TRANSPARENCY_TRANSITION_EFFECT, false), tank); base.ScheduleEvent <TransparencyInitEvent>(renderer); TankMaterialsUtil.SetAlpha(renderer.baseRenderer.Renderer, ClientGraphicsConstants.SEMI_TRANSPARENT_ALPHA); }
public void ShowRareText(NodeAddedEvent e, RareGarageListItemNode item) { item.garageListItemContent.RareTextVisibility = true; }
public void RequestSortedFriends(NodeAddedEvent e, InviteFriendsUINode inviteFriendsUi, [JoinAll] SingleNode <ClientSessionComponent> session) { base.ScheduleEvent <LoadSortedFriendsIdsWithNicknamesEvent>(session); }
public void ResetNonImagedItem(NodeAddedEvent e, GarageListNonImagedUserItemNode listItemNode, [JoinByParentGroup] MountedSkinNode skin) { string spriteUid = skin.imageItem.SpriteUid; listItemNode.garageListItemContent.AddPreview(spriteUid); }
public void ShowOnShopUserProfileDelayed(NodeAddedEvent e, SingleNode <ProfileScreenComponent> homeScreen, [JoinAll] UserWithIncompleteRegNode userWithIncompleteReg) { base.NewEvent <ShowScreenDownEvent <RegistrationScreenComponent> >().Attach(homeScreen).ScheduleDelayed(0f); }