private void AddRow(TeamScoreTableNode scoreTable, RoundUserNode roundUser) { Entity entity = scoreTable.scoreTable.AddRow().GetComponent <EntityBehaviour>().Entity; entity.AddComponent(new ScoreTableGroupComponent(scoreTable.scoreTableGroup.Key)); entity.AddComponent(new UserGroupComponent(roundUser.userGroup.Key)); }
public void InitPosition(NodeAddedEvent e, RoundUserNode roundUser, [Context, JoinByUser] UserRowNode userRow) { base.Log.DebugFormat("InitPosition roundUser={0} position={1}", roundUser.Entity.Id, roundUser.roundUserStatistics.Place); userRow.scoreTableRow.HidePosition(); userRow.scoreTableRow.Position = roundUser.roundUserStatistics.Place; userRow.scoreTableRow.SetLayoutDirty(); }
public void InitMeasuringOnRoundStart(NodeAddedEvent e, RoundUserNode roundUser, [Context, JoinByUser] BattleUserNode selfBattleUser, [JoinAll] StatisticsNode statistics) { PerformanceStatisticsHelperComponent performanceStatisticsHelper = statistics.performanceStatisticsHelper; PerformanceStatisticsSettingsComponent performanceStatisticsSettings = statistics.performanceStatisticsSettings; performanceStatisticsHelper.startRoundTimeInSec = UnityTime.realtimeSinceStartup; performanceStatisticsHelper.frames = new FramesCollection(performanceStatisticsSettings.HugeFrameDurationInMs, performanceStatisticsSettings.MeasuringIntervalInSec); performanceStatisticsHelper.tankCount = new StatisticCollection(50); }
public void AddUser(NodeAddedEvent e, [Combine] InitedScoreTable scoreTable, [Context, JoinByBattle, Combine] RoundUserNode roundUser) { ScoreTableRowComponent component = scoreTable.scoreTable.AddRow(); Entity entity = component.GetComponent <EntityBehaviour>().Entity; entity.AddComponent(new ScoreTableGroupComponent(scoreTable.scoreTableGroup.Key)); entity.AddComponent(new UserGroupComponent(roundUser.userGroup.Key)); foreach (ScoreTableRowIndicator indicator in component.indicators.Values) { EntityBehaviour behaviour = indicator.GetComponent <EntityBehaviour>(); if (behaviour != null) { behaviour.BuildEntity(entity); } } }
private void AddRow(InitedScoreTable scoreTable, RoundUserNode roundUser) { ScoreTableRowComponent component = scoreTable.scoreTable.AddRow(); Entity entity = component.GetComponent <EntityBehaviour>().Entity; entity.AddComponent(new ScoreTableGroupComponent(scoreTable.scoreTableGroup.Key)); entity.AddComponent(new UserGroupComponent(roundUser.userGroup.Key)); foreach (ScoreTableRowIndicator indicator in component.indicators.Values) { EntityBehaviour behaviour = indicator.GetComponent <EntityBehaviour>(); if (behaviour != null) { behaviour.BuildEntity(entity); } } }
public void SaveEquipment(NodeAddedEvent e, [Combine] RoundUserNode user, [Context, JoinByUser] HullNode hull, [Context, JoinByUser] TurretNode turret) { if (user.Entity.HasComponent <RoundUserEquipmentComponent>()) { RoundUserEquipmentComponent component = user.Entity.GetComponent <RoundUserEquipmentComponent>(); component.HullId = hull.marketItemGroup.Key; component.WeaponId = turret.marketItemGroup.Key; } else { RoundUserEquipmentComponent component = new RoundUserEquipmentComponent { HullId = hull.marketItemGroup.Key, WeaponId = turret.marketItemGroup.Key }; user.Entity.AddComponent(component); } }
public void AddUserToBattleSelectTable(NodeAddedEvent e, [Combine] TeamScoreTableNode scoreTable, [Context, JoinByBattle, Combine] RoundUserNode roundUser, [JoinByTeam] TeamNode teamNode, [JoinAll] SingleNode <BattleSelectScreenComponent> screen) { if (scoreTable.uiTeam.TeamColor == teamNode.teamColor.TeamColor) { this.AddRow(scoreTable, roundUser); } }
public void SetPosition(SetScoreTablePositionEvent e, RoundUserNode roundUser, [JoinByUser] UserRowNode userRow) { base.Log.DebugFormat("SetPosition roundUser={0} position={1}", roundUser.Entity.Id, e.Position); userRow.scoreTableRow.Position = e.Position; }
public void UpdateSelfScore(UpdateDMHUDScoreEvent e, BattleNode battle, [JoinByBattle] HUDNodes.SelfBattleUserNode self, [JoinByUser] RoundUserNode selfRoundUser, [JoinAll] SingleNode <DMScoreHUDComponent> hud) { hud.component.Place = selfRoundUser.roundUserStatistics.Place; hud.component.PlayerScore = selfRoundUser.roundUserStatistics.ScoreWithoutBonuses; }
public void UpdateScore(RoundUserStatisticsUpdatedEvent e, RoundUserNode roundUser, [JoinByBattle] BattleNode battle, [JoinByBattle] HUDNodes.SelfBattleUserNode selfBattleUser) { base.ScheduleEvent <UpdateDMHUDScoreEvent>(battle); }
public void OnUserExitBattle(NodeRemoveEvent e, RoundUserNode roundUser, [JoinByBattle] HUDNodes.SelfBattleUserNode self, [JoinByBattle] BattleNode battle) { base.NewEvent <UpdateDMHUDScoreEvent>().Attach(battle).ScheduleDelayed(0f); }
public void OnUserEnterBattle(NodeAddedEvent e, RoundUserNode roundUser, [JoinByBattle] HUDNodes.SelfBattleUserNode self, [JoinByBattle] BattleNode battle) { base.ScheduleEvent <UpdateDMHUDScoreEvent>(battle); }
public void PlayMelodyWhenSelfBattleUserInDM(DefineMelodyForRoundRestartEvent evt, SoundsListenerNode listener, SelfTankBattleUserNode battleUser, [JoinByUser] RoundUserNode selfRoundUser, [JoinByBattle] DMBattleNode dm, [JoinByBattle] ICollection <RoundUserNode> players, SingleNode <BattleSoundsAssetComponent> mapEffect) { List <RoundUserNode> list = players.ToList <RoundUserNode>(); if (list.Count == 1) { listener.Entity.AddComponent(new PlayingMelodyRoundRestartListenerComponent(mapEffect.component.BattleSoundsBehaviour.PlayNeutralMelody(listener.soundListener.transform, -1f))); } else { if (< > f__am$cache0 == null) {
public void NotifyAboutTakenGold(GoldTakenNotificationEvent e, BattleUserNode battleUser, [JoinByUser] UserNode user, [JoinByUser] RoundUserNode roundUser, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.GoldTakenMessage, "{user}", user.userRank.Rank, user.userUid.Uid, this.GetTeamColor(team, battleUser, combatEventLog)); combatEventLog.uiLog.UILog.AddMessage(messageText); }
public void KillStreakBattleLog(KillStreakEvent e, SingleNode <TankIncarnationKillStatisticsComponent> node, [JoinByUser] UserNode userNode, [JoinByUser] BattleUserNode battleUser, [JoinByUser] RoundUserNode roundUser, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog) { int kills = node.component.Kills; if ((kills >= 5) && ((kills % 5) == 0)) { string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.KillStreakMessage.Replace("{killNum}", kills.ToString()), "{user}", userNode.userRank.Rank, userNode.userUid.Uid, this.GetTeamColor(team, battleUser, combatEventLog)); combatEventLog.uiLog.UILog.AddMessage(messageText); } }