Skip to content

Commit

Permalink
雲層、使用Wav檔(兔巴哥)
Browse files Browse the repository at this point in the history
  • Loading branch information
luiges90 committed Feb 20, 2019
1 parent ff84c2f commit d69bcc1
Show file tree
Hide file tree
Showing 28 changed files with 5,192 additions and 6,994 deletions.
8 changes: 7 additions & 1 deletion Content/Data/TextureRecs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ Content\Textures\Resources\Start\TextBox-Plus:png:TextBox-Plus:300:50:100:50:3:P
Content\Textures\Resources\Start\TextBox-Wide:png:TextBox-Wide:421:106:421:106:1:Page;
Content\Textures\Resources\Start\Back:png:Back:201:51:67:51:3:Scene;
Content\Textures\Resources\Start\Light:png:Light:35:35:35:35:1:Scene;
Content\Textures\Resources\Start\Setting:png:Setting:144:72:72:72:2:Scene
Content\Textures\Resources\Start\Setting:png:Setting:144:72:72:72:2:Scene;
Content\Textures\Resources\Start\Cloud1:png:Cloud1:663:391:663:391:1:Scene;
Content\Textures\Resources\Start\Cloud2:png:Cloud2:586:396:586:396:1:Scene;
Content\Textures\Resources\Start\Cloud3:png:Cloud3:466:351:466:351:1:Scene;
Content\Textures\Resources\Start\Cloud4:png:Cloud4:663:391:663:391:1:Scene;
Content\Textures\Resources\Start\Cloud5:png:Cloud5:586:396:586:396:1:Scene;
Content\Textures\Resources\Start\Cloud6:png:Cloud6:466:351:466:351:1:Scene
Binary file modified References/Win/Lidgren.Network.dll
Binary file not shown.
Binary file modified References/Win/MonoGame.Framework.Net.dll
Binary file not shown.
Binary file modified References/Win/MonoGame.Framework.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.DXGI.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.Direct2D1.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.Direct3D11.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.MediaFoundation.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.XAudio2.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.XInput.dll
Binary file not shown.
Binary file modified References/Win/SharpDX.dll
Binary file not shown.
2,327 changes: 1,172 additions & 1,155 deletions WorldOfTheThreeKingdoms.Android/WorldOfTheThreeKingdoms.Android.csproj

Large diffs are not rendered by default.

2,295 changes: 1,147 additions & 1,148 deletions WorldOfTheThreeKingdoms.Desktop/WorldOfTheThreeKingdoms.Desktop.csproj

Large diffs are not rendered by default.

2,203 changes: 2 additions & 2,201 deletions WorldOfTheThreeKingdoms.UWP/WorldOfTheThreeKingdoms.UWP.csproj

Large diffs are not rendered by default.

2,343 changes: 1,173 additions & 1,170 deletions WorldOfTheThreeKingdoms.iOS/WorldOfTheThreeKingdoms.iOS.csproj

Large diffs are not rendered by default.

209 changes: 107 additions & 102 deletions WorldOfTheThreeKingdoms.sln

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion WorldOfTheThreeKingdoms/GameManager/CacheManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ public static void DrawString(SpriteFont font, string text, Vector2 pos, Color c

public static void DrawString(SpriteFont font, string text, Vector2 pos, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth, bool checkTradition = false, bool upload = false)
{
if (font != null && !String.IsNullOrEmpty(text))
if (!String.IsNullOrEmpty(text))
{
text = CheckTextCache(font, text, checkTradition, upload);
//Session.Current.SpriteBatch.DrawString(font, text, pos * Scale, color, rotation, origin, scale * Scale, effects, layerDepth);
Expand Down
51 changes: 41 additions & 10 deletions WorldOfTheThreeKingdoms/GameManager/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,32 @@ public static GlobalVariables GlobalVariables
//public Parameters gameParameters = new Parameters();
//public GlobalVariables globalVariables = new GlobalVariables();

public static int ResolutionX = 925;
public static int ResolutionY = 520;
public static int ResolutionX
{
get
{
int resolutionX = 0;
if (!String.IsNullOrEmpty(Resolution) && Resolution.Contains("*"))
{
int.TryParse(Resolution.Split('*')[0].Trim(), out resolutionX);
}
return resolutionX;
}
}

public static int ResolutionY
{
get
{
int resolutionY = 0;
if (!String.IsNullOrEmpty(Resolution) && Resolution.Contains("*"))
{
int.TryParse(Resolution.Split('*')[1].Trim(), out resolutionY);
}
return resolutionY;
}
}

public static string Resolution
{
get
Expand All @@ -99,8 +123,6 @@ public static string Resolution
{
if (!String.IsNullOrEmpty(value) && value.Contains("*"))
{
int.TryParse(value.Split('*')[0].Trim(), out ResolutionX);
int.TryParse(value.Split('*')[1].Trim(), out ResolutionY);
if (Setting.Current != null)
{
Setting.Current.Resolution = value;
Expand Down Expand Up @@ -132,6 +154,7 @@ public SpriteFont FontE
{
get
{
return null;
if (fontE == null)
{
fontE = FontContent.Load<SpriteFont>("FontE");
Expand All @@ -148,6 +171,7 @@ public SpriteFont FontL
{
get
{
return null;
if (fontL == null)
{
fontL = FontContent.Load<SpriteFont>("FontL");
Expand All @@ -164,6 +188,7 @@ public SpriteFont FontS
{
get
{
return null;
if (fontS == null)
{
fontS = FontContent.Load<SpriteFont>("FontS");
Expand All @@ -180,6 +205,7 @@ public SpriteFont FontT
{
get
{
return null;
if (fontT == null)
{
fontT = FontContent.Load<SpriteFont>("FontT");
Expand All @@ -196,6 +222,7 @@ public SpriteFont Font
{
get
{
return null;
if (font == null)
{
Session.LoadFont(Setting.Current.Language);
Expand Down Expand Up @@ -343,7 +370,7 @@ public static void LoadContent(ContentManager content)
Current.SoundContent = new ContentManager(Current.Content.ServiceProvider, Current.Content.RootDirectory);
//Current.SoundContent.RootDirectory = "Content";

LoadFont(Setting.Current.Language);
//LoadFont(Setting.Current.Language);
}

public static void LoadFont(string language)
Expand Down Expand Up @@ -394,7 +421,10 @@ public static void ChangeDisplay(bool setScale)

if (Platform.PlatFormType == PlatFormType.Win || Platform.PlatFormType == PlatFormType.Desktop)
{
Session.Resolution = Platform.PreferResolution;
if (String.IsNullOrEmpty(Session.Resolution))
{
Session.Resolution = Platform.PreferResolution;
}

width = int.Parse(Session.Resolution.Split('*')[0]);
height = int.Parse(Session.Resolution.Split('*')[1]);
Expand All @@ -407,7 +437,6 @@ public static void ChangeDisplay(bool setScale)

//InputManager.Scale = new Vector2(screenscalex1, screenscaley1);

//Platform.SetGraphicsWidthHeight(width, height);
}
else if (Platform.PlatFormType == PlatFormType.Android || Platform.PlatFormType == PlatFormType.iOS || Platform.PlatFormType == PlatFormType.UWP)
{
Expand Down Expand Up @@ -454,7 +483,8 @@ public static void ChangeDisplay(bool setScale)
//screenScale = screenscalex >= screenscaley ? screenscaley : screenscalex;

InputManager.Scale1 = new Vector2(screenscalex1, screenscaley1);
InputManager.Scale2 = new Vector2(screenscalex2, screenscaley2);


//CoreGame.Current.SpriteScale = Matrix.CreateScale(screenScale, screenScale, 1);
//InputManager.Scale = new Vector2(screenScale, screenScale);

Expand All @@ -470,19 +500,20 @@ public static void ChangeDisplay(bool setScale)
InputManager.ScaleDraw = new Vector2(1, 1);
if (setScale)
{
InputManager.Scale2 = new Vector2(screenscalex2, screenscaley2);
Session.MainGame.disScale = true;
}
else
{
Session.MainGame.disScale = true;
Session.MainGame.disScale = false;
}

Session.MainGame.SpriteScale1 = Matrix.CreateScale(screenscalex1, screenscaley1, 1);
Session.MainGame.SpriteScale2 = Matrix.CreateScale(screenscalex2, screenscaley2, 1);

Platform.SetGraphicsWidthHeight(width, height);

//Platform.Current.ProcessViewChanged();
Platform.Current.ProcessViewChanged();

Platform.GraphicsApplyChanges();

Expand Down
2 changes: 2 additions & 0 deletions WorldOfTheThreeKingdoms/GamePlugins/AirViewPlugin/AirView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ private void screen_OnMouseLeftDown(Point position)
else if (this.IsMapShowing && StaticMethods.PointInRectangle(position, this.MapPosition))
{
this.JumpTo(position);
Session.MainGame.mainGameScreen.cloudLayer.Start();
}
}
}
Expand All @@ -328,6 +329,7 @@ private void screen_OnMouseMove(Point position, bool leftDown)
if (leftDown)
{
this.JumpTo(position);
Session.MainGame.mainGameScreen.cloudLayer.Start();
}
else if (this.isPreparedToJump)
{
Expand Down
30 changes: 28 additions & 2 deletions WorldOfTheThreeKingdoms/GameScreens/MainGameScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public partial class MainGameScreen : Screen

private bool mapEdited = false;

public CloudLayer cloudLayer;

public MainGameScreen()
: base()
{
Expand Down Expand Up @@ -110,6 +112,8 @@ public MainGameScreen()

this.screenManager = new ScreenManager();

this.cloudLayer = new CloudLayer();

//Session.Current.Scenario = new GameScenario(this);
//this.LoadCommonData();

Expand Down Expand Up @@ -263,12 +267,14 @@ private void Drawing(GameTime gameTime) //绘制游戏屏幕
this.mainMapLayer.Draw(base.viewportSize);
this.architectureLayer.Draw(base.viewportSize, gameTime);
this.routewayLayer.Draw(base.viewportSize);

this.cloudLayer.Draw();

this.tileAnimationLayer.Draw(base.viewportSize);

this.troopLayer.Draw(base.viewportSize, gameTime);

this.mapVeilLayer.Draw(base.viewportSize);

this.mapVeilLayer.Draw(base.viewportSize);

switch (base.UndoneWorks.Peek().Kind)
{
Expand Down Expand Up @@ -2770,6 +2776,26 @@ public override void Update(GameTime gameTime) //视野内容更新
this.CalculateFrameRate(gameTime);
this.Plugins.PersonBubblePlugin.Update(gameTime);

if (cloudLayer.IsVisible)
{
if (cloudLayer.IsStart)
{

}
else
{
if (this.mainMapLayer.DisplayingMapTiles.Exists(ma => ma == null || ma.TileTexture == null))
{

}
else
{
cloudLayer.IsStart = true;
}
}
cloudLayer.Update(Convert.ToSingle(gameTime.ElapsedGameTime.TotalSeconds));
}

switch (base.UndoneWorks.Peek().Kind)
{
case UndoneWorkKind.None:
Expand Down
Loading

0 comments on commit d69bcc1

Please sign in to comment.