Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
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
JQY
MDPro3
Commits
3bd6fff1
Commit
3bd6fff1
authored
Jan 02, 2026
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
94cf7695
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
18 deletions
+99
-18
Assets/Prefabs/ServantUI/Parts/DeckView.prefab
Assets/Prefabs/ServantUI/Parts/DeckView.prefab
+1
-1
Assets/Scripts/MDPro3/Helper/Config.cs
Assets/Scripts/MDPro3/Helper/Config.cs
+9
-3
Assets/Scripts/MDPro3/Net/MyCard.cs
Assets/Scripts/MDPro3/Net/MyCard.cs
+1
-2
Assets/Scripts/MDPro3/UI/Function/RectLoopMoveY.cs
Assets/Scripts/MDPro3/UI/Function/RectLoopMoveY.cs
+86
-12
Assets/Scripts/MDPro3/UI/UIWidget/Deck/DeckView.cs
Assets/Scripts/MDPro3/UI/UIWidget/Deck/DeckView.cs
+2
-0
No files found.
Assets/Prefabs/ServantUI/Parts/DeckView.prefab
View file @
3bd6fff1
...
@@ -36,7 +36,7 @@ RectTransform:
...
@@ -36,7 +36,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
-0
,
z
:
-0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
-0
,
z
:
-0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
22
,
y
:
-2
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
44
,
y
:
44
}
m_SizeDelta
:
{
x
:
44
,
y
:
44
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&579422588954085143
---
!u!114
&579422588954085143
...
...
Assets/Scripts/MDPro3/Helper/Config.cs
View file @
3bd6fff1
...
@@ -194,15 +194,21 @@ namespace MDPro3
...
@@ -194,15 +194,21 @@ namespace MDPro3
public
static
string
GetConfigDeckName
(
bool
containType
=
true
)
public
static
string
GetConfigDeckName
(
bool
containType
=
true
)
{
{
var
config
=
Get
(
"DeckInUse"
,
EMPTY_STRING
);
var
config
=
Get
(
"DeckInUse"
,
EMPTY_STRING
);
if
(!
containType
&&
config
.
Contains
(
"/"
))
if
(
config
.
StartsWith
(
"/"
)
&&
config
.
Length
>
1
)
config
=
config
[
1.
.];
if
(!
containType
&&
config
.
Contains
(
"/"
))
config
=
Path
.
GetFileName
(
config
);
config
=
Path
.
GetFileName
(
config
);
return
config
;
return
config
;
}
}
public
static
void
SetConfigDeck
(
string
deckName
,
bool
needCheck
=
false
)
public
static
void
SetConfigDeck
(
string
deckName
,
bool
needCheck
=
false
)
{
{
if
(
needCheck
)
if
(
needCheck
)
Set
(
"DeckInUse"
,
$"
{
Program
.
instance
.
deckSelector
.
DeckType
}
/
{
deckName
}
"
);
{
var
type
=
Program
.
instance
.
deckSelector
.
DeckType
;
var
config
=
type
==
string
.
Empty
?
deckName
:
$"
{
type
}
/
{
deckName
}
"
;
Set
(
"DeckInUse"
,
config
);
}
else
else
Set
(
"DeckInUse"
,
deckName
);
Set
(
"DeckInUse"
,
deckName
);
}
}
...
...
Assets/Scripts/MDPro3/Net/MyCard.cs
View file @
3bd6fff1
...
@@ -474,8 +474,7 @@ namespace MDPro3.Net
...
@@ -474,8 +474,7 @@ namespace MDPro3.Net
Bad
(
"no token"
);
Bad
(
"no token"
);
var
token
=
account
.
token
;
var
token
=
account
.
token
;
var
url
=
authUrl
;
using
var
request
=
UnityWebRequest
.
Get
(
authUrl
);
using
var
request
=
UnityWebRequest
.
Get
(
url
);
request
.
SetRequestHeader
(
"Authorization"
,
$"Bearer
{
token
}
"
);
request
.
SetRequestHeader
(
"Authorization"
,
$"Bearer
{
token
}
"
);
request
.
SetRequestHeader
(
"Content-Type"
,
"application/json"
);
request
.
SetRequestHeader
(
"Content-Type"
,
"application/json"
);
await
request
.
SendWebRequest
();
await
request
.
SendWebRequest
();
...
...
Assets/Scripts/MDPro3/UI/Function/RectLoopMoveY.cs
View file @
3bd6fff1
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.UI
;
using
DG.Tweening
;
using
DG.Tweening
;
using
YgomSystem.UI
;
using
YgomSystem.UI
;
using
UnityEngine.UI
;
using
DGTween
=
DG
.
Tweening
.
Tween
;
namespace
MDPro3.UI
namespace
MDPro3.UI
{
{
...
@@ -9,32 +10,105 @@ namespace MDPro3.UI
...
@@ -9,32 +10,105 @@ namespace MDPro3.UI
{
{
public
float
range
;
public
float
range
;
public
float
time
;
public
float
time
;
float
startY
;
readonly
Ease
ease
=
Ease
.
InOutSine
;
[
Header
(
"Smoothing"
)]
public
Ease
ease
=
Ease
.
InOutSine
;
[
Tooltip
(
"Normal = Update, Late = LateUpdate. Late is often smoother for UI."
)]
public
UpdateType
updateType
=
UpdateType
.
Late
;
[
Tooltip
(
"If true, animation ignores Time.timeScale (keeps moving in pause/slowmo)."
)]
public
bool
ignoreTimeScale
=
true
;
private
RectTransform
_rt
;
private
Image
_img
;
private
float
_centerY
;
private
DGTween
_startupTween
;
private
DGTween
_loopTween
;
private
void
Awake
()
{
_rt
=
GetComponent
<
RectTransform
>();
_img
=
GetComponent
<
Image
>();
}
private
void
Start
()
private
void
Start
()
{
{
startY
=
GetComponent
<
RectTransform
>().
anchoredPosition
.
y
;
_centerY
=
_rt
.
anchoredPosition
.
y
;
foreach
(
var
alpha
in
GetComponents
<
TweenAlpha
>())
foreach
(
var
alpha
in
GetComponents
<
TweenAlpha
>())
if
(
alpha
.
label
==
"Show"
)
{
GetComponent
<
Image
>().
color
=
new
Color
(
1
,
1
,
1
,
alpha
.
to
);
if
(
alpha
.
label
==
"Show"
&&
_img
!=
null
)
_img
.
color
=
new
Color
(
1f
,
1f
,
1f
,
alpha
.
to
);
}
foreach
(
var
position
in
GetComponents
<
TweenPosition
>())
foreach
(
var
position
in
GetComponents
<
TweenPosition
>())
{
if
(
position
.
label
==
"Loop"
)
if
(
position
.
label
==
"Loop"
)
{
{
range
=
position
.
from
.
y
-
position
.
to
.
y
;
range
=
position
.
from
.
y
-
position
.
to
.
y
;
time
=
position
.
duration
;
time
=
position
.
duration
;
break
;
}
}
if
(
time
>
0
)
}
MoveUp
();
if
(
time
>
0f
&&
!
Mathf
.
Approximately
(
range
,
0f
))
StartSmoothLoop
();
}
}
void
MoveU
p
()
private
void
StartSmoothLoo
p
()
{
{
GetComponent
<
RectTransform
>().
DOAnchorPosY
(
startY
+
range
,
time
).
SetEase
(
ease
).
OnComplete
(()
=>
{
MoveDown
();
});
KillTweens
();
float
yMin
=
_centerY
-
range
;
float
yMax
=
_centerY
+
range
;
float
curY
=
_rt
.
anchoredPosition
.
y
;
float
firstTarget
=
(
Mathf
.
Abs
(
curY
-
yMax
)
<=
Mathf
.
Abs
(
curY
-
yMin
))
?
yMax
:
yMin
;
float
otherTarget
=
(
firstTarget
==
yMax
)
?
yMin
:
yMax
;
float
fullDist
=
Mathf
.
Abs
(
yMax
-
yMin
);
float
firstDist
=
Mathf
.
Abs
(
curY
-
firstTarget
);
float
firstTime
=
(
fullDist
>
0.0001f
)
?
time
*
(
firstDist
/
fullDist
)
:
0f
;
_startupTween
=
_rt
.
DOAnchorPosY
(
firstTarget
,
firstTime
)
.
SetEase
(
ease
)
.
SetUpdate
(
updateType
,
ignoreTimeScale
);
_startupTween
.
OnComplete
(()
=>
{
_loopTween
=
_rt
.
DOAnchorPosY
(
otherTarget
,
time
)
.
SetEase
(
ease
)
.
SetLoops
(-
1
,
LoopType
.
Yoyo
)
.
SetUpdate
(
updateType
,
ignoreTimeScale
);
});
}
private
void
OnDisable
()
{
if
(
_startupTween
!=
null
&&
_startupTween
.
IsActive
())
_startupTween
.
Pause
();
if
(
_loopTween
!=
null
&&
_loopTween
.
IsActive
())
_loopTween
.
Pause
();
}
}
void
MoveDown
()
private
void
OnEnable
()
{
if
(
_startupTween
!=
null
&&
_startupTween
.
IsActive
())
_startupTween
.
Play
();
if
(
_loopTween
!=
null
&&
_loopTween
.
IsActive
())
_loopTween
.
Play
();
}
private
void
OnDestroy
()
{
KillTweens
();
}
private
void
KillTweens
()
{
{
GetComponent
<
RectTransform
>().
DOAnchorPosY
(
startY
-
range
,
time
).
SetEase
(
ease
).
OnComplete
(()
=>
{
MoveUp
();
});
if
(
_startupTween
!=
null
&&
_startupTween
.
IsActive
())
_startupTween
.
Kill
();
if
(
_loopTween
!=
null
&&
_loopTween
.
IsActive
())
_loopTween
.
Kill
();
_startupTween
=
null
;
_loopTween
=
null
;
}
}
}
}
}
}
Assets/Scripts/MDPro3/UI/UIWidget/Deck/DeckView.cs
View file @
3bd6fff1
...
@@ -381,6 +381,8 @@ namespace MDPro3.UI
...
@@ -381,6 +381,8 @@ namespace MDPro3.UI
//NameAreaGroup.SetActive(condition == Condition.Editable);
//NameAreaGroup.SetActive(condition == Condition.Editable);
InputDeckName
.
gameObject
.
SetActive
(
condition
==
Condition
.
Editable
);
InputDeckName
.
gameObject
.
SetActive
(
condition
==
Condition
.
Editable
);
TextDeckName
.
gameObject
.
SetActive
(
condition
!=
Condition
.
Editable
);
TextDeckName
.
gameObject
.
SetActive
(
condition
!=
Condition
.
Editable
);
if
(
condition
==
Condition
.
Pickup
)
ButtonDeck
.
gameObject
.
SetActive
(
false
);
}
}
public
RectTransform
GetDeckLocationParent
(
DeckLocation
location
)
public
RectTransform
GetDeckLocationParent
(
DeckLocation
location
)
...
...
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