Skip to content

Commit d69bcc1

Browse files
committed
雲層、使用Wav檔(兔巴哥)
1 parent ff84c2f commit d69bcc1

28 files changed

+5192
-6994
lines changed

Content/Data/TextureRecs.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ Content\Textures\Resources\Start\TextBox-Plus:png:TextBox-Plus:300:50:100:50:3:P
2222
Content\Textures\Resources\Start\TextBox-Wide:png:TextBox-Wide:421:106:421:106:1:Page;
2323
Content\Textures\Resources\Start\Back:png:Back:201:51:67:51:3:Scene;
2424
Content\Textures\Resources\Start\Light:png:Light:35:35:35:35:1:Scene;
25-
Content\Textures\Resources\Start\Setting:png:Setting:144:72:72:72:2:Scene
25+
Content\Textures\Resources\Start\Setting:png:Setting:144:72:72:72:2:Scene;
26+
Content\Textures\Resources\Start\Cloud1:png:Cloud1:663:391:663:391:1:Scene;
27+
Content\Textures\Resources\Start\Cloud2:png:Cloud2:586:396:586:396:1:Scene;
28+
Content\Textures\Resources\Start\Cloud3:png:Cloud3:466:351:466:351:1:Scene;
29+
Content\Textures\Resources\Start\Cloud4:png:Cloud4:663:391:663:391:1:Scene;
30+
Content\Textures\Resources\Start\Cloud5:png:Cloud5:586:396:586:396:1:Scene;
31+
Content\Textures\Resources\Start\Cloud6:png:Cloud6:466:351:466:351:1:Scene

References/Win/Lidgren.Network.dll

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

References/Win/MonoGame.Framework.dll

121 KB
Binary file not shown.

References/Win/SharpDX.DXGI.dll

48.5 KB
Binary file not shown.

References/Win/SharpDX.Direct2D1.dll

271 KB
Binary file not shown.

References/Win/SharpDX.Direct3D11.dll

112 KB
Binary file not shown.
-152 KB
Binary file not shown.

References/Win/SharpDX.XAudio2.dll

5.5 KB
Binary file not shown.

References/Win/SharpDX.XInput.dll

1.5 KB
Binary file not shown.

References/Win/SharpDX.dll

-274 KB
Binary file not shown.

WorldOfTheThreeKingdoms.Android/WorldOfTheThreeKingdoms.Android.csproj

+1,172-1,155
Large diffs are not rendered by default.

WorldOfTheThreeKingdoms.Desktop/WorldOfTheThreeKingdoms.Desktop.csproj

+1,147-1,148
Large diffs are not rendered by default.

WorldOfTheThreeKingdoms.UWP/WorldOfTheThreeKingdoms.UWP.csproj

+2-2,201
Large diffs are not rendered by default.

WorldOfTheThreeKingdoms.iOS/WorldOfTheThreeKingdoms.iOS.csproj

+1,173-1,170
Large diffs are not rendered by default.

WorldOfTheThreeKingdoms.sln

+107-102
Large diffs are not rendered by default.

WorldOfTheThreeKingdoms/GameManager/CacheManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ public static void DrawString(SpriteFont font, string text, Vector2 pos, Color c
594594

595595
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)
596596
{
597-
if (font != null && !String.IsNullOrEmpty(text))
597+
if (!String.IsNullOrEmpty(text))
598598
{
599599
text = CheckTextCache(font, text, checkTradition, upload);
600600
//Session.Current.SpriteBatch.DrawString(font, text, pos * Scale, color, rotation, origin, scale * Scale, effects, layerDepth);

WorldOfTheThreeKingdoms/GameManager/Session.cs

+41-10
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,32 @@ public static GlobalVariables GlobalVariables
8787
//public Parameters gameParameters = new Parameters();
8888
//public GlobalVariables globalVariables = new GlobalVariables();
8989

90-
public static int ResolutionX = 925;
91-
public static int ResolutionY = 520;
90+
public static int ResolutionX
91+
{
92+
get
93+
{
94+
int resolutionX = 0;
95+
if (!String.IsNullOrEmpty(Resolution) && Resolution.Contains("*"))
96+
{
97+
int.TryParse(Resolution.Split('*')[0].Trim(), out resolutionX);
98+
}
99+
return resolutionX;
100+
}
101+
}
102+
103+
public static int ResolutionY
104+
{
105+
get
106+
{
107+
int resolutionY = 0;
108+
if (!String.IsNullOrEmpty(Resolution) && Resolution.Contains("*"))
109+
{
110+
int.TryParse(Resolution.Split('*')[1].Trim(), out resolutionY);
111+
}
112+
return resolutionY;
113+
}
114+
}
115+
92116
public static string Resolution
93117
{
94118
get
@@ -99,8 +123,6 @@ public static string Resolution
99123
{
100124
if (!String.IsNullOrEmpty(value) && value.Contains("*"))
101125
{
102-
int.TryParse(value.Split('*')[0].Trim(), out ResolutionX);
103-
int.TryParse(value.Split('*')[1].Trim(), out ResolutionY);
104126
if (Setting.Current != null)
105127
{
106128
Setting.Current.Resolution = value;
@@ -132,6 +154,7 @@ public SpriteFont FontE
132154
{
133155
get
134156
{
157+
return null;
135158
if (fontE == null)
136159
{
137160
fontE = FontContent.Load<SpriteFont>("FontE");
@@ -148,6 +171,7 @@ public SpriteFont FontL
148171
{
149172
get
150173
{
174+
return null;
151175
if (fontL == null)
152176
{
153177
fontL = FontContent.Load<SpriteFont>("FontL");
@@ -164,6 +188,7 @@ public SpriteFont FontS
164188
{
165189
get
166190
{
191+
return null;
167192
if (fontS == null)
168193
{
169194
fontS = FontContent.Load<SpriteFont>("FontS");
@@ -180,6 +205,7 @@ public SpriteFont FontT
180205
{
181206
get
182207
{
208+
return null;
183209
if (fontT == null)
184210
{
185211
fontT = FontContent.Load<SpriteFont>("FontT");
@@ -196,6 +222,7 @@ public SpriteFont Font
196222
{
197223
get
198224
{
225+
return null;
199226
if (font == null)
200227
{
201228
Session.LoadFont(Setting.Current.Language);
@@ -343,7 +370,7 @@ public static void LoadContent(ContentManager content)
343370
Current.SoundContent = new ContentManager(Current.Content.ServiceProvider, Current.Content.RootDirectory);
344371
//Current.SoundContent.RootDirectory = "Content";
345372

346-
LoadFont(Setting.Current.Language);
373+
//LoadFont(Setting.Current.Language);
347374
}
348375

349376
public static void LoadFont(string language)
@@ -394,7 +421,10 @@ public static void ChangeDisplay(bool setScale)
394421

395422
if (Platform.PlatFormType == PlatFormType.Win || Platform.PlatFormType == PlatFormType.Desktop)
396423
{
397-
Session.Resolution = Platform.PreferResolution;
424+
if (String.IsNullOrEmpty(Session.Resolution))
425+
{
426+
Session.Resolution = Platform.PreferResolution;
427+
}
398428

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

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

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

456485
InputManager.Scale1 = new Vector2(screenscalex1, screenscaley1);
457-
InputManager.Scale2 = new Vector2(screenscalex2, screenscaley2);
486+
487+
458488
//CoreGame.Current.SpriteScale = Matrix.CreateScale(screenScale, screenScale, 1);
459489
//InputManager.Scale = new Vector2(screenScale, screenScale);
460490

@@ -470,19 +500,20 @@ public static void ChangeDisplay(bool setScale)
470500
InputManager.ScaleDraw = new Vector2(1, 1);
471501
if (setScale)
472502
{
503+
InputManager.Scale2 = new Vector2(screenscalex2, screenscaley2);
473504
Session.MainGame.disScale = true;
474505
}
475506
else
476507
{
477-
Session.MainGame.disScale = true;
508+
Session.MainGame.disScale = false;
478509
}
479510

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

483514
Platform.SetGraphicsWidthHeight(width, height);
484515

485-
//Platform.Current.ProcessViewChanged();
516+
Platform.Current.ProcessViewChanged();
486517

487518
Platform.GraphicsApplyChanges();
488519

WorldOfTheThreeKingdoms/GamePlugins/AirViewPlugin/AirView.cs

+2
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ private void screen_OnMouseLeftDown(Point position)
304304
else if (this.IsMapShowing && StaticMethods.PointInRectangle(position, this.MapPosition))
305305
{
306306
this.JumpTo(position);
307+
Session.MainGame.mainGameScreen.cloudLayer.Start();
307308
}
308309
}
309310
}
@@ -328,6 +329,7 @@ private void screen_OnMouseMove(Point position, bool leftDown)
328329
if (leftDown)
329330
{
330331
this.JumpTo(position);
332+
Session.MainGame.mainGameScreen.cloudLayer.Start();
331333
}
332334
else if (this.isPreparedToJump)
333335
{

WorldOfTheThreeKingdoms/GameScreens/MainGameScreen.cs

+28-2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ public partial class MainGameScreen : Screen
7777

7878
private bool mapEdited = false;
7979

80+
public CloudLayer cloudLayer;
81+
8082
public MainGameScreen()
8183
: base()
8284
{
@@ -110,6 +112,8 @@ public MainGameScreen()
110112

111113
this.screenManager = new ScreenManager();
112114

115+
this.cloudLayer = new CloudLayer();
116+
113117
//Session.Current.Scenario = new GameScenario(this);
114118
//this.LoadCommonData();
115119

@@ -263,12 +267,14 @@ private void Drawing(GameTime gameTime) //绘制游戏屏幕
263267
this.mainMapLayer.Draw(base.viewportSize);
264268
this.architectureLayer.Draw(base.viewportSize, gameTime);
265269
this.routewayLayer.Draw(base.viewportSize);
270+
271+
this.cloudLayer.Draw();
272+
266273
this.tileAnimationLayer.Draw(base.viewportSize);
267274

268275
this.troopLayer.Draw(base.viewportSize, gameTime);
269-
270-
this.mapVeilLayer.Draw(base.viewportSize);
271276

277+
this.mapVeilLayer.Draw(base.viewportSize);
272278

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

2779+
if (cloudLayer.IsVisible)
2780+
{
2781+
if (cloudLayer.IsStart)
2782+
{
2783+
2784+
}
2785+
else
2786+
{
2787+
if (this.mainMapLayer.DisplayingMapTiles.Exists(ma => ma == null || ma.TileTexture == null))
2788+
{
2789+
2790+
}
2791+
else
2792+
{
2793+
cloudLayer.IsStart = true;
2794+
}
2795+
}
2796+
cloudLayer.Update(Convert.ToSingle(gameTime.ElapsedGameTime.TotalSeconds));
2797+
}
2798+
27732799
switch (base.UndoneWorks.Peek().Kind)
27742800
{
27752801
case UndoneWorkKind.None:

0 commit comments

Comments
 (0)