Exemplo n.º 1
0
        public void OnBattleStart(NodeAddedEvent e, CombatEventLogNode combatEventLog, BattleUserNode battleUser, [JoinByBattle] SingleNode <DMComponent> dm)
        {
            string battleStartMessage = combatEventLog.combatLogDMMessages.BattleStartMessage;

            combatEventLog.uiLog.UILog.AddMessage(battleStartMessage);
        }
Exemplo n.º 2
0
        public void NotifyAboutUserExit(NodeRemoveEvent e, BattleUserNode battleUser, [JoinByUser, Context] UserNode user, [JoinByUser] BattleUserNode battleUser2Team, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog)
        {
            string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.UserLeaveBattleMessage, "{user}", user.userRank.Rank, user.userUid.Uid, this.GetTeamColor(team, battleUser, combatEventLog));

            combatEventLog.uiLog.UILog.AddMessage(messageText);
        }
Exemplo n.º 3
0
 public void OnUserAdded(NodeAddedEvent e, DMBattleUserNode battleUser, [JoinByUser] NotSelfUserNode userNode, [JoinByBattle] SingleNode <DMComponent> dm, [JoinAll] CombatEventLogNode combatEventLogNode)
 {
     this.AddUserAddedMessage(userNode, battleUser.colorInBattle.TeamColor, combatEventLogNode);
 }
Exemplo n.º 4
0
        public void NotifyAboutScheduledGold(GoldScheduledNotificationEvent evt, Node any, [JoinAll] CombatEventLogNode combatEventLog)
        {
            string messageText = !string.IsNullOrEmpty(evt.Sender) ? string.Format(combatEventLog.combatLogCommonMessages.UserGoldScheduledMessage, evt.Sender) : combatEventLog.combatLogCommonMessages.GoldScheduledMessage;

            combatEventLog.uiLog.UILog.AddMessage(messageText);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 private Color GetTeamColor(Optional <TeamNode> team, BattleUserNode battleUser, CombatEventLogNode combatEventLog) =>
 CombatEventLogUtil.GetTeamColor(this.GetColor(team, battleUser), combatEventLog.combatEventLog);
Exemplo n.º 7
0
        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);
            }
        }
Exemplo n.º 8
0
 public void ClearCombatLogOnExit(NodeRemoveEvent e, CombatEventLogNode combatEventLog)
 {
     combatEventLog.uiLog.UILog.Clear();
 }
Exemplo n.º 9
0
 public void DeactivateCombatLogOnExit(NodeRemoveEvent e, SingleNode <SelfBattleUserComponent> selfBattleUser, [JoinAll] CombatEventLogNode combatEventLog)
 {
     combatEventLog.Entity.RemoveComponent <ActiveCombatLogComponent>();
 }
Exemplo n.º 10
0
 public void ClearCombatLogOnEnter(NodeAddedEvent e, CombatEventLogNode combatEventLog)
 {
     combatEventLog.uiLog.UILog.Clear();
 }
Exemplo n.º 11
0
        private void AddUserAddedMessage(NotSelfUserNode userNode, TeamColor userTeamColor, CombatEventLogNode combatEventLogNode)
        {
            Color  teamColor   = CombatEventLogUtil.GetTeamColor(userTeamColor, combatEventLogNode.combatEventLog);
            string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLogNode.combatLogCommonMessages.UserJoinBattleMessage, "{user}", userNode.userRank.Rank, userNode.userUid.Uid, teamColor);

            combatEventLogNode.uiLog.UILog.AddMessage(messageText);
        }
Exemplo n.º 12
0
        public void ShowMessageOnUserSuicides(SelfDestructionBattleUserEvent e, BattleUserNode user, [JoinByUser] UserNode suicidedUser, BattleUserNode user2Team, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog)
        {
            Color  color       = this.GetTeamColor(team, user, combatEventLog);
            string messageText = CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.SuicideMessage, "{user}", suicidedUser.userRank.Rank, suicidedUser.userUid.Uid, color);

            combatEventLog.uiLog.UILog.AddMessage(messageText);
        }
Exemplo n.º 13
0
        public void ShowKilledMessage(ShowMessageAfterKilledEvent e, TankNode victimTank, [JoinByUser] UserNode victimUser, [JoinByUser] BattleUserNode user, TankNode victimTank2Team, [JoinByTeam] Optional <TeamNode> team, [JoinAll] CombatEventLogNode combatEventLog)
        {
            string messageText = CombatEventLogUtil.ApplyPlaceholder(CombatEventLogUtil.ApplyPlaceholder(combatEventLog.combatLogCommonMessages.KillMessage, "{victim}", victimUser.userRank.Rank, victimUser.userUid.Uid, this.GetTeamColor(team, user, combatEventLog)), "{killer}", e.killerRank, e.KillerUserUid, CombatEventLogUtil.GetTeamColor(e.killerTeam, combatEventLog.combatEventLog)).Replace("{killItem}", e.killerItem.ToString());

            combatEventLog.uiLog.UILog.AddMessage(messageText);
        }
Exemplo n.º 14
0
 public void OnUserAdded(NodeAddedEvent e, TeamBattleUserNode teamBattleUserNode, [JoinByUser] NotSelfUserNode userNode, TeamBattleUserNode teamBattleUser2Node, [JoinByTeam] TeamNode teamNode, [JoinAll] CombatEventLogNode combatEventLogNode)
 {
     this.AddUserAddedMessage(userNode, teamNode.colorInBattle.TeamColor, combatEventLogNode);
 }