Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            this.Game = new Game("Unknown Team");

            this.Debug = new Debug(this, this.Game);
            welcomeWindow();
        }
Ejemplo n.º 2
0
        public ResultWindow(Game game, MainWindow mainWindow)
        {
            this.Game = game;
            this.MainWindow = mainWindow;

            this.Game.State = GameState.ScoreViewing;
            this.Game.Sounds.playTheme();

            this.show();
        }
Ejemplo n.º 3
0
        public GameWindow(Game game, MainWindow mainWindow)
        {
            this.Game = game;
            this.MainWindow = mainWindow;
            this.MainScaleTransform = new ScaleTransform(0.3, 0.3, 0, 0);

            this.Game.State = GameState.NameFilling;
            this.Game.Sounds.playTheme();

            show();
        }
Ejemplo n.º 4
0
 public Timer(Game game, int hours, int minutes, int secondes)
 {
     this.Game = game;
     this.StartTimer = new TimeSpan(hours, minutes, secondes);
     this.EndTimer = new TimeSpan(0, 0, 0);
     this.Interval = new TimeSpan(0, 0, -1);
     this.RemainingTime = this.StartTimer;
     this.Running = false;
     this.Dispatcher = new DispatcherTimer();
     this.Dispatcher.Interval = TimeSpan.FromSeconds(1);
     this.Dispatcher.Tick += timer_Tick;
 }
Ejemplo n.º 5
0
        public SoundManager(Game game)
        {
            this.Game = game;

            this.Playlist = new Dictionary<GameState, string>();
            this.Playlist.Add(GameState.Sleeping, "C:/tempConcours/welcomeMusic.wav");
            this.Playlist.Add(GameState.NameFilling, "C:/tempConcours/gameWindow.wav");
            this.Playlist.Add(GameState.Playing, "C:/tempConcours/mainTheme.wav");
            this.Playlist.Add(GameState.ScoreViewing, "C:/tempConcours/gameWindow.wav");

            this.Player = new SoundPlayer();    
        }
        public DisturbanceRepartition(PlayingGameWindow mainWindow, Game game, Disturbance disturbance)
        {
            this.MainWindow = mainWindow;
            this.Game = game;
            this.Disturbance = disturbance;
            this.labelList = new List<Label>();
            this.textBlockList = new List<TextBox>();

            //timer
            this.Timer = new Timer(this.Game, 0, 0, 6);
            this.Timer.FinalTick += Timer_FinalTick;
            this.Timer.Dispatcher.Tick += Dispatcher_Tick;
        }
Ejemplo n.º 7
0
        public WelcomeWindow(Game game, MainWindow mainWindow)
        {
            this.Game = game;
            this.MainWindow = mainWindow;
            this.MainScaleTransform = new ScaleTransform(0.3, 0.3, 0, 0);

            //test gesture
            var border = new Border();
            var tap = new TapProcessor();
            border.AddGesture(tap);

            this.Game.State = GameState.Sleeping;
            this.Game.Sounds.playTheme();

            show();
        }
        public PlayingGameWindow(Game game, MainWindow mainWindow)
        {
            this.Game = game;
            this.Game.Timer.Dispatcher.Tick += Dispatcher_Tick;
            this.Game.Timer.FinalTick += Timer_FinalTick;
            this.Game.Scores.ScoreUpdate += Scores_ScoreUpdate;
            this.Game.ResourceManager.ResourceProduction += ResourceManager_ResourceProduction;
            this.Game.ResourceManager.ResourceStock += ResourceManager_ResourceStock;
            this.MainWindow = mainWindow;

            this.Game.State = GameState.Playing;
            this.Game.Sounds.playTheme();

            this.MainScaleTransform = new ScaleTransform(0.3, 0.3, 0, 0);

            //Widgets
            this.actionHistoryLabels = new List<Label>();
            this.ressourcesSituationLabels = new List<Label>();

            show();
            this.Game.start();
        }