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
fallenstardust
YGOProUnity_V2
Commits
8632f1b2
Commit
8632f1b2
authored
Sep 05, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.mycard.moe:mycard/YGOProUnity_V2
parents
0b3824f0
58053191
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
189 additions
and
33 deletions
+189
-33
Assets/NGUI/Scripts/Interaction/UIScrollView.cs
Assets/NGUI/Scripts/Interaction/UIScrollView.cs
+25
-25
Assets/Scripts/BackgroundLoader.cs
Assets/Scripts/BackgroundLoader.cs
+6
-0
Assets/SibylSystem/BackGroundPic.meta
Assets/SibylSystem/BackGroundPic.meta
+9
-0
Assets/SibylSystem/BackGroundPic/BackGroundPic.cs
Assets/SibylSystem/BackGroundPic/BackGroundPic.cs
+54
-0
Assets/SibylSystem/BackGroundPic/BackGroundPic.cs.meta
Assets/SibylSystem/BackGroundPic/BackGroundPic.cs.meta
+12
-0
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+8
-0
Assets/main.unity
Assets/main.unity
+74
-7
ci/upload-packager.sh
ci/upload-packager.sh
+1
-1
No files found.
Assets/NGUI/Scripts/Interaction/UIScrollView.cs
View file @
8632f1b2
...
...
@@ -320,31 +320,31 @@ public class UIScrollView : MonoBehaviour
mPanel
.
clipping
=
UIDrawCall
.
Clipping
.
ConstrainButDontClip
;
// Auto-upgrade
if
(
movement
!=
Movement
.
Custom
&&
scale
.
sqrMagnitude
>
0.001f
)
{
if
(
scale
.
x
==
1f
&&
scale
.
y
==
0f
)
{
movement
=
Movement
.
Horizontal
;
}
else
if
(
scale
.
x
==
0f
&&
scale
.
y
==
1f
)
{
movement
=
Movement
.
Vertical
;
}
else
if
(
scale
.
x
==
1f
&&
scale
.
y
==
1f
)
{
movement
=
Movement
.
Unrestricted
;
}
else
{
movement
=
Movement
.
Custom
;
customMovement
.
x
=
scale
.
x
;
customMovement
.
y
=
scale
.
y
;
}
scale
=
Vector3
.
zero
;
#if UNITY_EDITOR
NGUITools
.
SetDirty
(
this
);
#endif
}
//
if (movement != Movement.Custom && scale.sqrMagnitude > 0.001f)
//
{
//
if (scale.x == 1f && scale.y == 0f)
//
{
//
movement = Movement.Horizontal;
//
}
//
else if (scale.x == 0f && scale.y == 1f)
//
{
//
movement = Movement.Vertical;
//
}
//
else if (scale.x == 1f && scale.y == 1f)
//
{
//
movement = Movement.Unrestricted;
//
}
//
else
//
{
//
movement = Movement.Custom;
//
customMovement.x = scale.x;
//
customMovement.y = scale.y;
//
}
//
scale = Vector3.zero;
//
#if UNITY_EDITOR
//
NGUITools.SetDirty(this);
//
#endif
//
}
// Auto-upgrade
if
(
contentPivot
==
UIWidget
.
Pivot
.
TopLeft
&&
relativePositionOnReset
!=
Vector2
.
zero
)
...
...
Assets/Scripts/BackgroundLoader.cs
View file @
8632f1b2
...
...
@@ -6,6 +6,12 @@ public class BackgroundLoader : MonoBehaviour
{
private
void
Awake
()
{
if
(
File
.
Exists
(
"texture/common/desk.jpg"
))
{
gameObject
.
SetActive
(
false
);
return
;
}
var
player
=
GetComponent
<
VideoPlayer
>();
player
.
url
=
Path
.
Combine
(
Directory
.
GetCurrentDirectory
(),
player
.
url
);
player
.
Play
();
...
...
Assets/SibylSystem/BackGroundPic.meta
0 → 100644
View file @
8632f1b2
fileFormatVersion: 2
guid: 02562de1ff370374c848316954f52829
folderAsset: yes
timeCreated: 1471827270
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/BackGroundPic/BackGroundPic.cs
0 → 100644
View file @
8632f1b2
using
System.IO
;
using
UnityEngine
;
public
class
BackGroundPic
:
Servant
{
private
GameObject
backGround
;
public
override
void
initialize
()
{
backGround
=
Program
.
I
().
mod_simple_ngui_background_texture
;
if
(!
File
.
Exists
(
"texture/common/desk.jpg"
))
{
backGround
.
SetActive
(
false
);
return
;
}
var
file
=
new
FileStream
(
"texture/common/desk.jpg"
,
FileMode
.
Open
,
FileAccess
.
Read
);
file
.
Seek
(
0
,
SeekOrigin
.
Begin
);
var
data
=
new
byte
[
file
.
Length
];
file
.
Read
(
data
,
0
,
(
int
)
file
.
Length
);
file
.
Close
();
file
.
Dispose
();
file
=
null
;
var
pic
=
new
Texture2D
(
1920
,
1080
);
pic
.
LoadImage
(
data
);
backGround
.
GetComponent
<
UITexture
>().
mainTexture
=
pic
;
backGround
.
GetComponent
<
UITexture
>().
depth
=
-
100
;
}
public
override
void
applyShowArrangement
()
{
if
(!
backGround
.
activeInHierarchy
)
return
;
var
component
=
backGround
.
GetComponent
<
UITexture
>();
var
texture
=
component
.
mainTexture
;
if
(
texture
.
width
<=
texture
.
height
*
Screen
.
width
/
Screen
.
height
)
{
// 图窄屏幕宽,用宽度
component
.
width
=
Utils
.
UIWidth
()
+
2
;
component
.
height
=
component
.
width
*
texture
.
height
/
texture
.
width
;
}
else
{
// 图宽屏幕窄,用高度
component
.
height
=
Utils
.
UIHeight
()
+
2
;
component
.
width
=
component
.
height
*
texture
.
width
/
texture
.
height
;
}
}
public
override
void
applyHideArrangement
()
{
applyShowArrangement
();
}
}
\ No newline at end of file
Assets/SibylSystem/BackGroundPic/BackGroundPic.cs.meta
0 → 100644
View file @
8632f1b2
fileFormatVersion: 2
guid: 514965db09cb19c4d90f70d82be4ec00
timeCreated: 1471827484
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/Program.cs
View file @
8632f1b2
...
...
@@ -30,6 +30,7 @@ public class Program : MonoBehaviour
[
Header
(
"ui_back_ground_2d"
)]
public
Camera
camera_back_ground_2d
;
public
GameObject
mod_simple_ngui_background_texture
;
public
GameObject
new_ui_cardDescription
;
public
GameObject
new_ui_search
;
public
gameInfo
new_ui_gameInfo
;
...
...
@@ -290,6 +291,9 @@ public class Program : MonoBehaviour
UIHelper
.
iniFaces
();
initializeALLcameras
();
fixALLcamerasPreFrame
();
backGroundPic
=
new
BackGroundPic
();
servants
.
Add
(
backGroundPic
);
backGroundPic
.
fixScreenProblem
();
// });
// go(300, () =>
// {
...
...
@@ -715,6 +719,7 @@ public class Program : MonoBehaviour
private
readonly
List
<
Servant
>
servants
=
new
List
<
Servant
>();
public
Servant
backGroundPic
;
public
Menu
menu
;
public
Setting
setting
;
public
selectDeck
selectDeck
;
...
...
@@ -757,6 +762,7 @@ public class Program : MonoBehaviour
public
void
shiftToServant
(
Servant
to
)
{
if
(
to
!=
backGroundPic
&&
backGroundPic
.
isShowed
)
backGroundPic
.
hide
();
if
(
to
!=
menu
&&
menu
.
isShowed
)
menu
.
hide
();
if
(
to
!=
setting
&&
setting
.
isShowed
)
setting
.
hide
();
if
(
to
!=
selectDeck
&&
selectDeck
.
isShowed
)
selectDeck
.
hide
();
...
...
@@ -768,6 +774,7 @@ public class Program : MonoBehaviour
if
(
to
!=
puzzleMode
&&
puzzleMode
.
isShowed
)
puzzleMode
.
hide
();
if
(
to
!=
aiRoom
&&
aiRoom
.
isShowed
)
aiRoom
.
hide
();
if
(
to
==
backGroundPic
&&
backGroundPic
.
isShowed
==
false
)
backGroundPic
.
show
();
if
(
to
==
menu
&&
menu
.
isShowed
==
false
)
menu
.
show
();
if
(
to
==
setting
&&
setting
.
isShowed
==
false
)
setting
.
show
();
if
(
to
==
selectDeck
&&
selectDeck
.
isShowed
==
false
)
selectDeck
.
show
();
...
...
@@ -904,6 +911,7 @@ public class Program : MonoBehaviour
private
void
gameStart
()
{
if
(
UIHelper
.
shouldMaximize
())
UIHelper
.
MaximizeWindow
();
backGroundPic
.
show
();
shiftToServant
(
menu
);
}
...
...
Assets/main.unity
View file @
8632f1b2
...
...
@@ -217,7 +217,7 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
407516
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
3
value
:
4
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
407516
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -849,7 +849,7 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
433886
,
guid
:
dd57848b7cec7c441b1e5e16bfaf237f
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
1
value
:
2
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
433886
,
guid
:
dd57848b7cec7c441b1e5e16bfaf237f
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -944,7 +944,7 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
468652
,
guid
:
589b9f7f12556814fb7cc2371ef35649
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
2
value
:
3
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
468652
,
guid
:
589b9f7f12556814fb7cc2371ef35649
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -1194,6 +1194,12 @@ Camera:
type
:
3
}
m_PrefabInstance
:
{
fileID
:
863808012
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&865207707
stripped
GameObject
:
m_CorrespondingSourceObject
:
{
fileID
:
197510
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
1852062175
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1001
&923674925
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
@@ -1611,7 +1617,7 @@ PrefabInstance:
-
target
:
{
fileID
:
11419100
,
guid
:
995e2fa1a1156d248955c5fb98502585
,
type
:
3
}
propertyPath
:
mod_simple_ngui_background_texture
value
:
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
865207707
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
995e2fa1a1156d248955c5fb98502585
,
type
:
3
}
---
!u!1
&1283106570
stripped
...
...
@@ -1903,6 +1909,67 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
0ba65c521a7de0d46a9e31380654c3b4
,
type
:
3
}
---
!u!1001
&1852062175
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
737802523
}
m_Modifications
:
-
target
:
{
fileID
:
197510
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_Name
value
:
mod_background_texture
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
197510
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
410492
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
4bcf544bc00b6e84daf5bf79d2238069
,
type
:
3
}
---
!u!1001
&1891339901
PrefabInstance
:
m_ObjectHideFlags
:
0
...
...
@@ -2060,15 +2127,15 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
455926
,
guid
:
110e0a191727d5f4f8860ae0957652dd
,
type
:
3
}
propertyPath
:
m_LocalScale.x
value
:
0.002
8571428
value
:
0.002
7359782
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
455926
,
guid
:
110e0a191727d5f4f8860ae0957652dd
,
type
:
3
}
propertyPath
:
m_LocalScale.y
value
:
0.002
8571428
value
:
0.002
7359782
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
455926
,
guid
:
110e0a191727d5f4f8860ae0957652dd
,
type
:
3
}
propertyPath
:
m_LocalScale.z
value
:
0.002
8571428
value
:
0.002
7359782
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
455926
,
guid
:
110e0a191727d5f4f8860ae0957652dd
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
ci/upload-packager.sh
View file @
8632f1b2
...
...
@@ -10,7 +10,7 @@ token=$(echo $loginInfo | jq '.token' | sed 's/"//g')
header
=
"Authorization:
$token
"
echo
"Login succeeded."
appName
=
"ygopro"
appName
=
"ygopro
2
"
handleErrorMessage
()
{
rawJsonInput
=
"
$1
"
...
...
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