-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
15,506 additions
and
42,466 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions
4
WorldOfTheThreeKingdoms.Android/Properties/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52,978 changes: 10,702 additions & 42,276 deletions
52,978
WorldOfTheThreeKingdoms.Android/WorldOfTheThreeKingdoms.Android.csproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
78 changes: 0 additions & 78 deletions
78
WorldOfTheThreeKingdoms.Pipeline/WorldOfTheThreeKingdoms.Pipeline.csproj
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
using Android.App; | ||
using Android.Content; | ||
using Android.Content.PM; | ||
using Android.Net; | ||
using Android.OS; | ||
using Android.Runtime; | ||
using Android.Util; | ||
using Android.Views; | ||
using Android.Widget; | ||
using Microsoft.Xna.Framework; | ||
using Java.Lang; | ||
using Android.Telephony; | ||
using System; | ||
using Android.Graphics; | ||
using Platforms; | ||
using Tools; | ||
|
||
namespace WorldOfTheThreeKingdoms.Android | ||
{ | ||
[Activity(Label = "中華三國志" | ||
, MainLauncher = true | ||
, Icon = "@drawable/icon" | ||
, Theme = "@android:style/Theme.NoTitleBar" //Translucent" //NoTitleBar "@style/Theme.Splash" | ||
, AlwaysRetainTaskState = true | ||
, ScreenOrientation = ScreenOrientation.Landscape | ||
//, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance | ||
//, ScreenOrientation = ScreenOrientation.SensorLandscape | ||
, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)] | ||
public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity | ||
{ | ||
protected override void OnCreate(Bundle bundle) | ||
{ | ||
try | ||
{ | ||
this.Window.AddFlags(WindowManagerFlags.Fullscreen); | ||
this.Window.AddFlags(WindowManagerFlags.KeepScreenOn); | ||
|
||
Platform.Activity1 = this; | ||
|
||
base.OnCreate(bundle); | ||
|
||
SetFullScreen(); | ||
|
||
AndroidEnvironment.UnhandledExceptionRaiser += (sender, args) => | ||
{ | ||
WebTools.TakeWarnMsg("UnhandledExceptionRaiser", "", args != null ? args.Exception : null); | ||
//Season.SeasonGame.err = args.Exception.ToString(); | ||
//SeasonTools.SendErrMsg("UnhandledExceptionRaiser", args != null ? args.Exception : null); | ||
//Game1.SendErrMsg("", args.Exception); | ||
// Do something... | ||
}; | ||
|
||
var g = new MainGame(); | ||
|
||
var view = (View)g.Services.GetService(typeof(View)); | ||
|
||
SetContentView(view);//SetContentView(g.Window); //temple remove | ||
g.Run(); | ||
|
||
} | ||
catch (System.Exception ex) | ||
{ | ||
//WebTools.TakeWarnMsg("OnCreate", "", ex); | ||
} | ||
} | ||
|
||
public void SetFullScreen() | ||
{ | ||
View decorView = Window.DecorView; | ||
var uiOptions = (int)decorView.SystemUiVisibility; | ||
var newUiOptions = (int)uiOptions; | ||
//newUiOptions |= (int)SystemUiFlags.LowProfile; | ||
//newUiOptions |= (int)SystemUiFlags.Fullscreen; | ||
//newUiOptions |= (int)SystemUiFlags.HideNavigation; | ||
//newUiOptions |= (int)SystemUiFlags.Immersive; | ||
//newUiOptions |= (int)SystemUiFlags.Fullscreen; | ||
//newUiOptions |= (int)SystemUiFlags.LayoutStable; | ||
//newUiOptions |= (int)SystemUiFlags.LayoutHideNavigation; | ||
//newUiOptions |= (int)SystemUiFlags.LayoutFullscreen; | ||
newUiOptions |= (int)SystemUiFlags.Fullscreen; | ||
newUiOptions |= (int)SystemUiFlags.HideNavigation; | ||
newUiOptions |= (int)SystemUiFlags.ImmersiveSticky; | ||
//("setSystemUiVisibility", SYSTEM_UI_FLAG_FULLSCREEN | SYSTEM_UI_FLAG_HIDE_NAVIGATION | SYSTEM_UI_FLAG_IMMERSIVE_STICKY); | ||
decorView.SystemUiVisibility = (StatusBarVisibility)newUiOptions; | ||
} | ||
|
||
public override void OnConfigurationChanged(global::Android.Content.Res.Configuration newConfig) | ||
{ | ||
base.OnConfigurationChanged(newConfig); | ||
} | ||
|
||
protected override void OnPause() | ||
{ | ||
//Session.PauseGame(); | ||
try | ||
{ | ||
base.OnPause(); | ||
} | ||
catch (System.Exception ex) | ||
{ | ||
WebTools.TakeWarnMsg("游戏暂停处理失败:" + "Activity1.OnPause", "Activity1.OnPause:", ex); | ||
} | ||
} | ||
|
||
protected override void OnResume() | ||
{ | ||
SetFullScreen(); | ||
|
||
//if (Session.InitReady) | ||
//{ | ||
// Session.ResumeGame(); | ||
//} | ||
base.OnResume(); | ||
} | ||
|
||
protected override void OnDestroy() | ||
{ | ||
// Call base method | ||
base.OnDestroy(); | ||
} | ||
|
||
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) | ||
{ | ||
Platform.Current.HandleActivityResult(requestCode, resultCode, data); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zhsan.threekingdoms" android:versionCode="1220" android:versionName="1.2.2.0" android:installLocation="auto"> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<application android:icon="@drawable/Icon" android:label="中華三國志"></application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.