Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赤子奈落
YGOProUnity_V2
Commits
b15c84b7
Commit
b15c84b7
authored
Sep 02, 2021
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deck
parent
62b29ea9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
48 deletions
+85
-48
Assets/Scripts/Utils.cs
Assets/Scripts/Utils.cs
+25
-0
Assets/Scripts/Utils.cs.meta
Assets/Scripts/Utils.cs.meta
+11
-0
Assets/SibylSystem/CardDescription/CardDescription.cs
Assets/SibylSystem/CardDescription/CardDescription.cs
+4
-5
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+45
-43
No files found.
Assets/Scripts/Utils.cs
0 → 100644
View file @
b15c84b7
using
UnityEngine
;
public
static
class
Utils
{
public
static
int
UIHeight
()
{
return
Program
.
I
().
ui_back_ground_2d
.
GetComponent
<
UIRoot
>().
activeHeight
;
}
public
static
int
UIWidth
()
{
return
UIHeight
()
*
Screen
.
width
/
Screen
.
height
;
}
public
static
Vector3
UIToWorldPoint
(
Vector3
point
)
{
return
Program
.
I
().
camera_back_ground_2d
.
ViewportToWorldPoint
(
new
Vector3
(
point
.
x
/
UIWidth
(),
point
.
y
/
UIHeight
(),
point
.
z
));
}
// public static float UIScale()
// {
// return Program.I().ui_back_ground_2d.GetComponent<UIRoot>().activeScaling;
// }
}
\ No newline at end of file
Assets/Scripts/Utils.cs.meta
0 → 100644
View file @
b15c84b7
fileFormatVersion: 2
guid: b73ea0399398c89459a9821cbfc4ffc7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/CardDescription/CardDescription.cs
View file @
b15c84b7
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
DG.Tweening
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp
;
using
YGOSharp
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
...
@@ -127,8 +128,8 @@ public class CardDescription : Servant
...
@@ -127,8 +128,8 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
if
(
gameObject
!=
null
)
{
{
underSprite
.
height
=
Utils
.
UIHeight
()
+
4
;
underSprite
.
height
=
Utils
.
UIHeight
()
+
4
;
iTween
.
MoveTo
(
gameObject
,
gameObject
.
transform
.
DOMove
(
Program
.
I
().
camera_main_2d
.
Screen
ToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
Utils
.
UI
ToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
1.2f
);
1.2f
);
setTitle
(
""
);
setTitle
(
""
);
...
@@ -141,9 +142,7 @@ public class CardDescription : Servant
...
@@ -141,9 +142,7 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
if
(
gameObject
!=
null
)
{
{
underSprite
.
height
=
Utils
.
UIHeight
()
+
4
;
underSprite
.
height
=
Utils
.
UIHeight
()
+
4
;
iTween
.
MoveTo
(
gameObject
,
gameObject
.
transform
.
DOMove
(
Utils
.
UIToWorldPoint
(
new
Vector3
(-
2
,
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
1.2f
);
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
2
,
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
1.2f
);
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
true
;
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
true
;
}
}
}
}
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
b15c84b7
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Text
;
using
System.Text
;
using
DG.Tweening
;
using
UnityEngine
;
using
UnityEngine
;
using
YGOSharp
;
using
YGOSharp
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
...
@@ -817,8 +818,9 @@ public class DeckManager : ServantWithCardDescription
...
@@ -817,8 +818,9 @@ public class DeckManager : ServantWithCardDescription
{
{
base
.
applyHideArrangement
();
base
.
applyHideArrangement
();
Program
.
cameraFacing
=
false
;
Program
.
cameraFacing
=
false
;
iTween
.
MoveTo
(
gameObjectSearch
,
gameObjectSearch
.
transform
.
DOMove
(
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
+
600
,
Screen
.
height
/
2
,
600
)),
1.2f
);
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
+
600
,
(
float
)
Utils
.
UIHeight
()
/
2
,
600
)),
1.2f
);
refreshDetail
();
refreshDetail
();
}
}
...
@@ -827,9 +829,9 @@ public class DeckManager : ServantWithCardDescription
...
@@ -827,9 +829,9 @@ public class DeckManager : ServantWithCardDescription
base
.
applyShowArrangement
();
base
.
applyShowArrangement
();
Program
.
cameraFacing
=
true
;
Program
.
cameraFacing
=
true
;
var
tex
=
UIHelper
.
getByName
<
UITexture
>(
gameObjectSearch
,
"under_"
);
var
tex
=
UIHelper
.
getByName
<
UITexture
>(
gameObjectSearch
,
"under_"
);
tex
.
height
=
Screen
.
height
;
tex
.
height
=
Utils
.
UIHeight
()
;
iTween
.
MoveTo
(
gameObjectSearch
,
gameObjectSearch
.
transform
.
DOMove
(
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
tex
.
width
/
2
,
Screen
.
height
/
2
,
0
)),
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
-
tex
.
width
/
2
,
(
float
)
Utils
.
UIHeight
()
/
2
,
60
0
)),
1.2f
);
1.2f
);
refreshDetail
();
refreshDetail
();
}
}
...
@@ -1040,49 +1042,49 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1040,49 +1042,49 @@ public class DeckManager : ServantWithCardDescription
{
{
if
(
isShowed
)
if
(
isShowed
)
{
{
if
(
Screen
.
height
<
700
)
// if (Screen.height < 700)
// {
// gameObjectDetailedSearch.transform.localScale = new Vector3(Screen.height / 700f,
// Screen.height / 700f, Screen.height / 700f);
// if (detailShowed)
// {
// gameObjectDetailedSearch.GetComponent<UITexture>().height = 700;
// iTween.MoveTo(gameObjectDetailedSearch,
// Program.I().camera_main_2d.ScreenToWorldPoint(
// new Vector3(Screen.width - 230 - 115f * Screen.height / 700f, Screen.height * 0.5f, 0)),
// 0.6f);
// reShowBar(0, 230 + 230 * Screen.height / 700f);
// }
// else
// {
// gameObjectDetailedSearch.GetComponent<UITexture>().height = 700;
// iTween.MoveTo(gameObjectDetailedSearch,
// Program.I().camera_main_2d.ScreenToWorldPoint(
// new Vector3(Screen.width - 230 - 115f * Screen.height / 700f, Screen.height * 1.5f, 0)),
// 0.6f);
// reShowBar(0, 230);
// }
// }
// else
// {
gameObjectDetailedSearch
.
transform
.
localScale
=
Vector3
.
one
;
if
(
detailShowed
)
{
{
gameObjectDetailedSearch
.
transform
.
localScale
=
new
Vector3
(
Screen
.
height
/
700f
,
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Utils
.
UIHeight
();
Screen
.
height
/
700f
,
Screen
.
height
/
700f
);
gameObjectDetailedSearch
.
transform
.
DOMove
(
if
(
detailShowed
)
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
-
345f
,
{
Utils
.
UIHeight
()
*
0.5f
,
0
)),
0.6f
);
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
700
;
reShowBar
(
0
,
460
);
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
230
-
115f
*
Screen
.
height
/
700f
,
Screen
.
height
*
0.5f
,
0
)),
0.6f
);
reShowBar
(
0
,
230
+
230
*
Screen
.
height
/
700f
);
}
else
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
700
;
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
230
-
115f
*
Screen
.
height
/
700f
,
Screen
.
height
*
1.5f
,
0
)),
0.6f
);
reShowBar
(
0
,
230
);
}
}
}
else
else
{
{
gameObjectDetailedSearch
.
transform
.
localScale
=
Vector3
.
one
;
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Utils
.
UIHeight
();
if
(
detailShowed
)
gameObjectDetailedSearch
.
transform
.
DOMove
(
{
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
-
345f
,
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Screen
.
height
;
Utils
.
UIHeight
()
*
1.5f
,
0
)),
0.6f
);
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
reShowBar
(
0
,
230
);
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
345f
,
Screen
.
height
*
0.5f
,
0
)),
0.6f
);
reShowBar
(
0
,
460
);
}
else
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Screen
.
height
;
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
345f
,
Screen
.
height
*
1.5f
,
0
)),
0.6f
);
reShowBar
(
0
,
230
);
}
}
}
// }
}
}
else
else
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment