Beispiel #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            cityV.Close();
            bool running = cityV.worldView.controller.Enabled;

            PlayerWork();
            if (running)
            {
                cityV.worldView.controller.Start();
            }
        }
Beispiel #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            if (cityV.actionOptionList.SelectedIndex == -1)
            {
                return;
            }
            City selected = cityV.actionOptionList.SelectedItem as City;

            cityV.player.WorldPosition   = selected.position;
            cityV.player.Money.RawValue -= cost;
            World.Instance.ProgressTime(time);
            cityV.worldView.FocusOnPlayer();
            cityV.worldView.Render();
            cityV.Close();
            cityV.player.playerView.Render();
        }
Beispiel #3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            var player = cityV.worldView.player;

            player.caravan = cityV.actionOptionList.SelectedItem as CaravanRoute;
            if (player.caravan is null)
            {
                return;
            }
            player.troop.Image   = Resources.Caravan;
            player.spectatorMode = true;
            var route = AStar.FindOptimalRoute(World.Instance.MovementCost(), player.WorldPosition, player.caravan.end.position);

            cityV.worldView.ShowPlayerRoute(route);
            player.toMove = route.Skip(1).ToList();

            cityV.Close();
        }