Commit e5be96be authored by nanahira's avatar nanahira

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

parents 654e5b06 d8d6f2c2
......@@ -330,8 +330,16 @@ public class gameInfo : MonoBehaviour
opponent.under.mainTexture = GameTextureManager.exBar;
me.under.mainTexture = GameTextureManager.bar;
}
me.api_timeHint.text = "paused";
opponent.api_timeHint.text = "paused";
if (Program.I().ocgcore.timeLimit == 0)
{
me.api_timeHint.text = "infinite";
opponent.api_timeHint.text = "infinite";
}
else
{
me.api_timeHint.text = "paused";
opponent.api_timeHint.text = "paused";
}
}
public bool amIdanger()
......@@ -341,6 +349,10 @@ public class gameInfo : MonoBehaviour
void setTimeAbsolutely(int player, int t)
{
if (Program.I().ocgcore.timeLimit == 0)
{
return;
}
if (player == 0)
{
me.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString();
......
......@@ -15,7 +15,7 @@ public static class TcpHelper
static NetworkStream networkStream = null;
static bool canjoin = true;
static bool roomListChecking=false;
static bool roomListChecking = false;
public static void join(string ipString, string name, string portString, string pswString, string version)
{
......
......@@ -372,13 +372,13 @@ public class Ocgcore : ServantWithCardDescription
if (c != null)
{
int pposition = c.overFatherCount - 1 - p.position;
return_value.y -= (pposition + 2) * 1f;
return_value.x += (pposition + 1) * 0.6f;
return_value.y -= (pposition + 2) * 0.25f;
return_value.x += (pposition + 1) * 0.15f;
}
else
{
return_value.y -= (p.position + 2) * 1f;
return_value.x += (p.position + 1) * 0.6f;
return_value.y -= (p.position + 2) * 0.25f;
return_value.x += (p.position + 1) * 0.15f;
}
}
......@@ -1333,7 +1333,8 @@ public class Ocgcore : ServantWithCardDescription
isFirst = ((playertype & 0xf) > 0) ? false : true;
gameInfo.swaped = false;
isObserver = ((playertype & 0xf0) > 0) ? true : false;
r.ReadByte(); // duel_rule
if (r.BaseStream.Length > 17) // dumb fix for yrp3d replay older than v1.034.9
r.ReadByte(); // duel_rule
life_0 = r.ReadInt32();
life_1 = r.ReadInt32();
lpLimit = life_0;
......@@ -1809,17 +1810,21 @@ public class Ocgcore : ServantWithCardDescription
break;
case GameMessage.HandResult:
data = r.ReadByte();
int data1 = data & 0x3;
int data2 = (data >> 2) & 0x3;
string scissors = InterString.Get("剪刀");
string rock = InterString.Get("石头");
string paper = InterString.Get("布");
string res1 = (data1 == 1 ? scissors : (data1 == 2 ? paper : rock));
string res2 = (data2 == 1 ? scissors : (data2 == 2 ? paper : rock));
int res1 = (data & 0x3) - 1;
int res2 = ((data >> 2) & 0x3) - 1;
if (isFirst)
printDuelLog(InterString.Get("猜拳结果:你好像出了") + res2 + InterString.Get(",对方好像出了") + res1);
{
Program.I().new_ui_handShower.GetComponent<handShower>().me = res1;
Program.I().new_ui_handShower.GetComponent<handShower>().op = res2;
}
else
printDuelLog(InterString.Get("猜拳结果:你好像出了") + res1 + InterString.Get(",对方好像出了") + res2);
{
Program.I().new_ui_handShower.GetComponent<handShower>().me = res2;
Program.I().new_ui_handShower.GetComponent<handShower>().op = res1;
}
GameObject handres = create(Program.I().new_ui_handShower, Vector3.zero, Vector3.zero, false, Program.ui_main_2d);
destroy(handres, 10f);
Sleep(60);
break;
case GameMessage.Attack:
game_card = GCS_cardGet(r.ReadGPS(), false);
......@@ -4184,9 +4189,20 @@ public class Ocgcore : ServantWithCardDescription
}
break;
case GameMessage.RockPaperScissors:
binaryMaster = new BinaryMaster();
binaryMaster.writer.Write(UnityEngine.Random.Range(0, 2));
sendReturn(binaryMaster.get());
if (inIgnoranceReplay() || inTheWorld())
{
break;
}
if (condition == Condition.record)
{
Sleep(60);
}
destroy(waitObject, 0, false, true);
player = localPlayer(r.ReadByte());
RMSshow_tp("RockPaperScissors"
, new messageSystemValue { hint = "jiandao", value = "1" }
, new messageSystemValue { hint = "shitou", value = "2" }
, new messageSystemValue { hint = "bu", value = "3" });
break;
case GameMessage.ConfirmDecktop:
player = localPlayer(r.ReadByte());
......@@ -8819,6 +8835,20 @@ public class Ocgcore : ServantWithCardDescription
}
}
break;
case "RockPaperScissors":
{
try
{
binaryMaster = new BinaryMaster();
binaryMaster.writer.Write(Int32.Parse(result[0].value));
sendReturn(binaryMaster.get());
}
catch (Exception e)
{
Debug.Log(e);
}
}
break;
}
}
......
using UnityEngine;
using System;
using System.Collections.Generic;
using YGOSharp.OCGWrapper.Enums;
public class Servant
{
public GameObject gameObject;
......@@ -693,14 +695,24 @@ public class Servant
UIHelper.registEvent(currentMSwindow, "atk_", ES_RMSpremono, atk);
UIHelper.registEvent(currentMSwindow, "def_", ES_RMSpremono, def);
UITexture atkpic = UIHelper.getByName<UITexture>(currentMSwindow, "atkPic_");
UIButton defbutton = UIHelper.getByName<UIButton>(currentMSwindow, "def_");
if (Int32.Parse(atk.value) == (int)CardPosition.FaceUpDefence)
{
atkpic.transform.localRotation = Quaternion.Euler(0f, 0f, 90f);
defbutton.transform.localPosition = new Vector3(72.8f, 2f, 0f);
}
else
{
atkpic.transform.localRotation = Quaternion.Euler(0f, 0f, 0f);
defbutton.transform.localPosition = new Vector3(62.8f, 0f, 0f);
}
cardPicLoader cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
cardPicLoader_.code = code;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "atkPic_");
cardPicLoader_.uiTexture = atkpic;
cardPicLoader_ = currentMSwindow.AddComponent<cardPicLoader>();
if (Int32.Parse(def.value) != 8)
cardPicLoader_.code = code;
else
cardPicLoader_.code = 0;
cardPicLoader_.code = (Int32.Parse(def.value) == (int)CardPosition.FaceDownDefence) ? 0 : code;
cardPicLoader_.uiTexture = UIHelper.getByName<UITexture>(currentMSwindow, "defPic_");
}
......
......@@ -7,14 +7,13 @@ Material:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: back_pic
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHATEST_ON _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap:
RenderType: TransparentCutout
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
......@@ -69,7 +68,9 @@ Material:
- _DstBlend: 0
- _Emission: 0.5
- _FPOW: 5
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 1
......@@ -79,6 +80,7 @@ Material:
- _R0: 0.05
- _RimIntensity: 3
- _RimPower: 3
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 0
- _SrcBlend: 1
- _UVSec: 0
......
......@@ -7,14 +7,13 @@ Material:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: face_pic
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHATEST_ON _SPECULARHIGHLIGHTS_OFF
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
......@@ -95,7 +94,9 @@ Material:
- _DstBlend: 0
- _Exposure: 1
- _Focus: -100
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _InvFade: 1
- _Metallic: 0
- _Mode: 1
......@@ -103,6 +104,7 @@ Material:
- _Parallax: 0.02
- _Rotation: 0
- _Shininess: 0.2
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 0
- _SrcBlend: 1
- _UVSec: 0
......
......@@ -7,12 +7,12 @@ Material:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: shower_mat
m_Shader: {fileID: 30, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
......@@ -39,7 +39,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2891320, guid: cbd439a6b1dc1ab4284c3161ae0e8dac, type: 2}
m_Texture: {fileID: 2800000, guid: 6a6ef1fd91ae4f04085befdd9869fe20, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
......
......@@ -148,7 +148,7 @@ PlayerSettings:
tvOS: cn.ygopro2.ygopro2android
buildNumber:
iOS:
AndroidBundleVersionCode: 7
AndroidBundleVersionCode: 8
AndroidMinSdkVersion: 16
AndroidTargetSdkVersion: 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