Commit 05052a95 authored by Unicorn369's avatar Unicorn369

fix

parent 7421f5d8
......@@ -241,12 +241,12 @@ public class SuperScrollView
caculateMoveFloat();
float now = panel.clipOffset.y + moveFloat;
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)
{
lastForce = false;
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++)
{
if (i >= (int)(min / heightOfEach) && i <= (int)(max / heightOfEach))
......
......@@ -449,7 +449,7 @@ public class Ocgcore : ServantWithCardDescription
case Condition.duel:
SetBar(Program.I().new_bar_duel, 0, 0);
UIHelper.registEvent(toolBar, "input_", onChat);
UIHelper.registEvent(toolBar, "gg_", onDuelResultConfirmed);
UIHelper.registEvent(toolBar, "gg_", onSurrender);
UIHelper.registEvent(toolBar, "left_", on_left);
UIHelper.registEvent(toolBar, "right_", on_right);
UIHelper.registEvent(toolBar, "rush_", on_rush);
......@@ -770,6 +770,21 @@ public class Ocgcore : ServantWithCardDescription
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 void onChat()
......@@ -8894,7 +8909,23 @@ public class Ocgcore : ServantWithCardDescription
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" });
return;
}
private void sendSorted()
......
......@@ -88,6 +88,10 @@ public class RoomList : WindowServantSP
{
onSelected();
}
else
{
Program.PrintToChat(InterString.Get("抱歉!您尚未选择房间。"));
}
}
void onSelected()
......
......@@ -746,7 +746,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 196122}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 2, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 428902}
......@@ -1574,29 +1574,29 @@ MonoBehaviour:
leftAnchor:
target: {fileID: 419752}
relative: 0
absolute: 0
absolute: 20
rightAnchor:
target: {fileID: 419752}
relative: 1
absolute: 0
absolute: -15
bottomAnchor:
target: {fileID: 419752}
relative: 0
absolute: 0
absolute: 24
topAnchor:
target: {fileID: 419752}
relative: 1
absolute: 0
absolute: -22
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 600
mHeight: 680
mWidth: 565
mHeight: 634
mDepth: -100
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 0.88235295
aspectRatio: 0.8612805
mType: 0
mFillDirection: 4
mFillAmount: 1
......
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