Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
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
hex
ygopro2
Commits
4694efba
Commit
4694efba
authored
Jun 14, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set default resolution to 1600x900
parent
b8b5d27a
Pipeline
#37628
failed
Changes
4
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
309 additions
and
171 deletions
+309
-171
Assets/SibylSystem/CardDescription/CardDescription.cs
Assets/SibylSystem/CardDescription/CardDescription.cs
+60
-42
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+119
-81
Assets/SibylSystem/ResourceManagers/UnityFileDownloader.cs
Assets/SibylSystem/ResourceManagers/UnityFileDownloader.cs
+0
-2
Assets/SibylSystem/Setting/Setting.cs
Assets/SibylSystem/Setting/Setting.cs
+130
-46
No files found.
Assets/SibylSystem/CardDescription/CardDescription.cs
View file @
4694efba
using
UnityEngine
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
CardDescription
:
Servant
...
...
@@ -20,10 +20,9 @@ public class CardDescription : Servant
public
override
void
initialize
()
{
gameObject
=
create
(
gameObject
=
create
(
Program
.
I
().
new_ui_cardDescription
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
256
,
Screen
.
height
/
2
,
600
)),
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
256
,
Screen
.
height
/
2
,
600
)),
new
Vector3
(
0
,
0
,
0
),
true
,
Program
.
ui_back_ground_2d
...
...
@@ -39,7 +38,7 @@ public class CardDescription : Servant
monitor
=
UIHelper
.
getByName
<
UIPanel
>(
gameObject
,
"monitor"
);
deckPanel
=
gameObject
.
GetComponentInChildren
<
UIDeckPanel
>();
line
=
UIHelper
.
getByName
(
gameObject
,
"line"
);
UIHelper
.
registEvent
(
gameObject
,
"pre_"
,
onPre
);
UIHelper
.
registEvent
(
gameObject
,
"pre_"
,
onPre
);
UIHelper
.
registEvent
(
gameObject
,
"next_"
,
onNext
);
UIHelper
.
registEvent
(
gameObject
,
"big_"
,
onb
);
UIHelper
.
registEvent
(
gameObject
,
"small_"
,
ons
);
...
...
@@ -47,11 +46,9 @@ public class CardDescription : Servant
lineSprite
=
UIHelper
.
getByName
<
UISprite
>(
gameObject
,
"line"
);
try
{
description
.
textLabel
.
fontSize
=
int
.
Parse
(
Config
.
Get
(
"fontSize"
,
"24"
));
}
catch
(
System
.
Exception
e
)
{
description
.
textLabel
.
fontSize
=
int
.
Parse
(
Config
.
Get
(
"fontSize"
,
"24"
));
}
catch
(
System
.
Exception
e
)
{
}
read
();
myGraveStr
=
InterString
.
Get
(
"我方墓地:"
);
myExtraStr
=
InterString
.
Get
(
"我方额外:"
);
...
...
@@ -103,7 +100,13 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
{
underSprite
.
height
=
Screen
.
height
+
4
;
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
Screen
.
height
/
2
,
0
)),
1.2f
);
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
Screen
.
height
/
2
,
0
)
),
1.2f
);
setTitle
(
""
);
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
false
;
}
...
...
@@ -114,7 +117,11 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
{
underSprite
.
height
=
Screen
.
height
+
4
;
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
2
,
Screen
.
height
/
2
,
0
)),
1.2f
);
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
2
,
Screen
.
height
/
2
,
0
)),
1.2f
);
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
true
;
}
}
...
...
@@ -134,9 +141,7 @@ public class CardDescription : Servant
underSprite
.
width
=
ca
;
picSprite
.
height
=
cb
;
}
catch
(
System
.
Exception
e
)
{
}
catch
(
System
.
Exception
e
)
{
}
}
public
void
save
()
...
...
@@ -210,7 +215,13 @@ public class CardDescription : Servant
picLoader
.
loaded_code
=
-
1
;
currentCard
=
card
;
shiftCardShower
(
true
);
Program
.
go
(
50
,
()
=>
{
shiftCardShower
(
true
);
});
Program
.
go
(
50
,
()
=>
{
shiftCardShower
(
true
);
}
);
}
public
void
shiftCardShower
(
bool
show
)
...
...
@@ -244,7 +255,6 @@ public class CardDescription : Servant
string
opExtraStr
=
""
;
string
opBanishedStr
=
""
;
public
void
realizeMonitor
()
{
if
(
monitor
.
gameObject
.
activeInHierarchy
)
...
...
@@ -322,14 +332,18 @@ public class CardDescription : Servant
int
eachLine
=
0
;
float
monitorHeight
=
0
;
void
handleMonitorArea
(
List
<
gameCard
>
list
,
string
hint
)
void
handleMonitorArea
(
List
<
gameCard
>
list
,
string
hint
)
{
if
(
list
.
Count
>
0
)
{
deckPanel
.
labs
[
currentLabelIndex
].
gameObject
.
SetActive
(
true
);
deckPanel
.
labs
[
currentLabelIndex
].
text
=
hint
;
deckPanel
.
labs
[
currentLabelIndex
].
width
=
(
int
)(
monitor
.
width
-
12
);
deckPanel
.
labs
[
currentLabelIndex
].
transform
.
localPosition
=
new
Vector3
(
monitor
.
width
/
2
,
(
monitor
.
height
-
8
)
/
2
-
12
-
currentHeight
,
0
);
deckPanel
.
labs
[
currentLabelIndex
].
transform
.
localPosition
=
new
Vector3
(
monitor
.
width
/
2
,
(
monitor
.
height
-
8
)
/
2
-
12
-
currentHeight
,
0
);
currentLabelIndex
++;
currentHeight
+=
24
;
float
beginX
=
6
+
22
;
...
...
@@ -339,7 +353,11 @@ public class CardDescription : Servant
{
var
gp
=
UIHelper
.
get_hang_lie
(
i
,
eachLine
);
quickCards
[
currentCardIndex
].
reCode
(
list
[
i
].
get_data
().
Id
);
quickCards
[
currentCardIndex
].
transform
.
localPosition
=
new
Vector3
(
beginX
+
44
*
gp
.
y
,
beginY
-
60
*
gp
.
x
,
0
);
quickCards
[
currentCardIndex
].
transform
.
localPosition
=
new
Vector3
(
beginX
+
44
*
gp
.
y
,
beginY
-
60
*
gp
.
x
,
0
);
currentCardIndex
++;
}
int
hangshu
=
list
.
Count
/
eachLine
;
...
...
@@ -366,9 +384,9 @@ public class CardDescription : Servant
}
}
public
void
setData
(
YGOSharp
.
Card
card
,
Texture2D
def
,
string
tail
=
""
,
bool
force
=
false
)
public
void
setData
(
YGOSharp
.
Card
card
,
Texture2D
def
,
string
tail
=
""
,
bool
force
=
false
)
{
if
(
cardShowerWidget
.
alpha
==
0
&&
force
==
false
)
if
(
cardShowerWidget
.
alpha
==
0
&&
force
==
false
)
{
return
;
}
...
...
@@ -378,7 +396,7 @@ public class CardDescription : Servant
}
if
(
card
.
Id
==
0
)
{
apply
(
card
,
def
,
tail
);
apply
(
card
,
def
,
tail
);
return
;
}
if
(
datas
.
Count
>
0
)
...
...
@@ -389,7 +407,7 @@ public class CardDescription : Servant
{
card
=
card
,
def
=
def
,
tail
=
tail
tail
=
tail
,
};
if
(
datas
.
Count
>
300
)
{
...
...
@@ -400,13 +418,15 @@ public class CardDescription : Servant
return
;
}
}
datas
.
Add
(
new
data
datas
.
Add
(
new
data
{
card
=
card
,
def
=
def
,
tail
=
tail
});
if
(
datas
.
Count
>
300
)
tail
=
tail
,
}
);
if
(
datas
.
Count
>
300
)
{
datas
.
RemoveAt
(
0
);
}
...
...
@@ -416,7 +436,7 @@ public class CardDescription : Servant
public
void
setTitle
(
string
title
)
{
UIHelper
.
trySetLableText
(
gameObject
,
"title_"
,
title
);
UIHelper
.
trySetLableText
(
gameObject
,
"title_"
,
title
);
}
List
<
string
>
Logs
=
new
List
<
string
>();
...
...
@@ -442,7 +462,7 @@ public class CardDescription : Servant
void
clearOneLog
()
{
if
(
Logs
.
Count
>
0
)
if
(
Logs
.
Count
>
0
)
{
Logs
.
RemoveAt
(
0
);
string
all
=
""
;
...
...
@@ -454,17 +474,15 @@ public class CardDescription : Servant
{
all
=
all
.
Substring
(
0
,
all
.
Length
-
1
);
}
catch
(
System
.
Exception
e
)
{
}
catch
(
System
.
Exception
e
)
{
}
UIHelper
.
trySetLableTextList
(
UIHelper
.
getByName
(
gameObject
,
"chat_"
),
all
);
}
else
{
UIHelper
.
trySetLableTextList
(
UIHelper
.
getByName
(
gameObject
,
"chat_"
),
""
);
}
}
public
void
clearAllLog
()
{
Program
.
notGo
(
clearOneLog
);
...
...
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
4694efba
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/ResourceManagers/UnityFileDownloader.cs
View file @
4694efba
...
...
@@ -51,7 +51,6 @@ public class UnityFileDownloader
File
.
Delete
(
filePath
);
}
File
.
Move
(
tempFilePath
,
filePath
);
// 使用 string.Format 替换了插值字符串
Debug
.
Log
(
string
.
Format
(
"下载成功: {0} -> {1}"
,
url
,
filePath
));
if
(
onComplete
!=
null
)
...
...
@@ -61,7 +60,6 @@ public class UnityFileDownloader
}
else
{
// 使用 string.Format 替换了插值字符串
Debug
.
LogError
(
string
.
Format
(
"下载失败: {0}\n错误信息: {1}"
,
url
,
uwr
.
error
));
if
(
File
.
Exists
(
tempFilePath
))
{
...
...
Assets/SibylSystem/Setting/Setting.cs
View file @
4694efba
This diff is collapsed.
Click to expand it.
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