70 lines
1.6 KiB
C#
70 lines
1.6 KiB
C#
using StgSharp;
|
|
using StgSharp.Control;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace StgSharpDemo
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
private Stopwatch mainTimer;
|
|
private char[] battleFieldString = new char[1*35];
|
|
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void GameStart_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
StartGame();
|
|
|
|
}
|
|
|
|
private void InitializeGame()
|
|
{
|
|
Point leftTop = new Point(0,0);
|
|
Point leftBottom = new Point(0,0);
|
|
|
|
/*
|
|
Line left = new Line(leftTop,);
|
|
Pool pool = new Pool();
|
|
Add.Pool(pool);
|
|
*/
|
|
|
|
battleFieldString[1] = '⬜';
|
|
}
|
|
|
|
//启动游戏
|
|
private void StartGame()
|
|
{
|
|
|
|
mainTimer = Stopwatch.StartNew();
|
|
mainTimer.Start();
|
|
TimeSpan span = mainTimer.Elapsed;
|
|
do
|
|
{
|
|
GameTimeLine.tickCounter.QuickAdd();
|
|
|
|
|
|
} while (span.TotalSeconds*2 == GameTimeLine.tickCounter.Value);
|
|
}
|
|
}
|
|
}
|