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
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
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
赤子奈落
MDPro3
Commits
020d3af8
Commit
020d3af8
authored
Mar 16, 2026
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Card Render
parent
b6115d85
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
259 additions
and
328 deletions
+259
-328
Assets/Materials/UIBlur00.mat
Assets/Materials/UIBlur00.mat
+0
-54
Assets/Materials/UIBlur00.mat.meta
Assets/Materials/UIBlur00.mat.meta
+0
-10
Assets/Prefabs/Prefab/CardBuilderRushDuel.prefab
Assets/Prefabs/Prefab/CardBuilderRushDuel.prefab
+6
-6
Assets/Prefabs/Prefab/CardRenderer.prefab
Assets/Prefabs/Prefab/CardRenderer.prefab
+4
-134
Assets/Scripts/MDPro3/Duel/YGOSharp/Card.cs
Assets/Scripts/MDPro3/Duel/YGOSharp/Card.cs
+23
-1
Assets/Scripts/MDPro3/Duel/YGOSharp/YGOSharpOCGWrapperEnums.cs
...s/Scripts/MDPro3/Duel/YGOSharp/YGOSharpOCGWrapperEnums.cs
+5
-1
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilder.cs
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilder.cs
+21
-24
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilderOCG.cs
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilderOCG.cs
+4
-4
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilderRushDuel.cs
...s/Scripts/MDPro3/Game/CardRenderer/CardBuilderRushDuel.cs
+16
-4
Assets/Scripts/MDPro3/Game/CardRenderer/CardRenderer.cs
Assets/Scripts/MDPro3/Game/CardRenderer/CardRenderer.cs
+48
-25
Assets/Scripts/MDPro3/Game/Tools.cs
Assets/Scripts/MDPro3/Game/Tools.cs
+18
-0
Assets/Scripts/MDPro3/ScriptableObjects/TextureContainer.cs
Assets/Scripts/MDPro3/ScriptableObjects/TextureContainer.cs
+13
-13
Assets/Scripts/MDPro3/Utility/CardImageLoader.cs
Assets/Scripts/MDPro3/Utility/CardImageLoader.cs
+8
-10
Assets/Shaders.meta
Assets/Shaders.meta
+3
-3
Assets/Shaders/CombineVideoAndFrame.shader
Assets/Shaders/CombineVideoAndFrame.shader
+72
-0
Assets/Shaders/CombineVideoAndFrame.shader.meta
Assets/Shaders/CombineVideoAndFrame.shader.meta
+9
-0
Assets/Texture/RenderTexture_CardArtVideo.renderTexture
Assets/Texture/RenderTexture_CardArtVideo.renderTexture
+0
-39
Assets/Texture/SpriteAtlas.spriteatlas
Assets/Texture/SpriteAtlas.spriteatlas
+9
-0
No files found.
Assets/Materials/UIBlur00.mat
deleted
100644 → 0
View file @
b6115d85
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!21
&2100000
Material
:
serializedVersion
:
8
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
UIBlur00
m_Shader
:
{
fileID
:
4800000
,
guid
:
fc3613d4d9d46604d8db311c951af12a
,
type
:
3
}
m_Parent
:
{
fileID
:
0
}
m_ModifiedSerializedProperties
:
0
m_ValidKeywords
:
[]
m_InvalidKeywords
:
-
ETC1_EXTERNAL_ALPHA
m_LightmapFlags
:
4
m_EnableInstancingVariants
:
1
m_DoubleSidedGI
:
0
m_CustomRenderQueue
:
-1
stringTagMap
:
{}
disabledShaderPasses
:
-
MOTIONVECTORS
m_LockedProperties
:
m_SavedProperties
:
serializedVersion
:
3
m_TexEnvs
:
-
_MainTex
:
m_Texture
:
{
fileID
:
2800000
,
guid
:
7b9b634379d3ea84f94fbebfaf600ded
,
type
:
3
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
unity_Lightmaps
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
unity_LightmapsInd
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
-
unity_ShadowMasks
:
m_Texture
:
{
fileID
:
0
}
m_Scale
:
{
x
:
1
,
y
:
1
}
m_Offset
:
{
x
:
0
,
y
:
0
}
m_Ints
:
[]
m_Floats
:
-
Effect
:
10
-
_QueueControl
:
0
-
_QueueOffset
:
0
-
_ReverseHolizontal
:
0
-
_ReverseVertical
:
0
m_Colors
:
-
_BlendColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
0
}
m_BuildTextureStacks
:
[]
m_AllowLocking
:
0
Assets/Materials/UIBlur00.mat.meta
deleted
100644 → 0
View file @
b6115d85
fileFormatVersion: 2
guid: cc557a6b7b6b0a8438a1075a1d7ad04b
timeCreated: 1755118473
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/Prefab/CardBuilderRushDuel.prefab
View file @
020d3af8
...
@@ -1050,7 +1050,7 @@ MonoBehaviour:
...
@@ -1050,7 +1050,7 @@ MonoBehaviour:
m_enableAutoSizing
:
1
m_enableAutoSizing
:
1
m_fontSizeMin
:
10
m_fontSizeMin
:
10
m_fontSizeMax
:
30
m_fontSizeMax
:
30
m_fontStyle
:
3
2
m_fontStyle
:
3
3
m_HorizontalAlignment
:
1
m_HorizontalAlignment
:
1
m_VerticalAlignment
:
4096
m_VerticalAlignment
:
4096
m_textAlignment
:
65535
m_textAlignment
:
65535
...
@@ -1340,7 +1340,7 @@ GameObject:
...
@@ -1340,7 +1340,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&7763910443228806675
---
!u!224
&7763910443228806675
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1358,7 +1358,7 @@ RectTransform:
...
@@ -1358,7 +1358,7 @@ RectTransform:
m_AnchorMin
:
{
x
:
1
,
y
:
0.5
}
m_AnchorMin
:
{
x
:
1
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
1
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
1
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
184
,
y
:
-146.5
}
m_AnchoredPosition
:
{
x
:
184
,
y
:
-146.5
}
m_SizeDelta
:
{
x
:
119.99
,
y
:
40
}
m_SizeDelta
:
{
x
:
0
,
y
:
40
}
m_Pivot
:
{
x
:
1
,
y
:
0.5
}
m_Pivot
:
{
x
:
1
,
y
:
0.5
}
---
!u!222
&3798966953773050002
---
!u!222
&3798966953773050002
CanvasRenderer
:
CanvasRenderer
:
...
@@ -1390,8 +1390,8 @@ MonoBehaviour:
...
@@ -1390,8 +1390,8 @@ MonoBehaviour:
m_Calls
:
[]
m_Calls
:
[]
m_text
:
5000
m_text
:
5000
m_isRightToLeft
:
0
m_isRightToLeft
:
0
m_fontAsset
:
{
fileID
:
11400000
,
guid
:
6ffe0ace09c49f248b470866073655d
7
,
type
:
2
}
m_fontAsset
:
{
fileID
:
11400000
,
guid
:
ce39741bb8c515b4ab46e33668854c9
7
,
type
:
2
}
m_sharedMaterial
:
{
fileID
:
2100000
,
guid
:
90c8aa71d08d07b448566d161a823625
,
type
:
2
}
m_sharedMaterial
:
{
fileID
:
2100000
,
guid
:
be6a2f38e8a729342b889e4e2d15e570
,
type
:
2
}
m_fontSharedMaterials
:
[]
m_fontSharedMaterials
:
[]
m_fontMaterial
:
{
fileID
:
0
}
m_fontMaterial
:
{
fileID
:
0
}
m_fontMaterials
:
[]
m_fontMaterials
:
[]
...
@@ -2251,7 +2251,7 @@ GameObject:
...
@@ -2251,7 +2251,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&2702916156916230607
---
!u!224
&2702916156916230607
RectTransform
:
RectTransform
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/Prefab/CardRenderer.prefab
View file @
020d3af8
...
@@ -35,78 +35,6 @@ RectTransform:
...
@@ -35,78 +35,6 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
704
,
y
:
1024
}
m_SizeDelta
:
{
x
:
704
,
y
:
1024
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!1
&1182185792978640889
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
9082862922315469024
}
-
component
:
{
fileID
:
4853623234814736792
}
-
component
:
{
fileID
:
120950969743933094
}
m_Layer
:
10
m_Name
:
Frame
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
---
!u!224
&9082862922315469024
RectTransform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1182185792978640889
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_Children
:
[]
m_Father
:
{
fileID
:
7287715509432259750
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
1
}
m_AnchorMax
:
{
x
:
0
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
704
,
y
:
1024
}
m_Pivot
:
{
x
:
0
,
y
:
1
}
---
!u!222
&4853623234814736792
CanvasRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1182185792978640889
}
m_CullTransparentMesh
:
1
---
!u!114
&120950969743933094
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1182185792978640889
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
1344c3c82d62a2a41a3576d8abb8e3ea
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_Material
:
{
fileID
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_RaycastTarget
:
1
m_RaycastPadding
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
0
}
m_Maskable
:
1
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_Texture
:
{
fileID
:
0
}
m_UVRect
:
serializedVersion
:
2
x
:
0
y
:
0
width
:
1
height
:
1
---
!u!1
&7878167979749567023
---
!u!1
&7878167979749567023
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -287,11 +215,11 @@ VideoPlayer:
...
@@ -287,11 +215,11 @@ VideoPlayer:
m_TargetCameraAlpha
:
1
m_TargetCameraAlpha
:
1
m_TargetCamera3DLayout
:
0
m_TargetCamera3DLayout
:
0
m_TargetCamera
:
{
fileID
:
0
}
m_TargetCamera
:
{
fileID
:
0
}
m_TargetTexture
:
{
fileID
:
8400000
,
guid
:
8f5b379149e3c804d84d7bd6111ba8af
,
type
:
2
}
m_TargetTexture
:
{
fileID
:
0
}
m_TimeReference
:
0
m_TimeReference
:
0
m_TargetMaterialRenderer
:
{
fileID
:
0
}
m_TargetMaterialRenderer
:
{
fileID
:
0
}
m_TargetMaterialProperty
:
<noninit>
m_TargetMaterialProperty
:
<noninit>
m_RenderMode
:
2
m_RenderMode
:
4
m_AspectRatio
:
5
m_AspectRatio
:
5
m_DataSource
:
1
m_DataSource
:
1
m_TimeUpdateMode
:
2
m_TimeUpdateMode
:
2
...
@@ -306,7 +234,7 @@ VideoPlayer:
...
@@ -306,7 +234,7 @@ VideoPlayer:
m_DirectAudioMutes
:
00
m_DirectAudioMutes
:
00
m_ControlledAudioTrackCount
:
1
m_ControlledAudioTrackCount
:
1
m_PlayOnAwake
:
1
m_PlayOnAwake
:
1
m_SkipOnDrop
:
1
m_SkipOnDrop
:
0
m_Looping
:
1
m_Looping
:
1
m_WaitForFirstFrame
:
1
m_WaitForFirstFrame
:
1
m_FrameReadyEventEnabled
:
0
m_FrameReadyEventEnabled
:
0
...
@@ -344,7 +272,6 @@ RectTransform:
...
@@ -344,7 +272,6 @@ RectTransform:
-
{
fileID
:
8400473325012030711
}
-
{
fileID
:
8400473325012030711
}
-
{
fileID
:
4256007042953254575
}
-
{
fileID
:
4256007042953254575
}
-
{
fileID
:
1009792736605793975
}
-
{
fileID
:
1009792736605793975
}
-
{
fileID
:
9082862922315469024
}
m_Father
:
{
fileID
:
0
}
m_Father
:
{
fileID
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
...
@@ -388,64 +315,7 @@ MonoBehaviour:
...
@@ -388,64 +315,7 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
builder
:
{
fileID
:
8400473325012030711
}
builder
:
{
fileID
:
8400473325012030711
}
ocg
:
{
fileID
:
0
}
rd
:
{
fileID
:
0
}
renderCamera
:
{
fileID
:
9139189678543172720
}
renderCamera
:
{
fileID
:
9139189678543172720
}
videoPlayer
:
{
fileID
:
6557919073823895907
}
videoPlayer
:
{
fileID
:
6557919073823895907
}
renderedCardFrame
:
{
fileID
:
120950969743933094
}
matComposite
:
{
fileID
:
2100000
,
guid
:
ffa3524d14796f7428377735539535a5
,
type
:
2
}
renderTexture
:
{
fileID
:
8400000
,
guid
:
c9c34cb6ceb21d94c9c8de71c8859cf4
,
type
:
2
}
renderTexture
:
{
fileID
:
8400000
,
guid
:
c9c34cb6ceb21d94c9c8de71c8859cf4
,
type
:
2
}
cardArt
:
{
fileID
:
0
}
cardArtPendulum
:
{
fileID
:
0
}
cardArtPendulumSquare
:
{
fileID
:
0
}
cardArtPendulumWidth
:
{
fileID
:
0
}
cardFrame
:
{
fileID
:
0
}
attrIcon
:
{
fileID
:
0
}
attrRuby
:
{
fileID
:
0
}
cardName
:
{
fileID
:
0
}
cardDescription
:
{
fileID
:
0
}
cardDescriptionPendulum
:
{
fileID
:
0
}
lScale
:
{
fileID
:
0
}
rScale
:
{
fileID
:
0
}
levels
:
{
fileID
:
0
}
ranks
:
{
fileID
:
0
}
rank13
:
{
fileID
:
0
}
levelsMask
:
{
fileID
:
0
}
ranksMask
:
{
fileID
:
0
}
rank13Mask
:
{
fileID
:
0
}
linkMarkers
:
{
fileID
:
0
}
line
:
{
fileID
:
0
}
textATK
:
{
fileID
:
0
}
textDEF
:
{
fileID
:
0
}
numATK
:
{
fileID
:
0
}
numDEF
:
{
fileID
:
0
}
linkCount
:
{
fileID
:
0
}
spellType
:
{
fileID
:
0
}
cardPassword
:
{
fileID
:
0
}
cardAuther
:
{
fileID
:
0
}
cardArtRD
:
{
fileID
:
0
}
cardArtPendulumRD
:
{
fileID
:
0
}
cardArtPendulumWidthRD
:
{
fileID
:
0
}
cardFrameRD
:
{
fileID
:
0
}
attrIconRD
:
{
fileID
:
0
}
attrRubyRD
:
{
fileID
:
0
}
cardLegendRD
:
{
fileID
:
0
}
movePartsRD
:
{
fileID
:
0
}
cardNameRD
:
{
fileID
:
0
}
cardTypeRD
:
{
fileID
:
0
}
cardDescriptionRD
:
{
fileID
:
0
}
cardDescriptionPendulumRD
:
{
fileID
:
0
}
lScaleRD
:
{
fileID
:
0
}
rScaleRD
:
{
fileID
:
0
}
maxAtkRD
:
{
fileID
:
0
}
maxAtkNumRD
:
{
fileID
:
0
}
atkRD
:
{
fileID
:
0
}
atkNumRD
:
{
fileID
:
0
}
defRD
:
{
fileID
:
0
}
defNumRD
:
{
fileID
:
0
}
levelRD
:
{
fileID
:
0
}
levelNumRD
:
{
fileID
:
0
}
rankRD
:
{
fileID
:
0
}
rankNumRD
:
{
fileID
:
0
}
linkRD
:
{
fileID
:
0
}
cardPasswordRD
:
{
fileID
:
0
}
cardAutherRD
:
{
fileID
:
0
}
Assets/Scripts/MDPro3/Duel/YGOSharp/Card.cs
View file @
020d3af8
...
@@ -164,11 +164,16 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -164,11 +164,16 @@ namespace MDPro3.Duel.YGOSharp
return
(
Type
&
(
int
)
type
)
!=
0
;
return
(
Type
&
(
int
)
type
)
!=
0
;
}
}
public
bool
HasType
(
CardType
type1
,
CardType
type2
)
public
bool
Has
Any
Type
(
CardType
type1
,
CardType
type2
)
{
{
return
HasType
(
type1
)
||
HasType
(
type2
);
return
HasType
(
type1
)
||
HasType
(
type2
);
}
}
public
bool
HasAllTypes
(
CardType
type1
,
CardType
type2
)
{
return
HasType
(
type1
)
&&
HasType
(
type2
);
}
public
bool
HasLinkMarker
(
CardLinkMarker
dir
)
public
bool
HasLinkMarker
(
CardLinkMarker
dir
)
{
{
return
(
LinkMarker
&
(
int
)
dir
)
!=
0
;
return
(
LinkMarker
&
(
int
)
dir
)
!=
0
;
...
@@ -231,6 +236,11 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -231,6 +236,11 @@ namespace MDPro3.Duel.YGOSharp
return
OnlineService
.
GetGenesysPoint
(
GetOriginalID
());
return
OnlineService
.
GetGenesysPoint
(
GetOriginalID
());
}
}
public
bool
IsRushDuelCard
()
{
return
Id
>=
120000000
&&
Id
<
130000000
;
}
#
endregion
#
endregion
#
region
String
#
region
String
...
@@ -635,6 +645,18 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -635,6 +645,18 @@ namespace MDPro3.Duel.YGOSharp
return
re
;
return
re
;
}
}
public
string
GetMaximumAttackString
()
{
var
returnValue
=
string
.
Empty
;
var
lines
=
Desc
.
Replace
(
"\r"
,
string
.
Empty
).
Split
(
'\n'
);
if
(
lines
.
Length
<
2
)
return
returnValue
;
var
parts
=
lines
[
1
].
Split
(
new
[]
{
' '
},
StringSplitOptions
.
RemoveEmptyEntries
);
if
(
parts
.
Length
>
1
)
return
parts
[
1
];
return
returnValue
;
}
#
endregion
#
endregion
}
}
...
...
Assets/Scripts/MDPro3/Duel/YGOSharp/YGOSharpOCGWrapperEnums.cs
View file @
020d3af8
...
@@ -55,7 +55,11 @@ namespace MDPro3.Duel.YGOSharp
...
@@ -55,7 +55,11 @@ namespace MDPro3.Duel.YGOSharp
Xyz
=
0x800000
,
Xyz
=
0x800000
,
Pendulum
=
0x1000000
,
Pendulum
=
0x1000000
,
SpSummon
=
0x2000000
,
SpSummon
=
0x2000000
,
Link
=
0x4000000
Link
=
0x4000000
,
//Rush Duel
Maximum
=
0x8000
,
Legend
=
0x8
}
}
public
enum
CardAttribute
public
enum
CardAttribute
...
...
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilder.cs
View file @
020d3af8
...
@@ -256,33 +256,30 @@ namespace MDPro3
...
@@ -256,33 +256,30 @@ namespace MDPro3
private
const
string
BIG_SLASH
=
"/"
;
private
const
string
BIG_SLASH
=
"/"
;
private
const
string
SMALL_SLASH
=
" / "
;
private
const
string
SMALL_SLASH
=
" / "
;
protected
static
string
TextForRender
(
string
description
,
bool
isPre
)
protected
static
string
TextForRender
(
string
description
,
Card
data
)
{
{
if
(
string
.
IsNullOrEmpty
(
description
))
if
(
string
.
IsNullOrEmpty
(
description
))
return
string
.
Empty
;
return
string
.
Empty
;
var
language
=
isPre
?
Language
.
GetPrereleaseConfig
()
:
Language
.
GetCardConfig
();
//if (language == Language.Japanese)
if
(
data
.
IsRushDuelCard
())
//{
{
int
removeLineCount
=
1
;
if
(
data
.
HasType
(
CardType
.
Maximum
))
removeLineCount
=
2
;
description
=
Tools
.
RemoveFirstLines
(
description
,
removeLineCount
);
}
var
language
=
data
.
isPre
?
Language
.
GetPrereleaseConfig
()
:
Language
.
GetCardConfig
();
if
(!
data
.
IsRushDuelCard
())
{
description
=
description
.
Replace
(
"\t\r\n"
,
"\f\f\f"
);
description
=
description
.
Replace
(
"\t\r\n"
,
"\f\f\f"
);
description
=
description
.
Replace
(
"\r\n●"
,
"●●●"
);
description
=
description
.
Replace
(
"\r\n●"
,
"●●●"
);
description
=
description
.
Replace
(
"\r"
,
string
.
Empty
);
description
=
description
.
Replace
(
"\r"
,
string
.
Empty
);
description
=
description
.
Replace
(
"\n"
,
string
.
Empty
);
description
=
description
.
Replace
(
"\n"
,
string
.
Empty
);
description
=
description
.
Replace
(
"\f\f\f"
,
Program
.
STRING_LINE_BREAK
);
description
=
description
.
Replace
(
"\f\f\f"
,
Program
.
STRING_LINE_BREAK
);
description
=
description
.
Replace
(
"●●●"
,
$"
{
Program
.
STRING_LINE_BREAK
}
●"
);
description
=
description
.
Replace
(
"●●●"
,
$"
{
Program
.
STRING_LINE_BREAK
}
●"
);
//}
}
//else
//{
// description = description
// .Replace("\r\n②", "②")
// .Replace("\r\n③", "③")
// .Replace("\r\n④", "④")
// .Replace("\r\n⑤", "⑤")
// .Replace("\r\n⑥", "⑥")
// .Replace("\r\n⑦", "⑦")
// .Replace("\r\n⑧", "⑧")
// .Replace("\r\n⑨", "⑨");
//}
if
(!
Language
.
UseLatin
(
language
))
if
(!
Language
.
UseLatin
(
language
))
description
=
description
.
Replace
(
Program
.
STRING_SLASH
,
BIG_SLASH
);
description
=
description
.
Replace
(
Program
.
STRING_SLASH
,
BIG_SLASH
);
...
...
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilderOCG.cs
View file @
020d3af8
...
@@ -119,10 +119,10 @@ namespace MDPro3
...
@@ -119,10 +119,10 @@ namespace MDPro3
var
pendulumDesc
=
data
.
GetDescriptionSplit
(
true
);
var
pendulumDesc
=
data
.
GetDescriptionSplit
(
true
);
textDescription
.
text
=
data
.
GetTypeForRushDuelRender
();
textDescription
.
text
=
data
.
GetTypeForRushDuelRender
();
textDescriptionPendulum
.
text
=
TextForRender
(
pendulumDesc
[
0
],
data
.
isPre
);
textDescriptionPendulum
.
text
=
TextForRender
(
pendulumDesc
[
0
],
data
);
var
authorSplit
=
GetAuthorFromDescription
(
pendulumDesc
[
1
]);
var
authorSplit
=
GetAuthorFromDescription
(
pendulumDesc
[
1
]);
textDescription
.
text
+=
Program
.
STRING_LINE_BREAK
+
TextForRender
(
authorSplit
[
0
],
data
.
isPre
);
textDescription
.
text
+=
Program
.
STRING_LINE_BREAK
+
TextForRender
(
authorSplit
[
0
],
data
);
textAuther
.
text
=
authorSplit
[
1
];
textAuther
.
text
=
authorSplit
[
1
];
textLScale
.
text
=
data
.
LScale
.
ToString
();
textLScale
.
text
=
data
.
LScale
.
ToString
();
...
@@ -137,7 +137,7 @@ namespace MDPro3
...
@@ -137,7 +137,7 @@ namespace MDPro3
desc
=
data
.
GetTypeForRushDuelRender
()
+
Program
.
STRING_LINE_BREAK
;
desc
=
data
.
GetTypeForRushDuelRender
()
+
Program
.
STRING_LINE_BREAK
;
var
authorSplit
=
GetAuthorFromDescription
(
data
.
Desc
);
var
authorSplit
=
GetAuthorFromDescription
(
data
.
Desc
);
desc
+=
TextForRender
(
authorSplit
[
0
],
data
.
isPre
);
desc
+=
TextForRender
(
authorSplit
[
0
],
data
);
textDescription
.
text
=
desc
;
textDescription
.
text
=
desc
;
textAuther
.
text
=
authorSplit
[
1
];
textAuther
.
text
=
authorSplit
[
1
];
}
}
...
@@ -182,7 +182,7 @@ namespace MDPro3
...
@@ -182,7 +182,7 @@ namespace MDPro3
for
(
int
i
=
0
;
i
<
12
;
i
++)
for
(
int
i
=
0
;
i
<
12
;
i
++)
levels
.
transform
.
GetChild
(
i
).
gameObject
.
SetActive
(
i
<
data
.
Level
);
levels
.
transform
.
GetChild
(
i
).
gameObject
.
SetActive
(
i
<
data
.
Level
);
}
}
else
if
(
data
.
HasType
(
CardType
.
Spell
,
CardType
.
Trap
))
else
if
(
data
.
Has
Any
Type
(
CardType
.
Spell
,
CardType
.
Trap
))
{
{
descriptionRT
.
sizeDelta
=
new
Vector2
(
590
,
185
);
descriptionRT
.
sizeDelta
=
new
Vector2
(
590
,
185
);
tmpCardName
.
color
=
Color
.
white
;
tmpCardName
.
color
=
Color
.
white
;
...
...
Assets/Scripts/MDPro3/Game/CardRenderer/CardBuilderRushDuel.cs
View file @
020d3af8
...
@@ -47,6 +47,10 @@ namespace MDPro3
...
@@ -47,6 +47,10 @@ namespace MDPro3
link
.
SetActive
(
false
);
link
.
SetActive
(
false
);
numLevel
.
text
=
string
.
Empty
;
numLevel
.
text
=
string
.
Empty
;
numRank
.
text
=
string
.
Empty
;
numRank
.
text
=
string
.
Empty
;
legend
.
SetActive
(
false
);
maxAtk
.
SetActive
(
false
);
numMaxAtk
.
text
=
string
.
Empty
;
}
}
public
override
void
SetCard
(
Card
data
,
string
language
,
Texture
art
,
Texture2D
overFrame
=
null
)
public
override
void
SetCard
(
Card
data
,
string
language
,
Texture
art
,
Texture2D
overFrame
=
null
)
...
@@ -81,11 +85,11 @@ namespace MDPro3
...
@@ -81,11 +85,11 @@ namespace MDPro3
imageArtPendulum
.
gameObject
.
SetActive
(
true
);
imageArtPendulum
.
gameObject
.
SetActive
(
true
);
imageArtPendulum
.
texture
=
art
;
imageArtPendulum
.
texture
=
art
;
}
}
textDescriptionPendulum
.
text
=
TextForRender
(
data
.
GetPendulumDescription
(
true
),
data
.
isPre
);
textDescriptionPendulum
.
text
=
TextForRender
(
data
.
GetPendulumDescription
(
true
),
data
);
var
authorSplit
=
GetAuthorFromDescription
(
data
.
GetMonsterDescription
(
true
));
var
authorSplit
=
GetAuthorFromDescription
(
data
.
GetMonsterDescription
(
true
));
textAuther
.
text
=
authorSplit
[
1
];
textAuther
.
text
=
authorSplit
[
1
];
textDescription
.
text
=
TextForRender
(
authorSplit
[
0
],
data
.
isPre
);
textDescription
.
text
=
TextForRender
(
authorSplit
[
0
],
data
);
textLScale
.
text
=
data
.
LScale
.
ToString
();
textLScale
.
text
=
data
.
LScale
.
ToString
();
textRScale
.
text
=
data
.
RScale
.
ToString
();
textRScale
.
text
=
data
.
RScale
.
ToString
();
...
@@ -95,7 +99,7 @@ namespace MDPro3
...
@@ -95,7 +99,7 @@ namespace MDPro3
imageArt
.
gameObject
.
SetActive
(
true
);
imageArt
.
gameObject
.
SetActive
(
true
);
imageArt
.
texture
=
art
;
imageArt
.
texture
=
art
;
var
authorSplit
=
GetAuthorFromDescription
(
data
.
Desc
);
var
authorSplit
=
GetAuthorFromDescription
(
data
.
Desc
);
textDescription
.
text
=
TextForRender
(
authorSplit
[
0
],
data
.
isPre
);
textDescription
.
text
=
TextForRender
(
authorSplit
[
0
],
data
);
textAuther
.
text
=
authorSplit
[
1
];
textAuther
.
text
=
authorSplit
[
1
];
}
}
...
@@ -128,13 +132,21 @@ namespace MDPro3
...
@@ -128,13 +132,21 @@ namespace MDPro3
level
.
SetActive
(
true
);
level
.
SetActive
(
true
);
numLevel
.
text
=
data
.
Level
.
ToString
();
numLevel
.
text
=
data
.
Level
.
ToString
();
}
}
else
if
(
data
.
HasType
(
CardType
.
Spell
,
CardType
.
Trap
))
else
if
(
data
.
Has
Any
Type
(
CardType
.
Spell
,
CardType
.
Trap
))
{
{
atk
.
SetActive
(
false
);
atk
.
SetActive
(
false
);
def
.
SetActive
(
false
);
def
.
SetActive
(
false
);
numAtk
.
text
=
string
.
Empty
;
numAtk
.
text
=
string
.
Empty
;
numDef
.
text
=
string
.
Empty
;
numDef
.
text
=
string
.
Empty
;
}
}
legend
.
SetActive
(
data
.
HasType
(
CardType
.
Legend
));
if
(
data
.
HasType
(
CardType
.
Maximum
))
{
maxAtk
.
SetActive
(
true
);
numMaxAtk
.
text
=
data
.
GetMaximumAttackString
();
}
}
}
public
override
RawImage
GetArtPartForVideo
(
bool
isPendulum
)
public
override
RawImage
GetArtPartForVideo
(
bool
isPendulum
)
...
...
Assets/Scripts/MDPro3/Game/CardRenderer/CardRenderer.cs
View file @
020d3af8
...
@@ -4,11 +4,10 @@ using MDPro3.Utility;
...
@@ -4,11 +4,10 @@ using MDPro3.Utility;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Text
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
TMPro
;
using
TMPro
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.AddressableAssets
;
using
UnityEngine.AddressableAssets
;
using
UnityEngine.Rendering
.Universal
;
using
UnityEngine.Rendering
;
using
UnityEngine.UI
;
using
UnityEngine.UI
;
using
UnityEngine.Video
;
using
UnityEngine.Video
;
...
@@ -27,8 +26,11 @@ namespace MDPro3
...
@@ -27,8 +26,11 @@ namespace MDPro3
[
SerializeField
]
private
RectTransform
builder
;
[
SerializeField
]
private
RectTransform
builder
;
[
SerializeField
]
private
Camera
renderCamera
;
[
SerializeField
]
private
Camera
renderCamera
;
[
SerializeField
]
private
VideoPlayer
videoPlayer
;
[
SerializeField
]
private
VideoPlayer
videoPlayer
;
[
SerializeField
]
private
RawImage
renderedCardFrame
;
[
SerializeField
]
private
Material
matComposite
;
private
Material
matCompositeInstance
;
private
Texture2D
texFrame
;
public
RenderTexture
renderTexture
;
public
RenderTexture
renderTexture
;
private
ScriptableRenderContext
context
;
#
endregion
#
endregion
...
@@ -239,49 +241,70 @@ namespace MDPro3
...
@@ -239,49 +241,70 @@ namespace MDPro3
renderCamera
.
Render
();
renderCamera
.
Render
();
RenderTexture
.
active
=
renderTexture
;
RenderTexture
.
active
=
renderTexture
;
var
onlyFrame
=
new
Texture2D
(
RenderTexture
.
active
.
width
,
RenderTexture
.
active
.
height
,
TextureFormat
.
RGBA32
,
true
);
texFrame
=
new
Texture2D
(
RenderTexture
.
active
.
width
,
RenderTexture
.
active
.
height
,
TextureFormat
.
RGBA32
,
true
);
onlyFrame
.
ReadPixels
(
new
Rect
(
0
,
0
,
RenderTexture
.
active
.
width
,
RenderTexture
.
active
.
height
),
0
,
0
);
texFrame
.
ReadPixels
(
new
Rect
(
0
,
0
,
RenderTexture
.
active
.
width
,
RenderTexture
.
active
.
height
),
0
,
0
);
onlyFrame
.
Apply
();
texFrame
.
Apply
();
onlyFrame
.
name
=
"Card_"
+
code
;
texFrame
.
name
=
"Card_"
+
code
;
renderedCardFrame
.
texture
=
onlyFrame
;
Destroy
(
builder
.
gameObject
);
renderedCardFrame
.
gameObject
.
SetActive
(
true
);
videoPlayer
.
gameObject
.
SetActive
(
true
);
videoPlayer
.
gameObject
.
SetActive
(
true
);
videoPlayer
.
url
=
GetVideoURL
(
code
);
videoPlayer
.
url
=
GetVideoURL
(
code
);
videoPlayer
.
targetTexture
=
Instantiate
(
videoPlayer
.
targetTexture
);
videoPlayer
.
Prepare
();
videoPlayer
.
Prepare
();
var
targetImage
=
builder
.
GetArtPartForVideo
(
data
.
HasType
(
CardType
.
Pendulum
));
targetImage
.
gameObject
.
SetActive
(
true
);
targetImage
.
texture
=
videoPlayer
.
targetTexture
;
targetImage
.
transform
.
SetParent
(
transform
);
renderedCardFrame
.
transform
.
SetAsLastSibling
();
Destroy
(
builder
.
gameObject
);
await
UniTask
.
WaitUntil
(()
=>
videoPlayer
.
isPrepared
);
await
UniTask
.
WaitUntil
(()
=>
videoPlayer
.
isPrepared
);
renderCamera
.
gameObject
.
SetActive
(
true
);
renderTexture
=
Instantiate
(
renderTexture
);
renderCamera
.
targetTexture
=
Instantiate
(
renderTexture
);
SetMaterial
(
data
);
renderCamera
.
SetVolumeFrameworkUpdateMode
(
VolumeFrameworkUpdateMode
.
EveryFrame
);
renderTexture
=
renderCamera
.
targetTexture
;
return
renderTexture
;
return
renderTexture
;
}
}
private
void
SetMaterial
(
Card
data
)
{
matCompositeInstance
=
Instantiate
(
matComposite
);
matCompositeInstance
.
SetTexture
(
"_MainTex"
,
videoPlayer
.
texture
);
matCompositeInstance
.
SetTexture
(
"_FrameTex"
,
texFrame
);
matCompositeInstance
.
SetVector
(
"_VideoRect"
,
GetVideoRect
(
data
));
}
private
Vector4
GetVideoRect
(
Card
data
)
{
if
(
NeedRushDuelStyle
(
data
.
Id
))
{
return
new
Vector4
(
0.049f
,
0.281f
,
0.902f
,
0.62f
);
}
else
{
if
(
data
.
HasType
(
CardType
.
Pendulum
))
return
new
Vector4
(
0.696f
,
0.2275f
,
0.86f
,
0.5918f
);
else
return
new
Vector4
(
0.1235f
,
0.297f
,
0.7528f
,
0.5175f
);
}
}
private
void
LateUpdate
()
{
if
(
matCompositeInstance
==
null
)
return
;
Graphics
.
Blit
(
videoPlayer
.
targetTexture
,
renderTexture
,
matCompositeInstance
);
}
public
void
PauseVideo
()
public
void
PauseVideo
()
{
{
renderCamera
.
gameObject
.
SetActive
(
false
);
videoPlayer
.
Pause
();
videoPlayer
.
Pause
();
}
}
public
void
PlayVideo
()
public
void
PlayVideo
()
{
{
renderCamera
.
gameObject
.
SetActive
(
true
);
videoPlayer
.
Play
();
videoPlayer
.
Play
();
}
}
public
void
Dispose
()
public
void
Dispose
()
{
{
if
(
matCompositeInstance
!=
null
)
{
Destroy
(
matCompositeInstance
);
Destroy
(
renderTexture
);
Destroy
(
renderTexture
);
Destroy
(
texFrame
);
}
Destroy
(
gameObject
);
Destroy
(
gameObject
);
}
}
...
...
Assets/Scripts/MDPro3/Game/Tools.cs
View file @
020d3af8
...
@@ -383,5 +383,23 @@ namespace MDPro3
...
@@ -383,5 +383,23 @@ namespace MDPro3
#
endregion
#
endregion
#
region
Text
public
static
string
RemoveFirstLines
(
string
text
,
int
linesToRemove
)
{
if
(
string
.
IsNullOrEmpty
(
text
)
||
linesToRemove
<=
0
)
return
text
;
string
[]
lines
=
text
.
Split
(
new
[]
{
"\r\n"
,
"\n"
},
StringSplitOptions
.
None
);
if
(
lines
.
Length
<=
linesToRemove
)
return
text
;
var
remainingLines
=
lines
.
Skip
(
linesToRemove
).
ToArray
();
string
newLine
=
text
.
Contains
(
"\r\n"
)
?
"\r\n"
:
"\n"
;
return
string
.
Join
(
newLine
,
remainingLines
);
}
#
endregion
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/ScriptableObjects/TextureContainer.cs
View file @
020d3af8
...
@@ -958,14 +958,14 @@ namespace MDPro3
...
@@ -958,14 +958,14 @@ namespace MDPro3
return
rd
?
return
rd
?
rd_Loading_PendulumSynchro
.
texture
rd_Loading_PendulumSynchro
.
texture
:
cardFramePendulumSynchro
.
texture
;
:
cardFramePendulumSynchro
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd
?
rd_Loading_PendulumFusion
.
texture
:
cardFramePendulumFusion
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Ritual
))
else
if
(
data
.
HasType
(
CardType
.
Ritual
))
return
rd
?
return
rd
?
rd_Loading_PendulumRitual
.
texture
rd_Loading_PendulumRitual
.
texture
:
cardFramePendulumRitual
.
texture
;
:
cardFramePendulumRitual
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd
?
rd_Loading_PendulumFusion
.
texture
:
cardFramePendulumFusion
.
texture
;
else
else
return
rd
?
return
rd
?
rd_Loading_PendulumEffect
.
texture
rd_Loading_PendulumEffect
.
texture
...
@@ -985,14 +985,14 @@ namespace MDPro3
...
@@ -985,14 +985,14 @@ namespace MDPro3
return
rd
?
return
rd
?
rd_Loading_Synchro
.
texture
rd_Loading_Synchro
.
texture
:
cardFrameSynchro
.
texture
;
:
cardFrameSynchro
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd
?
rd_Loading_Fusion
.
texture
:
cardFrameFusion
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Ritual
)
&&
data
.
HasType
(
CardType
.
Monster
))
else
if
(
data
.
HasType
(
CardType
.
Ritual
)
&&
data
.
HasType
(
CardType
.
Monster
))
return
rd
?
return
rd
?
rd_Loading_Ritual
.
texture
rd_Loading_Ritual
.
texture
:
cardFrameRitual
.
texture
;
:
cardFrameRitual
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd
?
rd_Loading_Fusion
.
texture
:
cardFrameFusion
.
texture
;
else
if
(
data
.
HasType
(
CardType
.
Link
))
else
if
(
data
.
HasType
(
CardType
.
Link
))
return
rd
?
return
rd
?
rd_Loading_Link
.
texture
rd_Loading_Link
.
texture
...
@@ -1065,7 +1065,7 @@ namespace MDPro3
...
@@ -1065,7 +1065,7 @@ namespace MDPro3
return
cardFrameEffectOF
;
return
cardFrameEffectOF
;
}
}
}
}
else
else
// CardStyle.RushDuel
{
{
if
(
data
.
HasType
(
CardType
.
Pendulum
))
if
(
data
.
HasType
(
CardType
.
Pendulum
))
{
{
...
@@ -1073,10 +1073,10 @@ namespace MDPro3
...
@@ -1073,10 +1073,10 @@ namespace MDPro3
return
rd_Frame_PendulumXyz
;
return
rd_Frame_PendulumXyz
;
else
if
(
data
.
HasType
(
CardType
.
Synchro
))
else
if
(
data
.
HasType
(
CardType
.
Synchro
))
return
rd_Frame_PendulumSynchro
;
return
rd_Frame_PendulumSynchro
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd_Frame_PendulumFusion
;
else
if
(
data
.
HasType
(
CardType
.
Ritual
))
else
if
(
data
.
HasType
(
CardType
.
Ritual
))
return
rd_Frame_PendulumRitual
;
return
rd_Frame_PendulumRitual
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd_Frame_PendulumFusion
;
else
if
(
data
.
HasType
(
CardType
.
Normal
))
else
if
(
data
.
HasType
(
CardType
.
Normal
))
return
rd_Frame_PendulumNormal
;
return
rd_Frame_PendulumNormal
;
else
else
...
@@ -1096,10 +1096,10 @@ namespace MDPro3
...
@@ -1096,10 +1096,10 @@ namespace MDPro3
return
rd_Frame_Xyz
;
return
rd_Frame_Xyz
;
else
if
(
data
.
HasType
(
CardType
.
Synchro
))
else
if
(
data
.
HasType
(
CardType
.
Synchro
))
return
rd_Frame_Synchro
;
return
rd_Frame_Synchro
;
else
if
(
data
.
HasAllTypes
(
CardType
.
Fusion
,
CardType
.
Ritual
))
return
rd_Frame_Ritual
;
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
else
if
(
data
.
HasType
(
CardType
.
Fusion
))
return
rd_Frame_Fusion
;
return
rd_Frame_Fusion
;
else
if
(
data
.
HasType
(
CardType
.
Ritual
)
&&
data
.
HasType
(
CardType
.
Monster
))
return
rd_Frame_Ritual
;
else
if
(
data
.
HasType
(
CardType
.
Token
))
else
if
(
data
.
HasType
(
CardType
.
Token
))
return
rd_Frame_Token
;
return
rd_Frame_Token
;
else
if
(
data
.
HasType
(
CardType
.
Normal
))
else
if
(
data
.
HasType
(
CardType
.
Normal
))
...
...
Assets/Scripts/MDPro3/Utility/CardImageLoader.cs
View file @
020d3af8
...
@@ -617,16 +617,14 @@ namespace MDPro3.Utility
...
@@ -617,16 +617,14 @@ namespace MDPro3.Utility
private
static
Texture2D
GetCroppingTex
(
Texture2D
texture
,
int
startX
,
int
startY
,
int
width
,
int
height
)
private
static
Texture2D
GetCroppingTex
(
Texture2D
texture
,
int
startX
,
int
startY
,
int
width
,
int
height
)
{
{
var
returnValue
=
new
Texture2D
(
width
-
startX
,
height
-
startY
);
int
destWidth
=
width
-
startX
;
var
pix
=
new
Color32
[
returnValue
.
width
*
returnValue
.
height
];
int
destHeight
=
height
-
startY
;
var
index
=
0
;
for
(
var
y
=
startY
;
y
<
height
;
y
++)
var
result
=
new
Texture2D
(
destWidth
,
destHeight
,
texture
.
format
,
false
);
for
(
var
x
=
startX
;
x
<
width
;
x
++)
Graphics
.
CopyTexture
(
texture
,
0
,
0
,
startX
,
startY
,
destWidth
,
destHeight
,
pix
[
index
++]
=
texture
.
GetPixel
(
x
,
y
);
result
,
0
,
0
,
0
,
0
);
returnValue
.
SetPixels32
(
pix
);
return
result
;
returnValue
.
Apply
();
return
returnValue
;
}
}
#
endregion
#
endregion
...
...
Assets/
Texture/RenderTexture_CardArtVideo.renderTexture
.meta
→
Assets/
Shaders
.meta
View file @
020d3af8
fileFormatVersion: 2
fileFormatVersion: 2
guid: 8f5b379149e3c804d84d7bd6111ba8af
guid: 0e4be5dda2608b84db9887f7868615a9
NativeFormatImporter:
folderAsset: yes
DefaultImporter:
externalObjects: {}
externalObjects: {}
mainObjectFileID: 8400000
userData:
userData:
assetBundleName:
assetBundleName:
assetBundleVariant:
assetBundleVariant:
Assets/Shaders/CombineVideoAndFrame.shader
0 → 100644
View file @
020d3af8
Shader
"MDPro3/CombineVideoAndFrame"
{
Properties
{
_MainTex
(
"Video Texture"
,
2
D
)
=
"black"
{}
_FrameTex
(
"Frame Texture"
,
2
D
)
=
"white"
{}
_VideoRect
(
"Video Rect (x,y,w,h)"
,
Vector
)
=
(
0
,
0
,
1
,
1
)
}
SubShader
{
Tags
{
"RenderType"
=
"Opaque"
}
LOD
100
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct
appdata
{
float4
vertex
:
POSITION
;
float2
uv
:
TEXCOORD0
;
};
struct
v2f
{
float2
uv
:
TEXCOORD0
;
float4
vertex
:
SV_POSITION
;
};
sampler2D
_MainTex
;
sampler2D
_FrameTex
;
float4
_VideoRect
;
// x: posX, y: posY, z: scaleX, w: scaleY
v2f
vert
(
appdata
v
)
{
v2f
o
;
o
.
vertex
=
UnityObjectToClipPos
(
v
.
vertex
);
o
.
uv
=
v
.
uv
;
return
o
;
}
fixed4
frag
(
v2f
i
)
:
SV_Target
{
// 采样卡框纹理
fixed4
frameCol
=
tex2D
(
_FrameTex
,
i
.
uv
);
float
frameAlpha
=
frameCol
.
a
;
// 计算视频UV(考虑位置和缩放)
float2
videoUV
=
(
i
.
uv
-
float2
(
_VideoRect
.
x
,
_VideoRect
.
y
))
/
float2
(
_VideoRect
.
z
,
_VideoRect
.
w
);
// 判断UV是否在视频区域内
fixed4
videoCol
=
fixed4
(
0
,
0
,
0
,
0
);
if
(
all
(
videoUV
>=
0
)
&&
all
(
videoUV
<=
1
))
{
videoCol
=
tex2D
(
_MainTex
,
videoUV
);
}
// 合成:使用 Alpha 混合
fixed4
col
;
col
.
rgb
=
frameCol
.
rgb
*
frameAlpha
+
videoCol
.
rgb
*
(
1
-
frameAlpha
);
col
.
a
=
1
.
0
;
return
col
;
}
ENDCG
}
}
}
\ No newline at end of file
Assets/Shaders/CombineVideoAndFrame.shader.meta
0 → 100644
View file @
020d3af8
fileFormatVersion: 2
guid: 189dddb16d77ce742951df600099c6d3
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
Assets/Texture/RenderTexture_CardArtVideo.renderTexture
deleted
100644 → 0
View file @
b6115d85
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!84
&8400000
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
RenderTexture_CardArtVideo
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_IsAlphaChannelOptional
:
0
serializedVersion
:
6
m_Width
:
512
m_Height
:
512
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthStencilFormat
:
90
m_ColorFormat
:
8
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
0
m_UseDynamicScale
:
0
m_UseDynamicScaleExplicit
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_EnableRandomWrite
:
0
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
0
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
m_ShadowSamplingMode
:
2
Assets/Texture/SpriteAtlas.spriteatlas
View file @
020d3af8
...
@@ -184,6 +184,7 @@ SpriteAtlas:
...
@@ -184,6 +184,7 @@ SpriteAtlas:
-
bbbaddb2f52dda243893f854cedf46c4
:
21300000
-
bbbaddb2f52dda243893f854cedf46c4
:
21300000
-
55ff7eb207fa9a24e8e740b4fab3299c
:
21300000
-
55ff7eb207fa9a24e8e740b4fab3299c
:
21300000
-
98c476c2e9799714d99e0bb5fee52acc
:
21300000
-
98c476c2e9799714d99e0bb5fee52acc
:
21300000
-
9f9e97c267d35b84db512595c857ffba
:
21300000
-
9438adc285e9a11498484b1e31cbbccc
:
21300000
-
9438adc285e9a11498484b1e31cbbccc
:
21300000
-
3f3530d278caa714dac3fa1ca2b32382
:
21300000
-
3f3530d278caa714dac3fa1ca2b32382
:
21300000
-
9f17f0d2f554a1e4c81226f6fa5c63bf
:
21300000
-
9f17f0d2f554a1e4c81226f6fa5c63bf
:
21300000
...
@@ -320,6 +321,7 @@ SpriteAtlas:
...
@@ -320,6 +321,7 @@ SpriteAtlas:
-
544c8d75b7000c64bbf92d9ff9a78c2e
:
21300000
-
544c8d75b7000c64bbf92d9ff9a78c2e
:
21300000
-
af9e91850e3183d48846a52e6f7afee0
:
21300000
-
af9e91850e3183d48846a52e6f7afee0
:
21300000
-
ec6f0285a5f1c5e4bbed8c4bef6f7a40
:
21300000
-
ec6f0285a5f1c5e4bbed8c4bef6f7a40
:
21300000
-
5b696a850bf3a3443bf0e67396ecc181
:
21300000
-
3d49b095a6296d1469fc27c6a8205d60
:
21300000
-
3d49b095a6296d1469fc27c6a8205d60
:
21300000
-
6d94149591e51734c93b241dd3f542ae
:
21300000
-
6d94149591e51734c93b241dd3f542ae
:
21300000
-
b2f4f6957098f14459d8dee76a35f8c8
:
21300000
-
b2f4f6957098f14459d8dee76a35f8c8
:
21300000
...
@@ -365,6 +367,7 @@ SpriteAtlas:
...
@@ -365,6 +367,7 @@ SpriteAtlas:
-
066065a6b1b767c418d2889597305402
:
21300000
-
066065a6b1b767c418d2889597305402
:
21300000
-
3222daa6321be744bb2eda09e234d81c
:
21300000
-
3222daa6321be744bb2eda09e234d81c
:
21300000
-
594b2da68531f8748bde385e1c723438
:
21300000
-
594b2da68531f8748bde385e1c723438
:
21300000
-
838190b6b8c45334bab89da28a238150
:
21300000
-
d026a7b6d9105ad41b502c9b0014f140
:
21300000
-
d026a7b6d9105ad41b502c9b0014f140
:
21300000
-
986037c638106f04082197be94cbd15b
:
21300000
-
986037c638106f04082197be94cbd15b
:
21300000
-
10b2ebc6b9aba444191d85f8aa94207b
:
21300000
-
10b2ebc6b9aba444191d85f8aa94207b
:
21300000
...
@@ -924,6 +927,7 @@ SpriteAtlas:
...
@@ -924,6 +927,7 @@ SpriteAtlas:
-
{
fileID
:
21300000
,
guid
:
bbbaddb2f52dda243893f854cedf46c4
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
bbbaddb2f52dda243893f854cedf46c4
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
55ff7eb207fa9a24e8e740b4fab3299c
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
55ff7eb207fa9a24e8e740b4fab3299c
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
98c476c2e9799714d99e0bb5fee52acc
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
98c476c2e9799714d99e0bb5fee52acc
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
9f9e97c267d35b84db512595c857ffba
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
9438adc285e9a11498484b1e31cbbccc
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
9438adc285e9a11498484b1e31cbbccc
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
3f3530d278caa714dac3fa1ca2b32382
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
3f3530d278caa714dac3fa1ca2b32382
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
9f17f0d2f554a1e4c81226f6fa5c63bf
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
9f17f0d2f554a1e4c81226f6fa5c63bf
,
type
:
3
}
...
@@ -1060,6 +1064,7 @@ SpriteAtlas:
...
@@ -1060,6 +1064,7 @@ SpriteAtlas:
-
{
fileID
:
21300000
,
guid
:
544c8d75b7000c64bbf92d9ff9a78c2e
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
544c8d75b7000c64bbf92d9ff9a78c2e
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
af9e91850e3183d48846a52e6f7afee0
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
af9e91850e3183d48846a52e6f7afee0
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
ec6f0285a5f1c5e4bbed8c4bef6f7a40
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
ec6f0285a5f1c5e4bbed8c4bef6f7a40
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
5b696a850bf3a3443bf0e67396ecc181
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
3d49b095a6296d1469fc27c6a8205d60
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
3d49b095a6296d1469fc27c6a8205d60
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
6d94149591e51734c93b241dd3f542ae
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
6d94149591e51734c93b241dd3f542ae
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
b2f4f6957098f14459d8dee76a35f8c8
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
b2f4f6957098f14459d8dee76a35f8c8
,
type
:
3
}
...
@@ -1105,6 +1110,7 @@ SpriteAtlas:
...
@@ -1105,6 +1110,7 @@ SpriteAtlas:
-
{
fileID
:
21300000
,
guid
:
066065a6b1b767c418d2889597305402
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
066065a6b1b767c418d2889597305402
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
3222daa6321be744bb2eda09e234d81c
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
3222daa6321be744bb2eda09e234d81c
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
594b2da68531f8748bde385e1c723438
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
594b2da68531f8748bde385e1c723438
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
838190b6b8c45334bab89da28a238150
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
d026a7b6d9105ad41b502c9b0014f140
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
d026a7b6d9105ad41b502c9b0014f140
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
986037c638106f04082197be94cbd15b
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
986037c638106f04082197be94cbd15b
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
10b2ebc6b9aba444191d85f8aa94207b
,
type
:
3
}
-
{
fileID
:
21300000
,
guid
:
10b2ebc6b9aba444191d85f8aa94207b
,
type
:
3
}
...
@@ -1663,6 +1669,7 @@ SpriteAtlas:
...
@@ -1663,6 +1669,7 @@ SpriteAtlas:
-
GUI_CommonButtonList_NoLink
-
GUI_CommonButtonList_NoLink
-
GUI_CommonButtonToggleM_CheckOn
-
GUI_CommonButtonToggleM_CheckOn
-
GUI_T_Icon1_Counter_DOUBLE
-
GUI_T_Icon1_Counter_DOUBLE
-
GUI_Duel_GenericCardList_ViewIcon_Default
-
GUI_CommonItemFrameS_Over
-
GUI_CommonItemFrameS_Over
-
GUI_CommonButtonL
-
GUI_CommonButtonL
-
GUI_T_Icon1_Counter_ACCESS
-
GUI_T_Icon1_Counter_ACCESS
...
@@ -1799,6 +1806,7 @@ SpriteAtlas:
...
@@ -1799,6 +1806,7 @@ SpriteAtlas:
-
GUI_CommonWindowS_SubTitle_Base0
-
GUI_CommonWindowS_SubTitle_Base0
-
GUI_CommonButtonToggleS_Select
-
GUI_CommonButtonToggleS_Select
-
RankBg07
-
RankBg07
-
GUI_Duel_CardStats_Base_0
-
GUI_T_Icon1_Counter_SHIKI
-
GUI_T_Icon1_Counter_SHIKI
-
GUI_Duel_CardSelectionList_DialogChain
-
GUI_Duel_CardSelectionList_DialogChain
-
GUI_T_Icon1_State26
-
GUI_T_Icon1_State26
...
@@ -1844,6 +1852,7 @@ SpriteAtlas:
...
@@ -1844,6 +1852,7 @@ SpriteAtlas:
-
GUI_alpha_Icon_Cardlist6
-
GUI_alpha_Icon_Cardlist6
-
GUI_T_Icon1_Counter_PSYCHO
-
GUI_T_Icon1_Counter_PSYCHO
-
img_rankicon_07_l
-
img_rankicon_07_l
-
GUI_Duel_GenericCardList_ViewIcon_Expand
-
GUI_T_DuelButtonActIcon01_2
-
GUI_T_DuelButtonActIcon01_2
-
GUI_CommonDetail_Base_VtrEff
-
GUI_CommonDetail_Base_VtrEff
-
GUI_T_DuelButtonActIcon02_1
-
GUI_T_DuelButtonActIcon02_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