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
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
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
40fcb4df
Commit
40fcb4df
authored
Aug 15, 2025
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add loop break for LoopTrack
parent
3f2d86c1
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
26 deletions
+95
-26
Assets/Prefabs/DuelPrefabs/DuelText/DuelFinalBlow/DuelFinalBlow.prefab
...s/DuelPrefabs/DuelText/DuelFinalBlow/DuelFinalBlow.prefab
+13
-0
Assets/Scripts/MDPro3/Duel/BG/DuelFinalBlow.cs
Assets/Scripts/MDPro3/Duel/BG/DuelFinalBlow.cs
+15
-0
Assets/Scripts/MDPro3/Duel/BG/DuelFinalBlow.cs.meta
Assets/Scripts/MDPro3/Duel/BG/DuelFinalBlow.cs.meta
+2
-0
Assets/Scripts/MDPro3/Duel/BG/LoopTrackManager.cs
Assets/Scripts/MDPro3/Duel/BG/LoopTrackManager.cs
+31
-0
Assets/Scripts/MDPro3/Duel/BG/LoopTrackManager.cs.meta
Assets/Scripts/MDPro3/Duel/BG/LoopTrackManager.cs.meta
+2
-0
Assets/Scripts/MDPro3/Duel/BG/PlayableGuide.cs
Assets/Scripts/MDPro3/Duel/BG/PlayableGuide.cs
+1
-1
Assets/Scripts/MDPro3/Servant/OcgCore.cs
Assets/Scripts/MDPro3/Servant/OcgCore.cs
+13
-9
Assets/Scripts/MasterDuel/YgomSystem/Timeline/LabeledPlayableController.cs
...sterDuel/YgomSystem/Timeline/LabeledPlayableController.cs
+0
-2
Assets/Scripts/MasterDuel/YgomSystem/Timeline/LoopBehaviour.cs
...s/Scripts/MasterDuel/YgomSystem/Timeline/LoopBehaviour.cs
+2
-4
Assets/Scripts/MasterDuel/YgomSystem/Timeline/LoopMixerBehaviour.cs
...ipts/MasterDuel/YgomSystem/Timeline/LoopMixerBehaviour.cs
+16
-10
No files found.
Assets/Prefabs/DuelPrefabs/DuelText/DuelFinalBlow/DuelFinalBlow.prefab
View file @
40fcb4df
...
...
@@ -1464,6 +1464,7 @@ GameObject:
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
4896299765901075
}
-
component
:
{
fileID
:
-387253940381332063
}
-
component
:
{
fileID
:
114616308496331425
}
-
component
:
{
fileID
:
320369927042751078
}
m_Layer
:
0
...
...
@@ -1489,6 +1490,18 @@ Transform:
-
{
fileID
:
4384957410883823
}
m_Father
:
{
fileID
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
-0
,
z
:
-0
}
---
!u!114
&-387253940381332063
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1348777536908202
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
e06bcf7a3f4f3504da14d94faabd6f5e
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!114
&114616308496331425
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
Assets/Scripts/MDPro3/Duel/BG/DuelFinalBlow.cs
0 → 100644
View file @
40fcb4df
using
UnityEngine
;
using
UnityEngine.Playables
;
using
UnityEngine.Timeline
;
namespace
MDPro3.Duel
{
public
class
DuelFinalBlow
:
LoopTrackManager
{
public
void
Destroy
()
{
StopLoop
();
Destroy
(
gameObject
,
0.5f
);
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/BG/DuelFinalBlow.cs.meta
0 → 100644
View file @
40fcb4df
fileFormatVersion: 2
guid: e06bcf7a3f4f3504da14d94faabd6f5e
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/BG/LoopTrackManager.cs
0 → 100644
View file @
40fcb4df
using
UnityEngine
;
using
UnityEngine.Playables
;
using
YgomSystem.Timeline
;
namespace
MDPro3.Duel
{
public
class
LoopTrackManager
:
MonoBehaviour
{
private
PlayableDirector
playableDirector
;
private
PlayableDirector
PlayableDirector
=>
playableDirector
=
playableDirector
!=
null
?
playableDirector
:
GetComponent
<
PlayableDirector
>();
public
LoopMixerBehaviour
loopMixerBehaviour
;
public
LoopBehaviour
loopBehaviour
;
public
void
StopLoop
()
{
if
(
loopMixerBehaviour
!=
null
)
{
loopMixerBehaviour
.
needLoop
=
false
;
}
if
(
loopBehaviour
!=
null
)
{
loopBehaviour
.
loopClip
=
null
;
loopBehaviour
=
null
;
}
}
}
}
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/BG/LoopTrackManager.cs.meta
0 → 100644
View file @
40fcb4df
fileFormatVersion: 2
guid: 66385358c086ba540861577a5ca6b245
\ No newline at end of file
Assets/Scripts/MDPro3/Duel/BG/PlayableGuide.cs
View file @
40fcb4df
...
...
@@ -2,7 +2,7 @@ using System.Collections;
using
System.Collections.Generic
;
using
UnityEngine
;
namespace
MDPro3.Duel
.BG
namespace
MDPro3.Duel
{
public
class
PlayableGuide
:
MonoBehaviour
{
...
...
Assets/Scripts/MDPro3/Servant/OcgCore.cs
View file @
40fcb4df
using
DG.Tweening
;
using
MDPro3.Duel
;
using
MDPro3.Duel.BG
;
using
MDPro3.Duel.YGOSharp
;
using
MDPro3.Net
;
using
MDPro3.UI
;
...
...
@@ -90,7 +89,7 @@ namespace MDPro3.Servant
private
GameObject
equipLine
;
private
GameObject
myDice
;
private
GameObject
opDice
;
private
GameObject
duelFinalBlow
;
private
DuelFinalBlow
duelFinalBlow
;
private
ElementObjectManager
timerManager
;
private
TimerHandler
timerHandler
;
private
PlayableGuide
playableGuide
;
...
...
@@ -526,7 +525,8 @@ namespace MDPro3.Servant
TimelineManager
.
inSummonMaterial
=
false
;
GetUI
<
OcgCoreUI
>().
CloseHint
();
attackLine
.
SetActive
(
false
);
Destroy
(
duelFinalBlow
,
0.5f
);
if
(
duelFinalBlow
!=
null
)
duelFinalBlow
.
Destroy
();
yield
return
new
WaitForSeconds
(
TransitionTime
);
servantUI
.
ShutDown
();
speaking
=
false
;
...
...
@@ -3979,9 +3979,9 @@ namespace MDPro3.Servant
if
(
finalBlow
)
{
if
(
duelFinalBlow
!=
null
)
Destroy
(
duelFinalBlow
);
duelFinalBlow
.
Destroy
(
);
//duelFinalBlow = ABLoader.LoadFromFile("MasterDuel/Timeline/DuelText/DuelFinalBlow", true);
duelFinalBlow
=
Instantiate
(
container
.
duelFinalBlow
);
duelFinalBlow
=
Instantiate
(
container
.
duelFinalBlow
)
.
GetComponent
<
DuelFinalBlow
>()
;
}
Sleep
(
20
);
}
...
...
@@ -3991,7 +3991,8 @@ namespace MDPro3.Servant
case
GameMessage
.
AttackDisabled
:
ES_hint
=
InterString
.
Get
(
"攻击被无效时"
);
attackLine
.
SetActive
(
false
);
Destroy
(
duelFinalBlow
,
0.5f
);
if
(
duelFinalBlow
!=
null
)
duelFinalBlow
.
Destroy
();
break
;
case
GameMessage
.
DamageStepStart
:
break
;
...
...
@@ -4068,7 +4069,8 @@ namespace MDPro3.Servant
if
(
duelFinalBlow
!=
null
)
{
isFinalAttack
=
true
;
Destroy
(
duelFinalBlow
);
if
(
duelFinalBlow
!=
null
)
duelFinalBlow
.
Destroy
();
}
needDamageResponseInstant
=
true
;
messagePass
=
false
;
...
...
@@ -4736,7 +4738,8 @@ namespace MDPro3.Servant
break
;
case
GameMessage
.
NewPhase
:
attackLine
.
SetActive
(
false
);
Destroy
(
duelFinalBlow
,
0.5f
);
if
(
duelFinalBlow
!=
null
)
duelFinalBlow
.
Destroy
();
cardsInSelection
.
Clear
();
var
ph
=
r
.
ReadUInt16
();
...
...
@@ -5414,7 +5417,8 @@ namespace MDPro3.Servant
break
;
case
GameMessage
.
SelectBattleCmd
:
attackLine
.
SetActive
(
false
);
Destroy
(
duelFinalBlow
,
0.5f
);
if
(
duelFinalBlow
!=
null
)
duelFinalBlow
.
Destroy
();
if
(
InIgnoranceReplay
())
break
;
SetPlayableGuide
(
true
);
...
...
Assets/Scripts/MasterDuel/YgomSystem/Timeline/LabeledPlayableController.cs
View file @
40fcb4df
...
...
@@ -91,8 +91,6 @@ namespace YgomSystem.Timeline
}
}
public
LoopMixerBehaviour
loopMixerBehaviour
;
public
static
LabeledPlayableController
Create
(
PlayableDirector
target
)
...
...
Assets/Scripts/MasterDuel/YgomSystem/Timeline/LoopBehaviour.cs
View file @
40fcb4df
using
MDPro3
;
using
System
;
using
UnityEngine.Playables
;
using
UnityEngine.Timeline
;
using
static
Willow
.
TimelineReplacer
;
namespace
YgomSystem.Timeline
{
...
...
@@ -14,9 +12,9 @@ namespace YgomSystem.Timeline
public
override
void
PrepareFrame
(
Playable
playable
,
FrameData
info
)
{
if
(
m_director
==
null
)
if
(
m_director
==
null
)
m_director
=
playable
.
GetGraph
().
GetResolver
()
as
PlayableDirector
;
if
(
loopClip
!=
null
&&
m_director
!=
null
)
if
(
loopClip
!=
null
&&
m_director
!=
null
)
if
(
m_director
.
time
>
loopClip
.
extrapolatedStart
+
loopClip
.
duration
)
m_director
.
time
=
loopClip
.
extrapolatedStart
;
}
...
...
Assets/Scripts/MasterDuel/YgomSystem/Timeline/LoopMixerBehaviour.cs
View file @
40fcb4df
using
AssetStudio
;
using
MDPro3.Duel
;
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
...
...
@@ -49,16 +50,16 @@ namespace YgomSystem.Timeline
if
(!
inied
)
Ini
(
playable
);
if
(
m_Director
.
GetComponent
<
LabeledPlayableController
>()
!=
null
)
if
(
m_Director
.
TryGetComponent
<
LabeledPlayableController
>(
out
var
lpc
)
)
{
m_Director
.
GetComponent
<
LabeledPlayableController
>()
.
loopMixerBehaviour
=
this
;
lpc
.
loopMixerBehaviour
=
this
;
m_Initialized
=
true
;
}
}
}
bool
inied
;
void
Ini
(
Playable
playable
)
private
bool
inied
;
private
void
Ini
(
Playable
playable
)
{
var
resolver
=
playable
.
GetGraph
().
GetResolver
();
if
(
resolver
is
PlayableDirector
)
...
...
@@ -76,18 +77,23 @@ namespace YgomSystem.Timeline
}
}
}
inied
=
true
;
if
(
m_Director
.
TryGetComponent
<
LoopTrackManager
>(
out
var
ltm
))
{
ltm
.
loopMixerBehaviour
=
this
;
}
inied
=
true
;
}
public
bool
needLoop
=
true
;
public
override
void
PrepareFrame
(
Playable
playable
,
FrameData
info
)
{
if
(
currentClip
!=
null
)
if
(
m_Director
.
time
>
currentClip
.
extrapolatedStart
+
currentClip
.
duration
-
0.02f
)
m_Director
.
time
=
currentClip
.
extrapolatedStart
;
}
if
(
currentClip
!=
null
&&
needLoop
)
if
(
m_Director
.
time
>
currentClip
.
extrapolatedStart
+
currentClip
.
duration
-
0.02f
)
m_Director
.
time
=
currentClip
.
extrapolatedStart
;
}
public
void
PlayClip
(
string
label
,
TimelineClip
loopClip
)
{
...
...
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