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
Dilmah
MDPro3
Commits
7a4df5c8
Commit
7a4df5c8
authored
Apr 17, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
8eefb38f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
278 additions
and
234 deletions
+278
-234
Assets/Main.unity
Assets/Main.unity
+215
-215
Assets/ScriptableObjects/Items.cs
Assets/ScriptableObjects/Items.cs
+51
-3
Assets/Scripts/MDPro3/Duel/GameCard.cs
Assets/Scripts/MDPro3/Duel/GameCard.cs
+6
-5
Assets/Scripts/MDPro3/Servants/OcgCore.cs
Assets/Scripts/MDPro3/Servants/OcgCore.cs
+4
-4
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCard.cs
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCard.cs
+2
-7
No files found.
Assets/Main.unity
View file @
7a4df5c8
This diff is collapsed.
Click to expand it.
Assets/ScriptableObjects/Items.cs
View file @
7a4df5c8
using
MDPro3.YGOSharp
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
UnityEngine
;
namespace
MDPro3
...
...
@@ -9,6 +11,7 @@ namespace MDPro3
[
CreateAssetMenu
]
public
class
Items
:
ScriptableObject
{
public
static
string
nullString
=
"coming soon"
;
[
Serializable
]
public
struct
Item
{
...
...
@@ -147,15 +150,60 @@ namespace MDPro3
{
names
.
TryGetValue
(
code
,
out
var
returnValue
);
if
(
string
.
IsNullOrEmpty
(
returnValue
))
returnValue
=
"coming soon"
;
returnValue
=
nullString
;
return
returnValue
;
}
string
GetDescription
(
int
code
)
{
descriptions
.
TryGetValue
(
code
,
out
var
returnValue
);
return
returnValue
;
if
(
string
.
IsNullOrEmpty
(
returnValue
))
return
nullString
;
returnValue
=
returnValue
.
Replace
(
" get=\'name\'"
,
string
.
Empty
);
string
pattern
=
@"<card mrk='(\d+)'/>"
;
return
Regex
.
Replace
(
returnValue
,
pattern
,
EvaluatorGetNameFromNumber
);
}
string
EvaluatorGetNameFromNumber
(
Match
match
)
{
string
numberString
=
match
.
Groups
[
1
].
Value
;
int
cardCode
=
0
;
switch
(
numberString
)
{
case
"18799"
:
cardCode
=
27015862
;
break
;
case
"14648"
:
cardCode
=
40441990
;
break
;
case
"15250"
:
cardCode
=
20129614
;
break
;
case
"13670"
:
cardCode
=
26077387
;
break
;
case
"19196"
:
cardCode
=
80845034
;
break
;
case
"13982"
:
cardCode
=
79698395
;
break
;
case
"10191"
:
cardCode
=
14001430
;
break
;
case
"10793"
:
cardCode
=
99795159
;
break
;
case
"15573"
:
cardCode
=
34572613
;
break
;
case
"18003"
:
cardCode
=
25550531
;
break
;
case
"16200"
:
cardCode
=
24639891
;
break
;
}
return
CardsManager
.
Get
(
cardCode
).
Name
;
}
public
string
WallpaperCodeToPath
(
string
code
)
{
...
...
Assets/Scripts/MDPro3/Duel/GameCard.cs
View file @
7a4df5c8
...
...
@@ -1716,7 +1716,7 @@ namespace MDPro3
}
}
public
void
AnimationConfirm
()
public
void
AnimationConfirm
(
int
id
)
{
if
(!
ThisLocationShouldHaveModel
(
p
))
{
...
...
@@ -1724,15 +1724,16 @@ namespace MDPro3
ModelAt
(
p
);
}
inAnimation
=
true
;
AudioManager
.
PlaySE
(
"SE_CARDVIEW_02"
);
var
offset
=
manager
.
GetElement
<
Transform
>(
"Offset"
);
var
offsetPosition
=
offset
.
localPosition
;
var
turn
=
manager
.
GetElement
<
Transform
>(
"Turn"
);
var
turnEulerAngles
=
turn
.
localEulerAngles
;
var
sequence
=
DOTween
.
Sequence
();
sequence
.
Append
(
offset
.
DOLocalMove
(
new
Vector3
(
0
,
2
,
3
),
0.1f
));
sequence
.
AppendInterval
(
id
);
sequence
.
Append
(
offset
.
DOLocalMove
(
new
Vector3
(
0
,
2
,
3
),
0.1f
).
OnStart
(()
=>
{
AudioManager
.
PlaySE
(
"SE_CARDVIEW_02"
);
}));
sequence
.
Join
(
turn
.
DOLocalRotate
(
Vector3
.
zero
,
0.1f
).
OnComplete
(()
=>
{
var
highlight
=
ABLoader
.
LoadFromFile
(
"Effects/other/fxp_card_decide_001"
,
true
);
...
...
Assets/Scripts/MDPro3/Servants/OcgCore.cs
View file @
7a4df5c8
...
...
@@ -1540,8 +1540,8 @@ namespace MDPro3
var
length_of_message
=
r
.
BaseStream
.
Length
;
BinaryMaster
binaryMaster
;
List
<
string
>
selections
;
//
if ((GameMessage)p.Function != GameMessage.UpdateData)
//
Debug.Log("----------" + (GameMessage)p.Function);
if
((
GameMessage
)
p
.
Function
!=
GameMessage
.
UpdateData
)
Debug
.
Log
(
"----------"
+
(
GameMessage
)
p
.
Function
);
//else
// Debug.Log("----------" + (GameMessage)p.Function);
switch
((
GameMessage
)
p
.
Function
)
...
...
@@ -3490,10 +3490,10 @@ namespace MDPro3
{
card
.
SetCode
(
code
);
description
.
Show
(
card
,
null
);
card
.
AnimationConfirm
();
card
.
AnimationConfirm
(
i
);
}
}
Sleep
(
100
);
Sleep
(
100
*
count
);
break
;
case
GameMessage
.
DeckTop
:
player
=
LocalPlayer
(
r
.
ReadByte
());
...
...
Assets/Scripts/MDPro3/UI/Popup/PopupDuelSelectCard.cs
View file @
7a4df5c8
...
...
@@ -340,13 +340,8 @@ namespace MDPro3.UI
case
GameMessage
.
SortCard
:
case
GameMessage
.
SortChain
:
var
bytes
=
new
byte
[
monos
.
Count
];
foreach
(
var
mono
in
monos
)
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
mono
.
card
==
cards
[
i
])
{
bytes
[
i
]
=
(
byte
)
i
;
break
;
}
for
(
int
i
=
0
;
i
<
monos
.
Count
;
i
++)
bytes
[
i
]
=
(
byte
)(
monos
[
i
].
GetOrder
()
-
1
);
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(
bytes
);
Program
.
I
().
ocgcore
.
SendReturn
(
binaryMaster
.
Get
());
...
...
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