Commit b2475232 authored by 赤子奈落's avatar 赤子奈落

UI Update

parent ed083a9a
...@@ -161,7 +161,7 @@ MonoBehaviour: ...@@ -161,7 +161,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3014 startingRenderQueue: 3000
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -255,7 +255,7 @@ MonoBehaviour: ...@@ -255,7 +255,7 @@ MonoBehaviour:
mWidth: 82 mWidth: 82
mHeight: 54 mHeight: 54
mDepth: 12 mDepth: 12
autoResizeBoxCollider: 1 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5185186 aspectRatio: 1.5185186
...@@ -263,7 +263,7 @@ MonoBehaviour: ...@@ -263,7 +263,7 @@ MonoBehaviour:
mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3} mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: EP mText: EP
mFontSize: 30 mFontSize: 0
mFontStyle: 0 mFontStyle: 0
mAlignment: 0 mAlignment: 0
mEncoding: 1 mEncoding: 1
...@@ -299,7 +299,7 @@ BoxCollider: ...@@ -299,7 +299,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 82, y: 54, z: 0} m_Size: {x: 0, y: 0, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &11170990 --- !u!111 &11170990
Animation: Animation:
...@@ -426,7 +426,7 @@ MonoBehaviour: ...@@ -426,7 +426,7 @@ MonoBehaviour:
mWidth: 82 mWidth: 82
mHeight: 54 mHeight: 54
mDepth: 12 mDepth: 12
autoResizeBoxCollider: 1 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5185186 aspectRatio: 1.5185186
...@@ -434,7 +434,7 @@ MonoBehaviour: ...@@ -434,7 +434,7 @@ MonoBehaviour:
mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3} mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: BP mText: BP
mFontSize: 30 mFontSize: 0
mFontStyle: 0 mFontStyle: 0
mAlignment: 0 mAlignment: 0
mEncoding: 1 mEncoding: 1
...@@ -470,7 +470,7 @@ BoxCollider: ...@@ -470,7 +470,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 82, y: 54, z: 0} m_Size: {x: 0, y: 0, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &11129344 --- !u!111 &11129344
Animation: Animation:
...@@ -670,7 +670,7 @@ MonoBehaviour: ...@@ -670,7 +670,7 @@ MonoBehaviour:
mWidth: 82 mWidth: 82
mHeight: 54 mHeight: 54
mDepth: 12 mDepth: 12
autoResizeBoxCollider: 1 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5185186 aspectRatio: 1.5185186
...@@ -678,7 +678,7 @@ MonoBehaviour: ...@@ -678,7 +678,7 @@ MonoBehaviour:
mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3} mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: DP mText: DP
mFontSize: 30 mFontSize: 0
mFontStyle: 0 mFontStyle: 0
mAlignment: 0 mAlignment: 0
mEncoding: 1 mEncoding: 1
...@@ -714,7 +714,7 @@ BoxCollider: ...@@ -714,7 +714,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 82, y: 54, z: 0} m_Size: {x: 0, y: 0, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &11162794 --- !u!111 &11162794
Animation: Animation:
...@@ -841,7 +841,7 @@ MonoBehaviour: ...@@ -841,7 +841,7 @@ MonoBehaviour:
mWidth: 82 mWidth: 82
mHeight: 54 mHeight: 54
mDepth: 12 mDepth: 12
autoResizeBoxCollider: 1 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5185186 aspectRatio: 1.5185186
...@@ -849,7 +849,7 @@ MonoBehaviour: ...@@ -849,7 +849,7 @@ MonoBehaviour:
mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3} mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: SP mText: SP
mFontSize: 30 mFontSize: 0
mFontStyle: 0 mFontStyle: 0
mAlignment: 0 mAlignment: 0
mEncoding: 1 mEncoding: 1
...@@ -885,7 +885,7 @@ BoxCollider: ...@@ -885,7 +885,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 82, y: 54, z: 0} m_Size: {x: 0, y: 0, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &11161814 --- !u!111 &11161814
Animation: Animation:
...@@ -1104,7 +1104,7 @@ MonoBehaviour: ...@@ -1104,7 +1104,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3015 startingRenderQueue: 3001
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -1203,7 +1203,7 @@ MonoBehaviour: ...@@ -1203,7 +1203,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3016 startingRenderQueue: 3002
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 4 mClipping: 4
...@@ -1566,7 +1566,7 @@ MonoBehaviour: ...@@ -1566,7 +1566,7 @@ MonoBehaviour:
mWidth: 82 mWidth: 82
mHeight: 54 mHeight: 54
mDepth: 12 mDepth: 12
autoResizeBoxCollider: 1 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5185186 aspectRatio: 1.5185186
...@@ -1574,7 +1574,7 @@ MonoBehaviour: ...@@ -1574,7 +1574,7 @@ MonoBehaviour:
mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3} mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: MP2 mText: MP2
mFontSize: 30 mFontSize: 0
mFontStyle: 0 mFontStyle: 0
mAlignment: 0 mAlignment: 0
mEncoding: 1 mEncoding: 1
...@@ -1610,7 +1610,7 @@ BoxCollider: ...@@ -1610,7 +1610,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 82, y: 54, z: 0} m_Size: {x: 0, y: 0, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &11109548 --- !u!111 &11109548
Animation: Animation:
...@@ -1919,7 +1919,7 @@ MonoBehaviour: ...@@ -1919,7 +1919,7 @@ MonoBehaviour:
mWidth: 82 mWidth: 82
mHeight: 54 mHeight: 54
mDepth: 12 mDepth: 12
autoResizeBoxCollider: 1 autoResizeBoxCollider: 0
hideIfOffScreen: 0 hideIfOffScreen: 0
keepAspectRatio: 0 keepAspectRatio: 0
aspectRatio: 1.5185186 aspectRatio: 1.5185186
...@@ -1927,7 +1927,7 @@ MonoBehaviour: ...@@ -1927,7 +1927,7 @@ MonoBehaviour:
mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3} mTrueTypeFont: {fileID: 12800000, guid: 53d4e381e32a0b54f90ce10b431cddab, type: 3}
mFont: {fileID: 0} mFont: {fileID: 0}
mText: MP1 mText: MP1
mFontSize: 30 mFontSize: 0
mFontStyle: 0 mFontStyle: 0
mAlignment: 0 mAlignment: 0
mEncoding: 1 mEncoding: 1
...@@ -1963,7 +1963,7 @@ BoxCollider: ...@@ -1963,7 +1963,7 @@ BoxCollider:
m_IsTrigger: 0 m_IsTrigger: 0
m_Enabled: 0 m_Enabled: 0
serializedVersion: 2 serializedVersion: 2
m_Size: {x: 82, y: 54, z: 0} m_Size: {x: 0, y: 0, z: 0}
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &11177652 --- !u!111 &11177652
Animation: Animation:
......
...@@ -11,7 +11,7 @@ GameObject: ...@@ -11,7 +11,7 @@ GameObject:
- component: {fileID: 486012} - component: {fileID: 486012}
- component: {fileID: 11438480} - component: {fileID: 11438480}
- component: {fileID: 11457708} - component: {fileID: 11457708}
m_Layer: 8 m_Layer: 5
m_Name: chat_ m_Name: chat_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -128,7 +128,7 @@ GameObject: ...@@ -128,7 +128,7 @@ GameObject:
- component: {fileID: 11412818} - component: {fileID: 11412818}
- component: {fileID: 6540934} - component: {fileID: 6540934}
- component: {fileID: 11472288} - component: {fileID: 11472288}
m_Layer: 8 m_Layer: 5
m_Name: description_ m_Name: description_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -271,7 +271,7 @@ GameObject: ...@@ -271,7 +271,7 @@ GameObject:
- component: {fileID: 11404862} - component: {fileID: 11404862}
- component: {fileID: 11420282} - component: {fileID: 11420282}
- component: {fileID: 11430554} - component: {fileID: 11430554}
m_Layer: 8 m_Layer: 5
m_Name: resizer m_Name: resizer
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -420,7 +420,7 @@ GameObject: ...@@ -420,7 +420,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 493038} - component: {fileID: 493038}
- component: {fileID: 11485070} - component: {fileID: 11485070}
m_Layer: 8 m_Layer: 5
m_Name: card_shower m_Name: card_shower
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -499,7 +499,7 @@ GameObject: ...@@ -499,7 +499,7 @@ GameObject:
- component: {fileID: 11460782} - component: {fileID: 11460782}
- component: {fileID: 11459118} - component: {fileID: 11459118}
- component: {fileID: 11481686} - component: {fileID: 11481686}
m_Layer: 8 m_Layer: 5
m_Name: pre_ m_Name: pre_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -650,7 +650,7 @@ GameObject: ...@@ -650,7 +650,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 433964} - component: {fileID: 433964}
- component: {fileID: 11442950} - component: {fileID: 11442950}
m_Layer: 8 m_Layer: 5
m_Name: under_ m_Name: under_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -1164,7 +1164,7 @@ GameObject: ...@@ -1164,7 +1164,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 466126} - component: {fileID: 466126}
- component: {fileID: 11415260} - component: {fileID: 11415260}
m_Layer: 8 m_Layer: 5
m_Name: Texture m_Name: Texture
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -1290,7 +1290,7 @@ GameObject: ...@@ -1290,7 +1290,7 @@ GameObject:
- component: {fileID: 11426618} - component: {fileID: 11426618}
- component: {fileID: 11424474} - component: {fileID: 11424474}
- component: {fileID: 11459248} - component: {fileID: 11459248}
m_Layer: 8 m_Layer: 5
m_Name: next_ m_Name: next_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -1445,7 +1445,7 @@ GameObject: ...@@ -1445,7 +1445,7 @@ GameObject:
- component: {fileID: 11425542} - component: {fileID: 11425542}
- component: {fileID: 11425732} - component: {fileID: 11425732}
- component: {fileID: 11404496} - component: {fileID: 11404496}
m_Layer: 8 m_Layer: 5
m_Name: big_ m_Name: big_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -1596,7 +1596,7 @@ GameObject: ...@@ -1596,7 +1596,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 438770} - component: {fileID: 438770}
- component: {fileID: 11409354} - component: {fileID: 11409354}
m_Layer: 8 m_Layer: 5
m_Name: Texture m_Name: Texture
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -1691,7 +1691,7 @@ GameObject: ...@@ -1691,7 +1691,7 @@ GameObject:
- component: {fileID: 11498566} - component: {fileID: 11498566}
- component: {fileID: 11458392} - component: {fileID: 11458392}
- component: {fileID: 11410652} - component: {fileID: 11410652}
m_Layer: 8 m_Layer: 5
m_Name: pic_ m_Name: pic_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -1866,7 +1866,7 @@ GameObject: ...@@ -1866,7 +1866,7 @@ GameObject:
- component: {fileID: 11467000} - component: {fileID: 11467000}
- component: {fileID: 11430894} - component: {fileID: 11430894}
- component: {fileID: 11476008} - component: {fileID: 11476008}
m_Layer: 8 m_Layer: 5
m_Name: small_ m_Name: small_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -2179,7 +2179,7 @@ GameObject: ...@@ -2179,7 +2179,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 417636} - component: {fileID: 417636}
- component: {fileID: 11488736} - component: {fileID: 11488736}
m_Layer: 8 m_Layer: 5
m_Name: Texture m_Name: Texture
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -2712,7 +2712,7 @@ GameObject: ...@@ -2712,7 +2712,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 412198} - component: {fileID: 412198}
- component: {fileID: 11483930} - component: {fileID: 11483930}
m_Layer: 8 m_Layer: 5
m_Name: Texture m_Name: Texture
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -2803,7 +2803,7 @@ GameObject: ...@@ -2803,7 +2803,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 455150} - component: {fileID: 455150}
- component: {fileID: 11418628} - component: {fileID: 11418628}
m_Layer: 8 m_Layer: 5
m_Name: title_ m_Name: title_
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
...@@ -2954,8 +2954,6 @@ MonoBehaviour: ...@@ -2954,8 +2954,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d9e922c807f523d44b2a4133a7087f97, type: 3} m_Script: {fileID: 11500000, guid: d9e922c807f523d44b2a4133a7087f97, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
loaded_code: -1
code: 0
defaults: {fileID: 0} defaults: {fileID: 0}
ico: {fileID: 0} ico: {fileID: 0}
coli: {fileID: 0} coli: {fileID: 0}
...@@ -3035,7 +3033,7 @@ MonoBehaviour: ...@@ -3035,7 +3033,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3015 startingRenderQueue: 3003
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
......
...@@ -111,7 +111,7 @@ public class gameInfo : MonoBehaviour ...@@ -111,7 +111,7 @@ public class gameInfo : MonoBehaviour
//instance_lab.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 315, -Utils.UIHeight() / 2 + 90, 0); //instance_lab.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 315, -Utils.UIHeight() / 2 + 90, 0);
instance_btnPan.transform.localPosition = new Vector3(Utils.UIWidth(), 28, 0); instance_btnPan.transform.localPosition = new Vector3(Utils.UIWidth(), 28, 0);
instance_lab.transform.localPosition = new Vector3(Utils.UIWidth(), -Utils.UIHeight() / 2 + 90, 0); instance_lab.transform.localPosition = new Vector3(Utils.UIWidth(), -Utils.UIHeight() / 2 + 90, 0);
btn.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 30, -Utils.UIHeight() / 2 + 90, 0); btn.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 60, -Utils.UIHeight() / 2 + 130, 0);
var j = 0; var j = 0;
foreach (var t in HashedButtons) foreach (var t in HashedButtons)
if (t.gameObject != null) if (t.gameObject != null)
...@@ -319,7 +319,8 @@ public class gameInfo : MonoBehaviour ...@@ -319,7 +319,8 @@ public class gameInfo : MonoBehaviour
if (Program.I().ocgcore.timeLimit == 0) return; if (Program.I().ocgcore.timeLimit == 0) return;
if (player == 0) if (player == 0)
{ {
me.api_timeHint.text = t + "/" + Program.I().ocgcore.timeLimit; me.api_timeHint.text = t.ToString()/* + "/" + Program.I().ocgcore.timeLimit*/;
TimerHandler.SetTime(0, t);
opponent.api_timeHint.text = "waiting"; opponent.api_timeHint.text = "waiting";
UIHelper.clearITWeen(me.api_healthBar.gameObject); UIHelper.clearITWeen(me.api_healthBar.gameObject);
iTween.MoveToLocal(me.api_timeBar.gameObject, iTween.MoveToLocal(me.api_timeBar.gameObject,
...@@ -330,7 +331,8 @@ public class gameInfo : MonoBehaviour ...@@ -330,7 +331,8 @@ public class gameInfo : MonoBehaviour
if (player == 1) if (player == 1)
{ {
opponent.api_timeHint.text = t + "/" + Program.I().ocgcore.timeLimit; opponent.api_timeHint.text = t.ToString()/* + "/" + Program.I().ocgcore.timeLimit*/;
TimerHandler.SetTime(1, t);
me.api_timeHint.text = "waiting"; me.api_timeHint.text = "waiting";
UIHelper.clearITWeen(opponent.api_healthBar.gameObject); UIHelper.clearITWeen(opponent.api_healthBar.gameObject);
iTween.MoveToLocal(opponent.api_timeBar.gameObject, iTween.MoveToLocal(opponent.api_timeBar.gameObject,
...@@ -374,6 +376,7 @@ public class gameInfo : MonoBehaviour ...@@ -374,6 +376,7 @@ public class gameInfo : MonoBehaviour
private void tick() private void tick()
{ {
//Debug.Log("tick: " + isTicking[0] + isTicking[1]);
if (isTicking[0]) if (isTicking[0])
{ {
if (time[0] > 0) time[0]--; if (time[0] > 0) time[0]--;
......
...@@ -44,7 +44,6 @@ SpriteRenderer: ...@@ -44,7 +44,6 @@ SpriteRenderer:
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
...@@ -244,7 +243,7 @@ Transform: ...@@ -244,7 +243,7 @@ Transform:
m_GameObject: {fileID: 108702} m_GameObject: {fileID: 108702}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1.5, y: 1.5, z: 1}
m_Children: m_Children:
- {fileID: 438948} - {fileID: 438948}
m_Father: {fileID: 0} m_Father: {fileID: 0}
......
...@@ -155,7 +155,7 @@ Transform: ...@@ -155,7 +155,7 @@ Transform:
m_GameObject: {fileID: 154124} m_GameObject: {fileID: 154124}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0971428, y: 1.0971428, z: 1.0971428} m_LocalScale: {x: 2, y: 2, z: 1}
m_Children: m_Children:
- {fileID: 423624} - {fileID: 423624}
- {fileID: 412442} - {fileID: 412442}
......
...@@ -356,7 +356,7 @@ Transform: ...@@ -356,7 +356,7 @@ Transform:
m_GameObject: {fileID: 122638} m_GameObject: {fileID: 122638}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 2, y: 2, z: 1}
m_Children: m_Children:
- {fileID: 484892} - {fileID: 484892}
- {fileID: 445462} - {fileID: 445462}
......
...@@ -767,7 +767,7 @@ Transform: ...@@ -767,7 +767,7 @@ Transform:
m_GameObject: {fileID: 123392} m_GameObject: {fileID: 123392}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 683, y: -484, z: 0} m_LocalPosition: {x: 683, y: -484, z: 0}
m_LocalScale: {x: 1.0971428, y: 1.0971428, z: 1.0971428} m_LocalScale: {x: 2, y: 2, z: 1}
m_Children: m_Children:
- {fileID: 486490} - {fileID: 486490}
- {fileID: 439980} - {fileID: 439980}
......
...@@ -1938,7 +1938,7 @@ Transform: ...@@ -1938,7 +1938,7 @@ Transform:
m_GameObject: {fileID: 178988} m_GameObject: {fileID: 178988}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0971428, y: 1.0971428, z: 1.0971428} m_LocalScale: {x: 2, y: 2, z: 1}
m_Children: m_Children:
- {fileID: 485692} - {fileID: 485692}
- {fileID: 448988} - {fileID: 448988}
......
...@@ -490,7 +490,7 @@ Transform: ...@@ -490,7 +490,7 @@ Transform:
m_GameObject: {fileID: 117332} m_GameObject: {fileID: 117332}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 2, y: 2, z: 1}
m_Children: m_Children:
- {fileID: 418976} - {fileID: 418976}
- {fileID: 451004} - {fileID: 451004}
......
...@@ -25,7 +25,7 @@ Transform: ...@@ -25,7 +25,7 @@ Transform:
m_GameObject: {fileID: 101550} m_GameObject: {fileID: 101550}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 2, y: 2, z: 1}
m_Children: m_Children:
- {fileID: 461624} - {fileID: 461624}
- {fileID: 415820} - {fileID: 415820}
......
fileFormatVersion: 2
guid: 5c9da03019412074881e6724f970e1a4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AutoScale : MonoBehaviour
{
float width;
float height;
private void Start()
{
width = transform.localScale.x;
height = transform.localScale.y;
}
void Update()
{
float k = Screen.width / (float)Screen.height;
if (k > 16 / 9f)
transform.localScale = new Vector3(width * (1 + k - 16 / 9f), height * (1 + k - 16 / 9f), transform.localScale.z);
else
transform.localScale = new Vector3(width, height, transform.localScale.z);
}
}
fileFormatVersion: 2
guid: 0a0183063ad3cd548a6b83d006a43fc6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using System.Security.Policy;
using UnityEngine;
public class LimitIcons : MonoBehaviour
{
public Sprite null_;
public Sprite ban;
public Sprite limit1;
public Sprite limit2;
UI2DSprite sprite;
private void Start()
{
sprite = GetComponent<UI2DSprite>();
}
public void ChangeIcon(int i)
{
switch (i)
{
case 0:
sprite.sprite2D = ban;
break;
case 1:
sprite.sprite2D = limit1;
break;
case 2:
sprite.sprite2D = limit2;
break;
case 3:
sprite.sprite2D = null_;
break;
}
}
}
fileFormatVersion: 2
guid: 976a0638e8de772419dd1c11eb15fd31
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -34,11 +34,55 @@ public class LoadAssets : MonoBehaviour ...@@ -34,11 +34,55 @@ public class LoadAssets : MonoBehaviour
static string field1; static string field1;
static string field2; static string field2;
public static GameObject guide_near;
public static GameObject guide_far;
void Start() void Start()
{ {
ac = GameObject.Find("new_gameField(Clone)/Assets_Loader").GetComponent<AnimationControl>(); ac = GameObject.Find("new_gameField(Clone)/Assets_Loader").GetComponent<AnimationControl>();
CreateField1(GetFieldValue.field1); CreateField1(GetFieldValue.field1);
CreateField2(GetFieldValue.field2); CreateField2(GetFieldValue.field2);
CreatePhaseButton();
if (Program.I().ocgcore.condition == Ocgcore.Condition.duel || Program.I().ocgcore.condition == Ocgcore.Condition.watch)
{
CreateTimer();
CreateGuide();
}
}
static void CreateTimer()
{
var timer = ABLoader.LoadAB("timer/timer_c001");
Transform timerPart = timer.transform.Find("Timer");
Texture texture = timerPart.GetComponent<Renderer>().material.GetTexture("_Texture2D");
timerPart.GetComponent<Renderer>().material.SetTexture("_SampleTexture2D_4791db607d671180b2a839392ec5ea21_Texture_1", texture);
timer.transform.SetParent(field1_.parent, false);
timer.AddComponent<TimerHandler>();
}
static void CreatePhaseButton()
{
var phaseButton = ABLoader.LoadAB("timer/phasebutton_c001");
Transform playerPart = phaseButton.transform.Find("PlayerPart");
Texture texture = playerPart.GetComponent<Renderer>().material.GetTexture("_Texture2D");
playerPart.GetComponent<Renderer>().material.SetTexture("_SampleTexture2D_4791db607d671180b2a839392ec5ea21_Texture_1", texture);
Transform opponentPart = phaseButton.transform.Find("OpponentPart");
opponentPart.GetComponent<Renderer>().material.SetTexture("_SampleTexture2D_4791db607d671180b2a839392ec5ea21_Texture_1", texture);
phaseButton.transform.SetParent(field1_.parent, false);
phaseButton.AddComponent<PhaseButtonHandler>();
}
static void CreateGuide()
{
guide_near = ABLoader.LoadAB("timer/playableguide_c001_near");
guide_near.transform.SetParent(field1_, false);
guide_near.transform.GetChild(1).gameObject.SetActive(false);
guide_near.AddComponent<PlayableGuide>();
guide_far = ABLoader.LoadAB("timer/playableguide_c001_far");
guide_far.transform.SetParent(field2_, false);
guide_far.transform.GetChild(1).gameObject.SetActive(false);
guide_far.AddComponent<PlayableGuide>();
} }
public static void CreateField1(string name) public static void CreateField1(string name)
......
...@@ -161,7 +161,7 @@ public class LoadSFX : MonoBehaviour ...@@ -161,7 +161,7 @@ public class LoadSFX : MonoBehaviour
else if (type == "RITUAL") else if (type == "RITUAL")
{ {
summon = Decoration("timeline/summon/summonritual/summonritual01", false, GameObject.Find("main_3d").transform, "SummonAnimation"); summon = Decoration("timeline/summon/summonritual/summonritual01", false, GameObject.Find("main_3d").transform, "SummonAnimation");
foreach(Transform child in summon.transform) foreach (Transform child in summon.transform)
{ {
if (child.GetComponent<MeshRenderer>() != null) if (child.GetComponent<MeshRenderer>() != null)
{ {
...@@ -170,6 +170,8 @@ public class LoadSFX : MonoBehaviour ...@@ -170,6 +170,8 @@ public class LoadSFX : MonoBehaviour
if (child.name == "SummonRitual01(Clone)") if (child.name == "SummonRitual01(Clone)")
summon = child.gameObject; summon = child.gameObject;
} }
Vector3 black_ = summon.transform.Find("Black").localScale;
summon.transform.Find("Black").localScale = new Vector3(black_.x * 10, black_.y, black_.z);
ABLoader.ChangeLayer(summon, "main_3d"); ABLoader.ChangeLayer(summon, "main_3d");
Transform post = summon.transform; Transform post = summon.transform;
Transform front = summon.transform; Transform front = summon.transform;
...@@ -942,6 +944,9 @@ public class LoadSFX : MonoBehaviour ...@@ -942,6 +944,9 @@ public class LoadSFX : MonoBehaviour
clip.sourceGameObject.exposedName = "PostLinkControl"; clip.sourceGameObject.exposedName = "PostLinkControl";
director.SetReferenceValue(new PropertyName("PostLinkControl"), post); director.SetReferenceValue(new PropertyName("PostLinkControl"), post);
} }
Vector3 black = go.transform.Find("BlackNormal").localScale;
go.transform.Find("BlackNormal").localScale = new Vector3(black.x * 10, black.y, black.z);
return go; return go;
} }
...@@ -1261,6 +1266,8 @@ public class LoadSFX : MonoBehaviour ...@@ -1261,6 +1266,8 @@ public class LoadSFX : MonoBehaviour
clip.sourceGameObject.exposedName = "PostLinkControl"; clip.sourceGameObject.exposedName = "PostLinkControl";
director.SetReferenceValue(new PropertyName("PostLinkControl"), post); director.SetReferenceValue(new PropertyName("PostLinkControl"), post);
} }
Vector3 black = go.transform.Find("BlackNormal").localScale;
go.transform.Find("BlackNormal").localScale = new Vector3(black.x * 10, black.y, black.z);
return go; return go;
} }
...@@ -1664,6 +1671,9 @@ public class LoadSFX : MonoBehaviour ...@@ -1664,6 +1671,9 @@ public class LoadSFX : MonoBehaviour
clip.sourceGameObject.exposedName = "PostLinkControl"; clip.sourceGameObject.exposedName = "PostLinkControl";
director.SetReferenceValue(new PropertyName("PostLinkControl"), post); director.SetReferenceValue(new PropertyName("PostLinkControl"), post);
} }
Vector3 black = go.transform.Find("BlackNormal").localScale;
go.transform.Find("BlackNormal").localScale = new Vector3(black.x * 10, black.y, black.z);
return go; return go;
} }
...@@ -1825,8 +1835,10 @@ public class LoadSFX : MonoBehaviour ...@@ -1825,8 +1835,10 @@ public class LoadSFX : MonoBehaviour
director.SetReferenceValue(new PropertyName("SynchroPost"), post); director.SetReferenceValue(new PropertyName("SynchroPost"), post);
} }
Vector3 black_ = go.transform.Find("BGOffset/Black").localScale;
go.transform.Find("BGOffset/Black").localScale = new Vector3(black_.x * 10, black_.y, black_.z);
return go; return go;
} }
GameObject SummonXyz() GameObject SummonXyz()
...@@ -2112,6 +2124,10 @@ public class LoadSFX : MonoBehaviour ...@@ -2112,6 +2124,10 @@ public class LoadSFX : MonoBehaviour
} }
director.playOnAwake = true; director.playOnAwake = true;
Vector3 black_ = go.transform.Find("Black").localScale;
go.transform.Find("Black").localScale = new Vector3(black_.x * 10, black_.y, black_.z);
return go; return go;
} }
......
...@@ -22,10 +22,10 @@ public class MenuButtonHover : MonoBehaviour ...@@ -22,10 +22,10 @@ public class MenuButtonHover : MonoBehaviour
{ {
if (Program.pointedCollider == collider_ && !hover) if (Program.pointedCollider == collider_ && !hover)
{ {
description.DOLocalMoveX(220, 0.15f); description.DOLocalMoveX(550, 0.15f);
label.gameObject.SetActive(false); label.gameObject.SetActive(false);
label2.gameObject.SetActive(true); label2.gameObject.SetActive(true);
accordion.localScale = Vector3.one; accordion.localScale = new Vector3(1f, 2f, 1f);
hover = true; hover = true;
} }
else if(Program.pointedCollider != collider_ && hover) else if(Program.pointedCollider != collider_ && hover)
...@@ -33,7 +33,7 @@ public class MenuButtonHover : MonoBehaviour ...@@ -33,7 +33,7 @@ public class MenuButtonHover : MonoBehaviour
description.DOLocalMoveX(0, 0.15f); description.DOLocalMoveX(0, 0.15f);
label.gameObject.SetActive(true); label.gameObject.SetActive(true);
label2.gameObject.SetActive(false); label2.gameObject.SetActive(false);
accordion.localScale = new Vector3(0.3f, 0.6f, 1f); accordion.localScale = new Vector3(0.5f, 1f, 1f);
hover = false; hover = false;
} }
} }
......
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class PhaseButtonHandler : MonoBehaviour
{
Transform commonPart;
Transform playerPart;
Transform opponentPart;
TextMeshPro textMain;
TextMeshPro textBelow;
TextMeshPro textAbove;
Material playerMaterial;
Material opponentMaterial;
Collider collider_;
bool hover;
float mouseOver;
int turns = -1;
private void Start()
{
commonPart = transform.Find("CommonPart");
textMain = commonPart.Find("TextMain").gameObject.AddComponent<TextMeshPro>();
textMain.text = "Main1";
textMain.fontSize = 16f;
textMain.alignment = TextAlignmentOptions.Center;
textMain.GetComponent<TextContainer>().height = 4;
textMain.color = new Color(1, 1, 1, 0.75f);
textMain.outlineColor = new Color(1, 1, 1, 0);
textAbove = commonPart.Find("TextAbove").gameObject.AddComponent<TextMeshPro>();
textAbove.text = "Turn1";
textAbove.fontSize = 12f;
textAbove.alignment = TextAlignmentOptions.Top;
textAbove.GetComponent<TextContainer>().height = 4;
textAbove.color = new Color(1, 1, 1, 0.75f);
textAbove.outlineColor = new Color(1, 1, 1, 0);
textBelow = commonPart.Find("TextBelow").gameObject.AddComponent<TextMeshPro>();
textBelow.text = "01";
textBelow.fontSize = 10f;
textBelow.alignment = TextAlignmentOptions.Bottom;
textBelow.GetComponent<TextContainer>().height = 4;
textBelow.color = new Color(1, 1, 1, 0.75f);
textBelow.outlineColor = new Color(1, 1, 1, 0);
playerPart = transform.Find("PlayerPart");
opponentPart = transform.Find("OpponentPart");
playerMaterial = playerPart.GetComponent<Renderer>().material;
opponentMaterial = opponentPart.GetComponent<Renderer>().material;
opponentMaterial.SetFloat("_SwitchTurn", 1);
collider_ = commonPart.GetComponent<Collider>();
}
private void Update()
{
if (PhaseUIBehaviour.clickable)
{
playerMaterial.SetFloat("_Active", 1);
//Click
if (Program.pointedCollider == collider_ && Input.GetMouseButtonUp(0))
PhaseUIBehaviour.show();
if (Program.pointedCollider == collider_ && Input.GetMouseButton(0))
playerMaterial.SetFloat("_PressButton", 1);
else
playerMaterial.SetFloat("_PressButton", 0);
//MouseOver
if (Program.pointedCollider == collider_ && !hover)
{
hover = true;
DOTween.To(() => mouseOver, x => mouseOver = x, 1, 0.2f);
}
else if (Program.pointedCollider != collider_ && hover)
{
hover = false;
DOTween.To(() => mouseOver, x => mouseOver = x, 0, 0.2f);
}
playerMaterial.SetFloat("_MouseOver", mouseOver);
}
else
{
playerMaterial.SetFloat("_Active", 0);
}
//TurnChange
if(turns != Program.I().ocgcore.turns)
{
turns = Program.I().ocgcore.turns;
commonPart.localScale = Vector3.zero;
commonPart.DOScale(Vector3.one, 0.3f);
if (Program.I().ocgcore.myTurn)
{
playerPart.DOScale(Vector3.one, 0.3f);
opponentPart.DOScale(Vector3.one * 0.1f, 0.3f);
}
else
{
playerPart.DOScale(Vector3.one * 0.1f, 0.3f);
opponentPart.DOScale(Vector3.one, 0.3f);
}
}
//Text
textMain.text = Program.I().ocgcore.MD_phaseString;
textAbove.text = "Turn" + Program.I().ocgcore.turns;
textBelow.text = Program.I().ocgcore.MD_battleString;
}
}
fileFormatVersion: 2
guid: 4a5d09b92113e3749bcf425cf3c93e3c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PhaseUIBehaviour : MonoBehaviour
{
public static UIButton dp;
public static UIButton sp;
public static UIButton mp1;
public static UIButton bp;
public static UIButton mp2;
public static UIButton ep;
public static bool isShowed;
public static bool clickable;
public static PhaseUIBehaviour instance;
public static int retOfBp = -1;
public static int retOfEp = -1;
public static int retOfMp = -1;
private void onBP()
{
if (bp.GetComponent<BoxCollider>().size.x == 175)
{
var m = new BinaryMaster();
m.writer.Write(retOfBp);
Program.I().ocgcore.sendReturn(m.get());
}
hide();
}
private void onEP()
{
if (ep.GetComponent<BoxCollider>().size.x == 175)
{
var m = new BinaryMaster();
m.writer.Write(retOfEp);
Program.I().ocgcore.sendReturn(m.get());
}
hide();
}
private void onMP()
{
if (mp2.GetComponent<BoxCollider>().size.x == 175)
{
var m = new BinaryMaster();
m.writer.Write(retOfMp);
Program.I().ocgcore.sendReturn(m.get());
}
hide();
}
private void OnEnable()
{
instance = this;
dp = instance.transform.GetChild(3).GetChild(0).GetComponent<UIButton>();
sp = instance.transform.GetChild(3).GetChild(1).GetComponent<UIButton>();
mp1 = instance.transform.GetChild(3).GetChild(2).GetComponent<UIButton>();
bp = instance.transform.GetChild(3).GetChild(3).GetComponent<UIButton>();
mp2 = instance.transform.GetChild(3).GetChild(4).GetComponent<UIButton>();
ep = instance.transform.GetChild(3).GetChild(5).GetComponent<UIButton>();
}
void Start()
{
EventDelegate.Add(transform.GetChild(1).GetComponent<UIButton>().onClick, hide);
EventDelegate.Add(transform.GetChild(3).GetChild(2).GetComponent<UIButton>().onClick, hide);
EventDelegate.Add(transform.GetChild(3).GetChild(3).GetComponent<UIButton>().onClick, onBP);
EventDelegate.Add(transform.GetChild(3).GetChild(4).GetComponent<UIButton>().onClick, onMP);
EventDelegate.Add(transform.GetChild(3).GetChild(5).GetComponent<UIButton>().onClick, onEP);
}
void Update()
{
if (isShowed)
{
ButtonBehaviour(mp1);
ButtonBehaviour(bp);
ButtonBehaviour(mp2);
ButtonBehaviour(ep);
}
}
public static void SetButtonState(UIButton btn, int i)
{
if (btn == null)
return;
if (i == 0)//unselectable
{
btn.GetComponent<BoxCollider>().size = new Vector3(0, 0, 0);
UIHelper.getByName<UI2DSprite>(btn.gameObject, "background_").color = new Color(0.5f, 0.5f, 0.5f, 1f);
UIHelper.getByName<UI2DSprite>(btn.gameObject, "circle_main").color = new Color(0.5f, 0.5f, 0.5f, 1f);
UIHelper.getByName<UI2DSprite>(btn.gameObject, "icon_").color = new Color(0.5f, 0.5f, 0.5f, 1f);
UIHelper.getByName<UILabel>(btn.gameObject, "label_").color = new Color(0.5f, 0.5f, 0.5f, 1f);
UIHelper.getByName<UIWidget>(btn.gameObject, "active_").alpha = 0;
}
else if (i == 1)//selectable
{
btn.GetComponent<BoxCollider>().size = new Vector3(175, 175, 0);
UIHelper.getByName<UI2DSprite>(btn.gameObject, "background_").color = Color.white;
UIHelper.getByName<UI2DSprite>(btn.gameObject, "circle_main").color = Color.white;
UIHelper.getByName<UI2DSprite>(btn.gameObject, "icon_").color = Color.white;
UIHelper.getByName<UILabel>(btn.gameObject, "label_").color = Color.white;
UIHelper.getByName<UIWidget>(btn.gameObject, "active_").alpha = 0;
}
else if (i == 2)//selected
{
btn.GetComponent<BoxCollider>().size = new Vector3(174, 174, 0);
UIHelper.getByName<UI2DSprite>(btn.gameObject, "background_").color = Color.black;
UIHelper.getByName<UI2DSprite>(btn.gameObject, "circle_main").color = new Color(0.8f, 1f, 0f, 1f);
UIHelper.getByName<UI2DSprite>(btn.gameObject, "icon_").color = new Color(0.8f, 1f, 0f, 1f);
UIHelper.getByName<UILabel>(btn.gameObject, "label_").color = new Color(0.8f, 1f, 0f, 1f);
UIHelper.getByName<UIWidget>(btn.gameObject, "active_").alpha = 0;
}
}
void ButtonBehaviour(UIButton btn)
{
if (btn == null)
return;
BoxCollider collider = btn.GetComponent<BoxCollider>();
int state = 0;
if (collider.size.x == 0)
return;
else if(collider.size.x == 175)
state = 1;
else
state = 2;
if(Program.pointedCollider == collider && Input.GetMouseButton(0))
{
UIHelper.getByName<UIWidget>(btn.gameObject, "active_").alpha = 1;
if (state == 1)
{
UIHelper.getByName<UI2DSprite>(btn.gameObject, "icon_").color = Color.white;
UIHelper.getByName<UILabel>(btn.gameObject, "label_").color = Color.white;
}
else
{
UIHelper.getByName<UI2DSprite>(btn.gameObject, "icon_").color = new Color(0.8f, 1f, 0f, 1f);
UIHelper.getByName<UILabel>(btn.gameObject, "label_").color = new Color(0.8f, 1f, 0f, 1f);
}
}
else if (Program.pointedCollider == collider && !Input.GetMouseButton(0))
{
UIHelper.getByName<UIWidget>(btn.gameObject, "active_").alpha = 1;
UIHelper.getByName<UI2DSprite>(btn.gameObject, "icon_").color = Color.black;
UIHelper.getByName<UILabel>(btn.gameObject, "label_").color = Color.black;
}
else
{
SetButtonState(btn, state);
}
}
public static void show()
{
if(isShowed) return;
isShowed = true;
instance.transform.DOLocalMoveY(0, 0.3f);
DOTween.To(() => instance.GetComponent<UIWidget>().alpha, x => instance.GetComponent<UIWidget>().alpha = x, 1, 0.3f);
SEHandler.PlayInternalAudio("se_sys/SE_MENU_SLIDE_03");
SetButtonState(dp, 0);
SetButtonState(sp, 0);
SetButtonState(mp1, 0);
SetButtonState(bp, 0);
SetButtonState(mp2, 0);
SetButtonState(ep, 0);
if (retOfBp != -1)
SetButtonState(bp, 1);
if (retOfMp != -1)
SetButtonState(mp2, 1);
if (retOfEp != -1)
SetButtonState(ep, 1);
if (Program.I().ocgcore.MD_phaseString == "Main1")
SetButtonState(mp1, 2);
else if (Program.I().ocgcore.MD_phaseString == "Battle")
SetButtonState(bp, 2);
else if (Program.I().ocgcore.MD_phaseString == "Main2")
SetButtonState(mp2, 2);
}
public static void hide()
{
if (!isShowed) return;
isShowed = false;
instance.transform.DOLocalMoveY(-600, 0.3f);
DOTween.To(() => instance.GetComponent<UIWidget>().alpha, x => instance.GetComponent<UIWidget>().alpha = x, 0, 0.3f);
SEHandler.PlayInternalAudio("se_sys/SE_MENU_SLIDE_04");
}
}
fileFormatVersion: 2
guid: 9081a676ed4b02d4abda9ba5d9dd0689
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class PlayableGuide : MonoBehaviour
{
Animator animator;
bool me;
int currentCondition = 0;
int updatedCondition = 0;
void Start()
{
if (gameObject.name.StartsWith("PlayableGuide_c001_near"))
me = true;
else
me = false;
animator = GetComponent<Animator>();
Guide(0);
}
void Update()
{
if (Program.I().ocgcore.myTurn)
{
if (Program.I().ocgcore.currentMessage == GameMessage.Waiting)
updatedCondition = 2;
else
updatedCondition = 1;
}
else
{
if (Program.I().ocgcore.currentMessage == GameMessage.SelectChain)
updatedCondition = 1;
else
updatedCondition = 2;
}
if (currentCondition != updatedCondition)
{
currentCondition = updatedCondition;
Guide(currentCondition);
}
}
void Guide(int i)
{
switch (i)
{
case 0:
animator.SetTrigger("Out");
break;
case 1:
if(me)
animator.SetTrigger("Apper");
else
animator.SetTrigger("Out");
break;
case 2:
if (me)
animator.SetTrigger("Out");
else
animator.SetTrigger("Apper");
break;
}
}
}
fileFormatVersion: 2
guid: 6e15bf949d22b474782a4ded92a0ba03
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -6,10 +6,18 @@ public class SEHandler : MonoBehaviour ...@@ -6,10 +6,18 @@ public class SEHandler : MonoBehaviour
{ {
public static void Play(string p) public static void Play(string p)
{ {
AudioSource audioSource; AudioSource audioSource = Instantiate(Program.I().mod_audio_effect).GetComponent<AudioSource>();
audioSource = GameObject.Find("SE").GetComponent<AudioSource>(); audioSource.volume = GetFieldValue.seVol;
audioSource.clip = GetClip(p); audioSource.clip = GetClip(p);
audioSource.Play(); Destroy(audioSource, 5f);
}
public static void PlayInternalAudio(string name)
{
AudioSource audioSource = Instantiate(Program.I().mod_audio_effect).GetComponent<AudioSource>();
audioSource.volume = GetFieldValue.seVol;
audioSource.clip = Resources.Load<AudioClip>("Sound/" + name);
Destroy(audioSource.gameObject, 5f);
} }
public static void Stop() public static void Stop()
......
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class TimerHandler : MonoBehaviour
{
static Material material;
static TextMeshPro tmp;
public static int[] time = new int[2];
void Start()
{
material = transform.Find("Timer").GetComponent<Renderer>().materials[1];
tmp = transform.Find("Timer/TextMain").gameObject.AddComponent<TextMeshPro>();
tmp.text = "999";
tmp.fontSize = 22;
tmp.alignment = TextAlignmentOptions.Center;
tmp.color = new Color(1, 1, 1, 0.75f);
tmp.outlineColor = new Color(1, 1, 1, 0);
tmp.GetComponent<TextContainer>().pivot = new Vector2(0.5f, 0.4f);
material.SetFloat("_AddTime", 0);
material.SetColor("_AddTimeColorBar01", Color.red);
material.SetColor("_AddTimeColor02", Color.red);
}
public static void SetTime(int player , int time)
{
if(player == 0)
{
tmp.text = time.ToString();
material.SetFloat("_MaxTime", time / (float)Program.I().ocgcore.timeLimit);
material.SetFloat("_AddTime", 0f);
}
else
{
tmp.text = time.ToString();
material.SetFloat("_MaxTime", 0f);
material.SetFloat("_AddTime", time / (float)Program.I().ocgcore.timeLimit);
}
}
}
fileFormatVersion: 2
guid: 9313d31dc3db71142a45912aa17b798f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -9,7 +9,7 @@ public class UIHandler : MonoBehaviour ...@@ -9,7 +9,7 @@ public class UIHandler : MonoBehaviour
public string bgName; public string bgName;
static GameObject homeUI; static GameObject homeUI;
//static GameObject bgFront; //static GameObject bgFront;
void Start() void OnEnable()
{ {
//LoadBg(); //LoadBg();
LoadBgFront(Config.Get("wallpaper_", "青眼亚白龙")); LoadBgFront(Config.Get("wallpaper_", "青眼亚白龙"));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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