Commit 7348adec authored by Unicorn369's avatar Unicorn369

Merge branch 'Test' of https://github.com/Unicorn369/YGOPro2_Droid into Android

parents 0123822f 77606b74
...@@ -241,12 +241,12 @@ public class SuperScrollView ...@@ -241,12 +241,12 @@ public class SuperScrollView
caculateMoveFloat(); caculateMoveFloat();
float now = panel.clipOffset.y + moveFloat; float now = panel.clipOffset.y + moveFloat;
scrollBar.value = now / maxFloat; scrollBar.value = now / maxFloat;
float min = -panel.clipOffset.y - 500; float min = -panel.clipOffset.y - (Screen.height / 2 + 100);
if (Math.Abs(min - lastMin) > 40 || Items.Count<100||lastForce) if (Math.Abs(min - lastMin) > 40 || Items.Count<100||lastForce)
{ {
lastForce = false; lastForce = false;
lastMin = min; lastMin = min;
float max = -panel.clipOffset.y + panel.GetViewSize().y + 500; float max = -panel.clipOffset.y + panel.GetViewSize().y + (Screen.height / 2 + 100);
for (int i = 0; i < Items.Count; i++) for (int i = 0; i < Items.Count; i++)
{ {
if (i >= (int)(min / heightOfEach) && i <= (int)(max / heightOfEach)) if (i >= (int)(min / heightOfEach) && i <= (int)(max / heightOfEach))
......
...@@ -449,7 +449,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -449,7 +449,7 @@ public class Ocgcore : ServantWithCardDescription
case Condition.duel: case Condition.duel:
SetBar(Program.I().new_bar_duel, 0, 0); SetBar(Program.I().new_bar_duel, 0, 0);
UIHelper.registEvent(toolBar, "input_", onChat); UIHelper.registEvent(toolBar, "input_", onChat);
UIHelper.registEvent(toolBar, "gg_", onDuelResultConfirmed); UIHelper.registEvent(toolBar, "gg_", onSurrender);
UIHelper.registEvent(toolBar, "left_", on_left); UIHelper.registEvent(toolBar, "left_", on_left);
UIHelper.registEvent(toolBar, "right_", on_right); UIHelper.registEvent(toolBar, "right_", on_right);
UIHelper.registEvent(toolBar, "rush_", on_rush); UIHelper.registEvent(toolBar, "rush_", on_rush);
...@@ -770,6 +770,21 @@ public class Ocgcore : ServantWithCardDescription ...@@ -770,6 +770,21 @@ public class Ocgcore : ServantWithCardDescription
returnTo(); returnTo();
} }
public void onEmergencyExit()
{
if (TcpHelper.tcpClient != null)
{
/*if (TcpHelper.tcpClient.Connected)
{
Program.I().ocgcore.returnServant = Program.I().selectServer;
TcpHelper.tcpClient.Client.Shutdown(0);
TcpHelper.tcpClient.Close();
} */
TcpHelper.tcpClient = null;
}
returnTo();
}
public bool surrended = false; public bool surrended = false;
public void onChat() public void onChat()
...@@ -8894,7 +8909,23 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8894,7 +8909,23 @@ public class Ocgcore : ServantWithCardDescription
return; return;
} }
//RMSshow_yesOrNoForce(InterString.Get("你确定要投降吗?"), new messageSystemValue { value = "yes", hint = "yes" }, new messageSystemValue { value = "no", hint = "no" });
surrended = false;
Program.I().room.duelEnded = false;
Program.I().room.needSide = false;
Program.I().room.sideWaitingObserver = false;
onEmergencyExit();
return;
}
void onSurrender() {
if (Program.I().room.duelEnded == true || surrended || TcpHelper.tcpClient == null || TcpHelper.tcpClient.Connected == false || Program.I().room.needSide == true || condition != Condition.duel)
{
onDuelResultConfirmed();
return;
}
RMSshow_yesOrNoForce(InterString.Get("你确定要投降吗?"), new messageSystemValue { value = "yes", hint = "yes" }, new messageSystemValue { value = "no", hint = "no" }); RMSshow_yesOrNoForce(InterString.Get("你确定要投降吗?"), new messageSystemValue { value = "yes", hint = "yes" }, new messageSystemValue { value = "no", hint = "no" });
return;
} }
private void sendSorted() private void sendSorted()
......
...@@ -1081,7 +1081,7 @@ public class Program : MonoBehaviour ...@@ -1081,7 +1081,7 @@ public class Program : MonoBehaviour
_padScroll = 0; _padScroll = 0;
} }
GUI.Label(new Rect(10, 5, 200, 200), "[Ver 2.2.5] " + "FPS: " + m_FPS); GUI.Label(new Rect(10, 5, 200, 200), "[Ver 2.2.7] " + "FPS: " + m_FPS);
} }
void Update() void Update()
......
...@@ -14,6 +14,8 @@ public class RoomList : WindowServantSP ...@@ -14,6 +14,8 @@ public class RoomList : WindowServantSP
createWindow(Program.I().new_ui_RoomList); createWindow(Program.I().new_ui_RoomList);
UIHelper.registEvent(gameObject, "exit_", onClickExit); UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "refresh_", onRefresh); UIHelper.registEvent(gameObject, "refresh_", onRefresh);
//UIHelper.getByName(gameObject, "join").SetActive(false);
UIHelper.registEvent(gameObject, "join_", onJoin);
roomPSWLabel = UIHelper.getByName<UILabel>(gameObject, "roomNameLabel"); roomPSWLabel = UIHelper.getByName<UILabel>(gameObject, "roomNameLabel");
hideAI =UIHelper.getByName<UIToggle>(gameObject, "hideAIrooms_").value = UIHelper.fromStringToBool(Config.Get("hideAIrooms_", "1")); hideAI =UIHelper.getByName<UIToggle>(gameObject, "hideAIrooms_").value = UIHelper.fromStringToBool(Config.Get("hideAIrooms_", "1"));
hideStarted=UIHelper.getByName<UIToggle>(gameObject, "hideStarted_").value = UIHelper.fromStringToBool(Config.Get("hideStarted_", "1")); hideStarted=UIHelper.getByName<UIToggle>(gameObject, "hideStarted_").value = UIHelper.fromStringToBool(Config.Get("hideStarted_", "1"));
...@@ -44,10 +46,12 @@ public class RoomList : WindowServantSP ...@@ -44,10 +46,12 @@ public class RoomList : WindowServantSP
listOfRooms.Clear(); listOfRooms.Clear();
listOfRooms.AddRange(roomList); listOfRooms.AddRange(roomList);
printFile(); printFile();
Program.I().selectServer.onHide(true);
} }
public void onClickExit() public void onClickExit()
{ {
hide(); hide();
Program.I().selectServer.onHide(false);
} }
public override void hide() public override void hide()
{ {
...@@ -77,6 +81,19 @@ public class RoomList : WindowServantSP ...@@ -77,6 +81,19 @@ public class RoomList : WindowServantSP
} }
string selectedString = string.Empty; string selectedString = string.Empty;
void onJoin()
{
if (roomPSWLabel.text != "")
{
onSelected();
}
else
{
Program.PrintToChat(InterString.Get("抱歉!您尚未选择房间。"));
}
}
void onSelected() void onSelected()
{ {
if (!isShowed) if (!isShowed)
...@@ -99,7 +116,7 @@ public class RoomList : WindowServantSP ...@@ -99,7 +116,7 @@ public class RoomList : WindowServantSP
else else
{ {
roomPSWLabel.text = ""; roomPSWLabel.text = "";
} }
} }
void JoinRoom(string selectedString,string roomPsw) void JoinRoom(string selectedString,string roomPsw)
......
...@@ -288,6 +288,11 @@ public class SelectServer : WindowServantSP ...@@ -288,6 +288,11 @@ public class SelectServer : WindowServantSP
KF_onlineGame(Name, ipString, portString, versionString, pswString); KF_onlineGame(Name, ipString, portString, versionString, pswString);
} }
public void onHide(bool Bool)
{
gameObject.SetActive(!Bool);
}
public void KF_onlineGame(string Name, string ipString, string portString, string versionString, string pswString = "") public void KF_onlineGame(string Name, string ipString, string portString, string versionString, string pswString = "")
{ {
name = Name; name = Name;
......
This diff is collapsed.
...@@ -763,7 +763,7 @@ Transform: ...@@ -763,7 +763,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 137516} m_GameObject: {fileID: 137516}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 361, y: 233, z: 0} m_LocalPosition: {x: 336, y: 233, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 410166} m_Father: {fileID: 410166}
...@@ -901,7 +901,7 @@ Transform: ...@@ -901,7 +901,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 152882} m_GameObject: {fileID: 152882}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -20, y: 70, z: 0} m_LocalPosition: {x: -25, y: 70, z: 0}
m_LocalScale: {x: 1.4325861, y: 1.4325869, z: 1.4325869} m_LocalScale: {x: 1.4325861, y: 1.4325869, z: 1.4325869}
m_Children: m_Children:
- {fileID: 483958} - {fileID: 483958}
...@@ -943,7 +943,7 @@ Transform: ...@@ -943,7 +943,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000} m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 161550} m_GameObject: {fileID: 161550}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 96, y: 156, z: 0} m_LocalPosition: {x: 90, y: 156, z: 0}
m_LocalScale: {x: 1.4325861, y: 1.4325869, z: 1.4325869} m_LocalScale: {x: 1.4325861, y: 1.4325869, z: 1.4325869}
m_Children: m_Children:
- {fileID: 413236} - {fileID: 413236}
...@@ -1188,7 +1188,7 @@ BoxCollider: ...@@ -1188,7 +1188,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 780, y: 540, z: 0} m_Size: {x: 730, y: 540, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!65 &6540492 --- !u!65 &6540492
BoxCollider: BoxCollider:
...@@ -1485,13 +1485,13 @@ MonoBehaviour: ...@@ -1485,13 +1485,13 @@ MonoBehaviour:
updateAnchors: 1 updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1} mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4 mPivot: 4
mWidth: 748 mWidth: 698
mHeight: 5 mHeight: 5
mDepth: 2 mDepth: 2
autoResizeBoxCollider: 0 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 149.6 aspectRatio: 139.6
mType: 0 mType: 0
mFillDirection: 4 mFillDirection: 4
mFillAmount: 1 mFillAmount: 1
...@@ -2297,13 +2297,13 @@ MonoBehaviour: ...@@ -2297,13 +2297,13 @@ MonoBehaviour:
updateAnchors: 1 updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1} mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4 mPivot: 4
mWidth: 710 mWidth: 660
mHeight: 22 mHeight: 22
mDepth: 1 mDepth: 1
autoResizeBoxCollider: 0 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 32.272728 aspectRatio: 30
keepCrispWhenShrunk: 1 keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} mTrueTypeFont: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
mFont: {fileID: 0} mFont: {fileID: 0}
...@@ -2866,13 +2866,13 @@ MonoBehaviour: ...@@ -2866,13 +2866,13 @@ MonoBehaviour:
updateAnchors: 1 updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1} mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4 mPivot: 4
mWidth: 744 mWidth: 694
mHeight: 490 mHeight: 490
mDepth: -100 mDepth: -100
autoResizeBoxCollider: 0 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5183673 aspectRatio: 1.4163265
mType: 0 mType: 0
mFillDirection: 4 mFillDirection: 4
mFillAmount: 1 mFillAmount: 1
...@@ -3100,13 +3100,13 @@ MonoBehaviour: ...@@ -3100,13 +3100,13 @@ MonoBehaviour:
updateAnchors: 1 updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1} mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4 mPivot: 4
mWidth: 780 mWidth: 730
mHeight: 540 mHeight: 540
mDepth: 0 mDepth: 0
autoResizeBoxCollider: 1 autoResizeBoxCollider: 1
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.4444444 aspectRatio: 1.3518518
mType: 1 mType: 1
mFillDirection: 4 mFillDirection: 4
mFillAmount: 1 mFillAmount: 1
...@@ -3160,7 +3160,7 @@ MonoBehaviour: ...@@ -3160,7 +3160,7 @@ MonoBehaviour:
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
mClipRange: {x: 0, y: 0, z: 780, w: 540} mClipRange: {x: 0, y: 0, z: 730, w: 540}
mClipSoftness: {x: 0, y: 0} mClipSoftness: {x: 0, y: 0}
mDepth: 10 mDepth: 10
mSortingOrder: 0 mSortingOrder: 0
......
...@@ -15,7 +15,7 @@ PlayerSettings: ...@@ -15,7 +15,7 @@ PlayerSettings:
defaultCursor: {fileID: 0} defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0} cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1} m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1}
m_ShowUnitySplashScreen: 0 m_ShowUnitySplashScreen: 1
m_ShowUnitySplashLogo: 1 m_ShowUnitySplashLogo: 1
m_SplashScreenOverlayOpacity: 1 m_SplashScreenOverlayOpacity: 1
m_SplashScreenAnimation: 1 m_SplashScreenAnimation: 1
...@@ -123,7 +123,7 @@ PlayerSettings: ...@@ -123,7 +123,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 2.2.5 (1.034.9) bundleVersion: 2.2.7 (1.034.9)
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1
...@@ -148,7 +148,7 @@ PlayerSettings: ...@@ -148,7 +148,7 @@ PlayerSettings:
tvOS: cn.ygopro2.ygopro2android tvOS: cn.ygopro2.ygopro2android
buildNumber: buildNumber:
iOS: iOS:
AndroidBundleVersionCode: 8 AndroidBundleVersionCode: 10
AndroidMinSdkVersion: 16 AndroidMinSdkVersion: 16
AndroidTargetSdkVersion: 0 AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 0 AndroidPreferredInstallLocation: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment