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
Show 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.Collections.Generic
;
using
DG.Tweening
;
using
UnityEngine
;
using
YGOSharp
;
using
YGOSharp.OCGWrapper.Enums
;
...
...
@@ -127,8 +128,8 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
{
underSprite
.
height
=
Utils
.
UIHeight
()
+
4
;
iTween
.
MoveTo
(
gameObject
,
Program
.
I
().
camera_main_2d
.
Screen
ToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
gameObject
.
transform
.
DOMove
(
Utils
.
UI
ToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
1.2f
);
setTitle
(
""
);
...
...
@@ -141,9 +142,7 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
{
underSprite
.
height
=
Utils
.
UIHeight
()
+
4
;
iTween
.
MoveTo
(
gameObject
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
2
,
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
1.2f
);
gameObject
.
transform
.
DOMove
(
Utils
.
UIToWorldPoint
(
new
Vector3
(-
2
,
(
float
)
Utils
.
UIHeight
()
/
2
,
0
)),
1.2f
);
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
true
;
}
}
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
b15c84b7
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text
;
using
DG.Tweening
;
using
UnityEngine
;
using
YGOSharp
;
using
YGOSharp.OCGWrapper.Enums
;
...
...
@@ -817,8 +818,9 @@ public class DeckManager : ServantWithCardDescription
{
base
.
applyHideArrangement
();
Program
.
cameraFacing
=
false
;
iTween
.
MoveTo
(
gameObjectSearch
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
+
600
,
Screen
.
height
/
2
,
600
)),
1.2f
);
gameObjectSearch
.
transform
.
DOMove
(
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
+
600
,
(
float
)
Utils
.
UIHeight
()
/
2
,
600
)),
1.2f
);
refreshDetail
();
}
...
...
@@ -827,9 +829,9 @@ public class DeckManager : ServantWithCardDescription
base
.
applyShowArrangement
();
Program
.
cameraFacing
=
true
;
var
tex
=
UIHelper
.
getByName
<
UITexture
>(
gameObjectSearch
,
"under_"
);
tex
.
height
=
Screen
.
height
;
iTween
.
MoveTo
(
gameObjectSearch
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
tex
.
width
/
2
,
Screen
.
height
/
2
,
0
)),
tex
.
height
=
Utils
.
UIHeight
()
;
gameObjectSearch
.
transform
.
DOMove
(
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
-
tex
.
width
/
2
,
(
float
)
Utils
.
UIHeight
()
/
2
,
60
0
)),
1.2f
);
refreshDetail
();
}
...
...
@@ -1040,49 +1042,49 @@ public class DeckManager : ServantWithCardDescription
{
if
(
isShowed
)
{
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
{
//
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
.
GetComponent
<
UITexture
>().
height
=
Screen
.
height
;
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
I
().
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
345f
,
Screen
.
height
*
0.5f
,
0
)),
0.6f
);
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Utils
.
UIHeight
()
;
gameObjectDetailedSearch
.
transform
.
DOMove
(
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
-
345f
,
Utils
.
UIHeight
()
*
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
);
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Utils
.
UIHeight
()
;
gameObjectDetailedSearch
.
transform
.
DOMove
(
Utils
.
UIToWorldPoint
(
new
Vector3
(
Utils
.
UIWidth
()
-
345f
,
Utils
.
UIHeight
()
*
1.5f
,
0
)),
0.6f
);
reShowBar
(
0
,
230
);
}
}
//
}
}
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