Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean m_FlagTimerON = false;
- private long TS_FlagTimer = System.currentTimeMillis();
- private int Delay_FlagTimer = 90;//seconds
- private boolean[] m_FlagTimerNotificationsChecks = new boolean[]{ false, false, false, false, false, false };
- private int[] m_FlagTimerNotificationsTimes = new int[]{ 30, 5, 4, 3, 2, 1 };
- private String[] m_FlagTimerNotifications = new String[]{"30 Seconds!"," - 5 - "," - 4 - "," - 3 - "," - 2 - "," - 1 - "};
- private int[] m_FlagTimerSoundCodes = new int[]{ 0, 26, 26, 26, 26, 26};
- private boolean m_InitialAnnounceSent = false;
- private String m_InitialAnnounce = "T20 BaseAttack starting in 1m 30s ! Hop in to join the fun.";
- private int m_InitialAnnounceSoundCode = 4;
- private String m_TimerEndAnnounce = "GO GO GO - Defend T20!.";
- private int m_TimerEndSoundCode = 104;
- private void baseGameFlagTimer()
- {
- if (!m_FlagTimerON) return;
- if (!m_InitialAnnounceSent)
- {
- m_InitialAnnounceSent = true;
- b.sendArenaMessage(m_InitialAnnounce,m_InitialAnnounceSoundCode);
- return;
- }
- long elapsed = System.currentTimeMillis() - TS_FlagTimer;
- for (int i = 0; i < m_FlagTimerNotificationsChecks.length; i+=1)
- {
- if (!m_FlagTimerNotificationsChecks[i] && (Delay_FlagTimer * 1000) - elapsed <= (m_FlagTimerNotificationsTimes[i]*1000))
- {
- int secs = m_FlagTimerNotificationsTimes[i];
- m_FlagTimerNotificationsChecks[i] = true;
- b.sendArenaMessage(m_FlagTimerNotifications[i],m_FlagTimerSoundCodes[i]);
- }
- }
- if (elapsed > (Delay_FlagTimer *1000))
- {
- m_FlagTimerON = false;
- TS_FlagTimer = System.currentTimeMillis();
- m_InitialAnnounceSent = false;
- b.sendArenaMessage(m_TimerEndAnnounce,m_TimerEndSoundCode);
- m_BGameOn = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment