Commit 484acaaa authored by Unicorn369's avatar Unicorn369

Update

parent 8b9ccb9a
......@@ -7,6 +7,8 @@ public class gameUIbutton
public string hashString;
public GameObject gameObject;
public int response;
public bool dying;
public bool dead;
}
public class gameInfo : MonoBehaviour
......@@ -120,25 +122,41 @@ public class gameInfo : MonoBehaviour
opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height));
}
float height = 198 + 75 * (HashedButtons.Count);
if (HashedButtons.Count == 0)
{
height = 174;
}
width = (225 * kb) + 15f;
width = (225 * kb) + 15f;
float localPositionPanX = (((float)Screen.width - 225 * kb) / 2) - 15f;
float localPositionPanY = 0;
float localPositionPanY_ = instance_btnPan.transform.localPosition.y + (localPositionPanY - instance_btnPan.transform.localPosition.y) * 0.2f;
instance_btnPan.height += (int)(((float)height - (float)instance_btnPan.height) * 0.2f);
instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, localPositionPanY_, 0);
instance_lab.transform.localPosition = new Vector3(Screen.width/ 2 - 315, -Screen.height / 2 + 90, 0);
instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 120, 0);
instance_lab.transform.localPosition = new Vector3(Screen.width / 2 - 315, -Screen.height / 2 + 90, 0);
int j = 0;
for (int i = 0; i < HashedButtons.Count; i++)
{
if (HashedButtons[i].gameObject != null)
{
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, height / 2 - 220 - i * 75, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 10f;
if (HashedButtons[i].dying)
{
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, -120, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 20f;
if (Math.Abs(HashedButtons[i].gameObject.transform.localPosition.y - -120) < 1)
HashedButtons[i].dead = true;
}
else
{
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, -220 - j * 75, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 10f;
j++;
}
}
else
HashedButtons[i].dead = true;
}
for (int i = HashedButtons.Count - 1; i >= 0; i--)
{
if (HashedButtons[i].dead)
HashedButtons.RemoveAt(i);
}
float height = 198 + 75 * j;
if (j == 0)
{
height = 174;
}
instance_btnPan.height += (int)(((float)height - (float)instance_btnPan.height) * 0.2f);
if (Program.TimePassed() - lastTickTime > 1000)
{
lastTickTime = Program.TimePassed();
......@@ -171,9 +189,10 @@ public class gameInfo : MonoBehaviour
}
hashedButton.gameObject.transform.SetParent(instance_btnPan.transform,false);
hashedButton.gameObject.transform.localScale = Vector3.zero;
hashedButton.gameObject.transform.localPosition= Vector3.zero;
hashedButton.gameObject.transform.localPosition= new Vector3(0, -120, 0);
hashedButton.gameObject.transform.localEulerAngles = Vector3.zero;
iTween.ScaleTo(hashedButton.gameObject, new Vector3(0.9f, 0.9f, 0.9f), 0.3f);
hashedButton.dying = false;
HashedButtons.Add(hashedButton);
refreshLine();
}
......@@ -222,9 +241,9 @@ public class gameInfo : MonoBehaviour
{
if (remove.gameObject != null)
{
Program.I().destroy(remove.gameObject, 0.6f, true);
Program.I().destroy(remove.gameObject, 0.3f, true);
}
HashedButtons.Remove(remove);
remove.dying = true;
}
refreshLine();
}
......@@ -242,16 +261,24 @@ public class gameInfo : MonoBehaviour
{
if (HashedButtons[i].gameObject != null)
{
Program.I().destroy(HashedButtons[i].gameObject, 0.6f, true);
Program.I().destroy(HashedButtons[i].gameObject, 0.3f, true);
}
HashedButtons[i].dying = true;
}
HashedButtons.Clear();
refreshLine();
}
void refreshLine()
{
line.SetActive(HashedButtons.Count > 0);
int j = 0;
for (int i = 0; i < HashedButtons.Count; i++)
{
if (!HashedButtons[i].dying)
{
j++;
}
}
line.SetActive(j > 0);
}
int[] time = new int[2];
......
......@@ -321,7 +321,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179438}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -97, y: 30, z: 0}
m_LocalPosition: {x: -97, y: -38, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 481814}
......@@ -363,7 +363,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 114238}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -97, y: -66, z: 0}
m_LocalPosition: {x: -97, y: -134, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 400434}
......@@ -379,7 +379,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 171338}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -97, z: 0}
m_LocalPosition: {x: 0, y: -165, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 498562}
......@@ -418,7 +418,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 147310}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -97, y: -20, z: 0}
m_LocalPosition: {x: -97, y: -86, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 451638}
......@@ -499,7 +499,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 104964}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 126, z: 0}
m_LocalPosition: {x: 0, y: 129, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 411346}
......@@ -519,8 +519,8 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 240, y: 48, z: 0}
m_Center: {x: 120, y: 0, z: 0}
m_Size: {x: 270, y: 48, z: 0}
m_Center: {x: 135, y: 0, z: 0}
--- !u!65 &6532536
BoxCollider:
m_ObjectHideFlags: 1
......@@ -543,8 +543,8 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 240, y: 44, z: 0}
m_Center: {x: 120, y: 0, z: 0}
m_Size: {x: 270, y: 48, z: 0}
m_Center: {x: 135, y: 0, z: 0}
--- !u!65 &6583438
BoxCollider:
m_ObjectHideFlags: 1
......@@ -555,8 +555,8 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 240, y: 48, z: 0}
m_Center: {x: 120, y: 0, z: 0}
m_Size: {x: 270, y: 48, z: 0}
m_Center: {x: 135, y: 0, z: 0}
--- !u!111 &11101560
Animation:
m_ObjectHideFlags: 1
......@@ -676,7 +676,7 @@ MonoBehaviour:
rightAnchor:
target: {fileID: 498562}
relative: 1
absolute: 35
absolute: 65
bottomAnchor:
target: {fileID: 498562}
relative: 1
......@@ -684,17 +684,17 @@ MonoBehaviour:
topAnchor:
target: {fileID: 498562}
relative: 1
absolute: -66
absolute: -62
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 3
mWidth: 240
mHeight: 44
mWidth: 270
mHeight: 48
mDepth: 6
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 5.4545455
aspectRatio: 5.625
--- !u!114 &11407804
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -725,13 +725,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 3
mWidth: 180
mHeight: 46
mWidth: 210
mHeight: 50
mDepth: 9
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 3.9130435
aspectRatio: 4.2
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0}
......@@ -999,7 +999,7 @@ MonoBehaviour:
rightAnchor:
target: {fileID: 498562}
relative: 1
absolute: 35
absolute: 65
bottomAnchor:
target: {fileID: 498562}
relative: 1
......@@ -1011,13 +1011,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 3
mWidth: 240
mWidth: 270
mHeight: 48
mDepth: 6
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 5
aspectRatio: 5.625
--- !u!114 &11430404
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -1218,29 +1218,29 @@ MonoBehaviour:
leftAnchor:
target: {fileID: 498562}
relative: 0
absolute: -12
absolute: 11
rightAnchor:
target: {fileID: 498562}
relative: 1
absolute: 12
absolute: -11
bottomAnchor:
target: {fileID: 498562}
relative: 1
absolute: -175
absolute: -172
topAnchor:
target: {fileID: 498562}
relative: 1
absolute: -155
absolute: -158
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 240
mHeight: 20
mWidth: 194
mHeight: 14
mDepth: 0
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 12
aspectRatio: 13.857142
mType: 0
mFillDirection: 4
mFillAmount: 1
......@@ -1361,13 +1361,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 0}
mPivot: 4
mWidth: 50
mHeight: 55
mWidth: 51
mHeight: 54
mDepth: 8
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 0.90909094
aspectRatio: 0.9444444
mType: 0
mFillDirection: 4
mFillAmount: 1
......@@ -1424,7 +1424,7 @@ MonoBehaviour:
absolute: 0
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mPivot: 1
mWidth: 216
mHeight: 135
mDepth: 0
......@@ -1603,13 +1603,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 0}
mPivot: 4
mWidth: 50
mHeight: 55
mWidth: 51
mHeight: 54
mDepth: 8
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 0.90909094
aspectRatio: 0.9444444
mType: 0
mFillDirection: 4
mFillAmount: 1
......@@ -1653,13 +1653,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 3
mWidth: 180
mWidth: 210
mHeight: 50
mDepth: 9
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 3.6
aspectRatio: 4.2
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0}
......@@ -1760,13 +1760,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 0}
mPivot: 4
mWidth: 50
mHeight: 55
mWidth: 51
mHeight: 54
mDepth: 8
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 0.90909094
aspectRatio: 0.9444444
mType: 0
mFillDirection: 4
mFillAmount: 1
......@@ -1892,13 +1892,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 3
mWidth: 180
mWidth: 210
mHeight: 50
mDepth: 9
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 3.6
aspectRatio: 4.2
keepCrispWhenShrunk: 1
mTrueTypeFont: {fileID: 12800000, guid: f775853fdfd14bb47934543e95c3bae3, type: 3}
mFont: {fileID: 0}
......@@ -1988,7 +1988,7 @@ MonoBehaviour:
rightAnchor:
target: {fileID: 498562}
relative: 1
absolute: 35
absolute: 65
bottomAnchor:
target: {fileID: 498562}
relative: 1
......@@ -2000,13 +2000,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 3
mWidth: 240
mWidth: 270
mHeight: 48
mDepth: 6
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 5
aspectRatio: 5.625
--- !u!114 &11495680
MonoBehaviour:
m_ObjectHideFlags: 1
......
......@@ -9691,21 +9691,21 @@ MonoBehaviour:
bottomAnchor:
target: {fileID: 484650}
relative: 0
absolute: -3
absolute: 25
topAnchor:
target: {fileID: 484650}
relative: 1
absolute: 3
absolute: -25
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 744
mHeight: 696
mHeight: 640
mDepth: -100
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 1.0689656
aspectRatio: 1.122172
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