Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Added GameTime
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenSauce committed Feb 24, 2021
1 parent e5d21b2 commit 4283cba
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MOBA-Manager/MOBA-Manager/Source/Game/MainGameEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public MainGameEngine(Session session)
public void ProceedGame()
{
CalculateDataUpdates();
//ContinueTime();
ContinueTime();
}

private void CalculateDataUpdates()
Expand Down Expand Up @@ -60,7 +60,7 @@ private void CalculatePlayerUpdates()

private void ContinueTime()
{
throw new NotImplementedException();
playerSession.GameTime = playerSession.GameTime.AddDays(3);
}

private void CalculateTransfers()
Expand Down
1 change: 1 addition & 0 deletions MOBA-Manager/MOBA-Manager/Source/Game/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class Session
public User MainPlayer { get => mainPlayer; set => mainPlayer = value; }
public List<Team> TeamList { get => teamList; set => teamList = value; }
public List<Player> BuyablePlayers { get; set; }
public DateTime GameTime { get; set; }

public Session()
{
Expand Down
3 changes: 1 addition & 2 deletions MOBA-Manager/MOBA-Manager/Source/Sound/SoundHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public static void LoadMusicIcons()
bi.EndInit();
speakerOff = bi;
}

public static void PlayMainMusic()
public static void PlayMainMusic()
{
m_mediaPlayer = new MediaPlayer();
m_mediaPlayer.Open(new Uri(@"D:\GitHub\MOBA-Manager\MOBA-Manager\MOBA-Manager\Sound\Doomsayer.wav", UriKind.RelativeOrAbsolute));
Expand Down
1 change: 1 addition & 0 deletions MOBA-Manager/MOBA-Manager/Source/UI/MainGame.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
<SolidColorBrush Color="Black" Opacity="0.2" />
</Rectangle.Fill>
</Rectangle>
<Label x:Name="DateLabel" Content="Label" HorizontalAlignment="Right" Margin="0,20,20,0" VerticalAlignment="Top" Style="{DynamicResource Header}"/>
</Grid>
</Page>
2 changes: 2 additions & 0 deletions MOBA-Manager/MOBA-Manager/Source/UI/MainGame.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public MainGame(MainGameEngine gameEngine)
private void SetupUI()
{
Switcher.ingameFrame = InMainGameFrame;
DateLabel.Content = this.playerSession.GameTime.Date.ToString("d");
InMainGameFrame.Navigate(new HomeScreenPage(this.playerSession));

}

private void AllPlayerButton_Click(object sender, RoutedEventArgs e)
Expand Down
2 changes: 2 additions & 0 deletions MOBA-Manager/MOBA-Manager/Source/Utilities/SessionDirector.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using MOBA_Manager.DataModel;
using MOBA_Manager.Source.DataModel;
using System;
using System.Collections.Generic;

namespace MOBA_Manager.Game
Expand Down Expand Up @@ -32,6 +33,7 @@ private void SetupSessionAndUI()
private void SetupSession()
{
this.session = new Session();
this.session.GameTime = new DateTime(2020, 1, 1);
LoadGameEntities();
}

Expand Down

0 comments on commit 4283cba

Please sign in to comment.