public bool TimeExpired(string id)
        {
            MapTimer timer = Field.GetMapTimer(id);

            if (timer == null || timer.EndTick >= Environment.TickCount)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
 private void Window_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (IsVisible)
     {
         MapTimer.Start();
     }
     else
     {
         MapTimer.Stop();
     }
 }
Beispiel #3
0
        public void AddMapTimer(MapTimer timer)
        {
            MapTimer existingTimer = MapTimers.FirstOrDefault(x => x.Id == timer.Id);

            if (existingTimer != null)
            {
                existingTimer = timer;
                return;
            }

            MapTimers.Add(timer);
        }
Beispiel #4
0
        public override DCFG Export()
        {
            MapTimer data = new MapTimer();

            data.ID           = ID;
            data.TriggerTime  = TriggerTime;
            data.TriggerLoops = TriggerLoops;
            for (int i = 0; i < TriggerEvents.Count; i++)
            {
                data.TriggerEvents.Add(TriggerEvents[i].ID);
            }
            return(data);
        }
        public void SetTimer(string id, int time, bool clearAtZero, bool display, int arg5, string arg6)
        {
            int      msTime  = time * 1000;
            int      endTick = Environment.TickCount + msTime;
            MapTimer timer   = Field.GetMapTimer(id);

            if (timer == null)
            {
                MapTimer newTimer = new MapTimer(id, endTick);
                Field.AddMapTimer(newTimer);
                Field.BroadcastPacket(TriggerPacket.Timer(msTime, clearAtZero, display));
                return;
            }
            timer.EndTick = endTick;
            Field.BroadcastPacket(TriggerPacket.Timer(msTime, clearAtZero, display));
        }
Beispiel #6
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            MapTimer.Start();
            gridSidemenu.Visibility = Visibility.Collapsed;

            checkboxRenderCurrentPath.IsChecked = AmeisenBot.Config.MapRenderCurrentPath;
            checkboxRenderDungeonPath.IsChecked = AmeisenBot.Config.MapRenderDungeonNodes;
            checkboxRenderHerbs.IsChecked       = AmeisenBot.Config.MapRenderHerbs;
            checkboxRenderMe.IsChecked          = AmeisenBot.Config.MapRenderMe;
            checkboxRenderOres.IsChecked        = AmeisenBot.Config.MapRenderOres;
            checkboxRenderPlayerInfo.IsChecked  = AmeisenBot.Config.MapRenderPlayerExtra;
            checkboxRenderPlayerNames.IsChecked = AmeisenBot.Config.MapRenderPlayerNames;
            checkboxRenderPlayers.IsChecked     = AmeisenBot.Config.MapRenderPlayers;
            checkboxRenderUnitInfo.IsChecked    = AmeisenBot.Config.MapRenderUnitExtra;
            checkboxRenderUnitNames.IsChecked   = AmeisenBot.Config.MapRenderUnitNames;
            checkboxRenderUnits.IsChecked       = AmeisenBot.Config.MapRenderUnits;
        }
Beispiel #7
0
        public override void Import(DCFG cfg)
        {
            MapTimer data = cfg as MapTimer;

            this.ID           = data.ID;
            this.TriggerTime  = data.TriggerTime;
            this.TriggerLoops = data.TriggerLoops;
            FTGroupEvent group = Map.GetGroup <FTGroupEvent>();

            for (int i = 0; i < data.TriggerEvents.Count; i++)
            {
                FTEvent e = group.GetElement(data.TriggerEvents[i]);
                if (e != null)
                {
                    TriggerEvents.Add(e);
                }
            }
        }
        /// <summary>
        /// Initialize this GameplayEngineView with new UI elements.
        /// </summary>
        public void Init()
        {
            // Initialize UI depending on skin config
            crosshair = GetGameplayEngine().Crosshair;

            AddTextDisplayElement("Score");
            AddTextDisplayElement("Acc");
            AddTextDisplayElement("Combo");

            SetUpJudgeBox();

            SetUpAccMeter();

            background = GetGameplayEngine().Background;

            // Todo make fill direction skinnable
            mapTimer = new MapTimer(GetGameplayEngine().MapEndTime, FillBarDirection.UpToDown);
        }
Beispiel #9
0
 private void Window_Unloaded(object sender, RoutedEventArgs e)
 {
     MapTimer.Stop();
 }
Beispiel #10
0
 private void ButtonExit_Click(object sender, RoutedEventArgs e)
 {
     MapTimer.Stop();
     Hide();
 }
    public bool TimeExpired(string id)
    {
        MapTimer timer = Field.GetMapTimer(id);

        return(timer != null && timer.EndTick < Environment.TickCount);
    }
Beispiel #12
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     MapTimer.Start();
 }