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
28cb43aa
Commit
28cb43aa
authored
Sep 03, 2021
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
ac18f70c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
9 deletions
+60
-9
Assets/Scripts/BackgroundLoader.cs
Assets/Scripts/BackgroundLoader.cs
+13
-0
Assets/Scripts/BackgroundLoader.cs.meta
Assets/Scripts/BackgroundLoader.cs.meta
+11
-0
Assets/SibylSystem/Setting/Setting.cs
Assets/SibylSystem/Setting/Setting.cs
+22
-8
Assets/main.unity
Assets/main.unity
+14
-1
No files found.
Assets/Scripts/BackgroundLoader.cs
0 → 100644
View file @
28cb43aa
using
System.IO
;
using
UnityEngine
;
using
UnityEngine.Video
;
public
class
BackgroundLoader
:
MonoBehaviour
{
private
void
Awake
()
{
var
player
=
GetComponent
<
VideoPlayer
>();
player
.
url
=
Path
.
Combine
(
Directory
.
GetCurrentDirectory
(),
player
.
url
);
player
.
Play
();
}
}
\ No newline at end of file
Assets/Scripts/BackgroundLoader.cs.meta
0 → 100644
View file @
28cb43aa
fileFormatVersion: 2
guid: 25bc0a946ac1a4e4d985361ed2266cd9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: -1100
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/SibylSystem/Setting/Setting.cs
View file @
28cb43aa
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.Assertions
;
using
UnityEngine.Assertions
;
...
@@ -26,10 +27,6 @@ public class Setting : WindowServant2D
...
@@ -26,10 +27,6 @@ public class Setting : WindowServant2D
setting
=
gameObject
.
GetComponentInChildren
<
LAZYsetting
>();
setting
=
gameObject
.
GetComponentInChildren
<
LAZYsetting
>();
_screen
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
);
_screen
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
);
_screen
.
items
=
new
[]
{
new
Resolution
{
width
=
1300
,
height
=
700
}
}.
Concat
(
Screen
.
resolutions
)
.
Select
(
r
=>
$"
{
r
.
width
}
x
{
r
.
height
}
"
)
.
Distinct
()
.
ToList
();
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"exit_"
,
onClickExit
);
UIHelper
.
registEvent
(
gameObject
,
"screen_"
,
resizeScreen
);
UIHelper
.
registEvent
(
gameObject
,
"screen_"
,
resizeScreen
);
...
@@ -133,6 +130,23 @@ public class Setting : WindowServant2D
...
@@ -133,6 +130,23 @@ public class Setting : WindowServant2D
{
{
var
target
=
$"
{
Screen
.
width
}
x
{
Screen
.
height
}
"
;
var
target
=
$"
{
Screen
.
width
}
x
{
Screen
.
height
}
"
;
if
(
_screen
.
value
!=
target
)
_screen
.
value
=
target
;
if
(
_screen
.
value
!=
target
)
_screen
.
value
=
target
;
_screen
.
items
=
(
Screen
.
fullScreen
?
Screen
.
resolutions
:
WindowResolutions
())
.
Select
(
r
=>
$"
{
r
.
width
}
x
{
r
.
height
}
"
)
.
Distinct
()
.
ToList
();
}
private
static
IEnumerable
<
Resolution
>
WindowResolutions
()
{
var
resolutions
=
new
List
<
Resolution
>();
var
max
=
Screen
.
resolutions
.
Last
();
for
(
var
height
=
560
;
height
<=
max
.
height
&&
height
*
1300
/
700
<=
max
.
width
;
height
+=
7
*
20
)
{
resolutions
.
Add
(
new
Resolution
{
width
=
height
*
1300
/
700
,
height
=
height
});
}
return
resolutions
;
}
}
private
void
onCP
()
private
void
onCP
()
...
@@ -234,7 +248,7 @@ public class Setting : WindowServant2D
...
@@ -234,7 +248,7 @@ public class Setting : WindowServant2D
UIHelper
.
RestoreWindow
();
UIHelper
.
RestoreWindow
();
var
mats
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
var
mats
=
UIHelper
.
getByName
<
UIPopupList
>(
gameObject
,
"screen_"
).
value
.
Split
(
new
[]
{
" x "
},
StringSplitOptions
.
RemoveEmptyEntries
);
.
Split
(
new
[]
{
" x "
},
StringSplitOptions
.
RemoveEmptyEntries
);
Assert
.
IsTrue
(
mats
.
Length
==
2
);
Assert
.
IsTrue
(
mats
.
Length
==
2
);
Screen
.
SetResolution
(
int
.
Parse
(
mats
[
0
]),
int
.
Parse
(
mats
[
1
]),
Screen
.
SetResolution
(
int
.
Parse
(
mats
[
0
]),
int
.
Parse
(
mats
[
1
]),
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
);
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"full_"
).
value
);
...
@@ -247,9 +261,9 @@ public class Setting : WindowServant2D
...
@@ -247,9 +261,9 @@ public class Setting : WindowServant2D
public
void
saveWhenQuit
()
public
void
saveWhenQuit
()
{
{
Config
.
Set
(
"vol_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vol_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"vol_"
,
((
int
)
(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vol_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"size_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"size_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"size_"
,
((
int
)
(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"size_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"vSize_"
,
((
int
)(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vSize_"
).
value
*
1000
)).
ToString
());
Config
.
Set
(
"vSize_"
,
((
int
)
(
UIHelper
.
getByName
<
UISlider
>(
gameObject
,
"vSize_"
).
value
*
1000
)).
ToString
());
//Config.Set("alpha_", ((int)(UIHelper.getByName<UISlider>(gameObject, "alpha_").value * 1000)).ToString());
//Config.Set("alpha_", ((int)(UIHelper.getByName<UISlider>(gameObject, "alpha_").value * 1000)).ToString());
Config
.
Set
(
"longField_"
,
Config
.
Set
(
"longField_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"longField_"
).
value
));
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"longField_"
).
value
));
...
...
Assets/main.unity
View file @
28cb43aa
...
@@ -1260,6 +1260,7 @@ GameObject:
...
@@ -1260,6 +1260,7 @@ GameObject:
serializedVersion
:
6
serializedVersion
:
6
m_Component
:
m_Component
:
-
component
:
{
fileID
:
947056520
}
-
component
:
{
fileID
:
947056520
}
-
component
:
{
fileID
:
947056521
}
-
component
:
{
fileID
:
947056519
}
-
component
:
{
fileID
:
947056519
}
m_Layer
:
8
m_Layer
:
8
m_Name
:
Background
m_Name
:
Background
...
@@ -1297,7 +1298,7 @@ VideoPlayer:
...
@@ -1297,7 +1298,7 @@ VideoPlayer:
m_EnabledAudioTracks
:
00
m_EnabledAudioTracks
:
00
m_DirectAudioMutes
:
00
m_DirectAudioMutes
:
00
m_ControlledAudioTrackCount
:
1
m_ControlledAudioTrackCount
:
1
m_PlayOnAwake
:
1
m_PlayOnAwake
:
0
m_SkipOnDrop
:
1
m_SkipOnDrop
:
1
m_Looping
:
1
m_Looping
:
1
m_WaitForFirstFrame
:
1
m_WaitForFirstFrame
:
1
...
@@ -1317,6 +1318,18 @@ Transform:
...
@@ -1317,6 +1318,18 @@ Transform:
m_Father
:
{
fileID
:
0
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
10
m_RootOrder
:
10
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&947056521
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
947056518
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
25bc0a946ac1a4e4d985361ed2266cd9
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!1001
&949649613
---
!u!1001
&949649613
PrefabInstance
:
PrefabInstance
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
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