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
28
Issues
28
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
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
61ed9ebc
Commit
61ed9ebc
authored
Oct 15, 2025
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug that exclude button can not be clicked
parent
513b6fa4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
37 deletions
+53
-37
Assets/Scripts/MDPro3/Duel/BG/GraveBehaviour.cs
Assets/Scripts/MDPro3/Duel/BG/GraveBehaviour.cs
+33
-29
Assets/Scripts/MDPro3/Duel/DuelButton.cs
Assets/Scripts/MDPro3/Duel/DuelButton.cs
+4
-4
Assets/Scripts/MDPro3/UI/UIComponents/PhaseButtonHandler.cs
Assets/Scripts/MDPro3/UI/UIComponents/PhaseButtonHandler.cs
+16
-4
No files found.
Assets/Scripts/MDPro3/Duel/BG/GraveBehaviour.cs
View file @
61ed9ebc
...
@@ -14,13 +14,19 @@ namespace MDPro3.Duel
...
@@ -14,13 +14,19 @@ namespace MDPro3.Duel
public
class
GraveBehaviour
:
MonoBehaviour
public
class
GraveBehaviour
:
MonoBehaviour
{
{
public
int
controller
;
public
int
controller
;
BgEffectManager
manager
;
private
BgEffectManager
manager
;
private
BoxCollider
graveCollider
;
BoxCollider
graveCollider
;
private
BoxCollider
excludeCollider
;
BoxCollider
excludeCollider
;
private
GameObject
grave
;
private
GameObject
exclude
;
GameObject
grave
;
private
bool
graveCountShowing
;
GameObject
exclude
;
private
bool
excludeCountShowing
;
private
bool
graveButtonsCreated
;
private
bool
excludeButtonsCreated
;
public
List
<
DuelButtonInfo
>
graveButtons
=
new
();
public
List
<
DuelButton
>
graveButtonObjs
=
new
();
public
List
<
DuelButtonInfo
>
excludeButtons
=
new
();
public
List
<
DuelButton
>
excludeButtonObjs
=
new
();
private
void
Start
()
private
void
Start
()
{
{
...
@@ -35,15 +41,12 @@ namespace MDPro3.Duel
...
@@ -35,15 +41,12 @@ namespace MDPro3.Duel
excludeCollider
.
size
=
new
Vector3
(
6
,
2
,
6
);
excludeCollider
.
size
=
new
Vector3
(
6
,
2
,
6
);
}
}
bool
graveCountShowing
;
bool
excludeCountShowing
;
private
void
Update
()
private
void
Update
()
{
{
if
(
UserInput
.
HoverObject
==
grave
)
if
(
UserInput
.
HoverObject
==
grave
)
{
{
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_GraveMouseOver"
,
1
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_GraveMouseOver"
,
1
);
if
(
UserInput
.
MouseLeft
Down
)
if
(
UserInput
.
MouseLeft
Pressing
)
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_GravePressButton"
,
1
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_GravePressButton"
,
1
);
else
else
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_GravePressButton"
,
0
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_GravePressButton"
,
0
);
...
@@ -66,7 +69,7 @@ namespace MDPro3.Duel
...
@@ -66,7 +69,7 @@ namespace MDPro3.Duel
if
(
UserInput
.
HoverObject
==
exclude
)
if
(
UserInput
.
HoverObject
==
exclude
)
{
{
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludeMouseOver"
,
1
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludeMouseOver"
,
1
);
if
(
UserInput
.
MouseLeft
Down
)
if
(
UserInput
.
MouseLeft
Pressing
)
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludePressButton"
,
1
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludePressButton"
,
1
);
else
else
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludePressButton"
,
0
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludePressButton"
,
0
);
...
@@ -77,7 +80,7 @@ namespace MDPro3.Duel
...
@@ -77,7 +80,7 @@ namespace MDPro3.Duel
{
{
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludeMouseOver"
,
0
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludeMouseOver"
,
0
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludePressButton"
,
0
);
manager
.
GetElement
<
Renderer
>(
"Material01"
).
material
.
SetFloat
(
"_ExcludePressButton"
,
0
);
if
(
UserInput
.
MouseLeft
Down
)
if
(
UserInput
.
MouseLeft
Up
)
HideExcludeButtons
();
HideExcludeButtons
();
if
(
excludeCountShowing
)
if
(
excludeCountShowing
)
{
{
...
@@ -85,6 +88,7 @@ namespace MDPro3.Duel
...
@@ -85,6 +88,7 @@ namespace MDPro3.Duel
Program
.
instance
.
ocgcore
.
GetUI
<
OcgCoreUI
>().
HidePlaceCount
();
Program
.
instance
.
ocgcore
.
GetUI
<
OcgCoreUI
>().
HidePlaceCount
();
}
}
}
}
if
(
UserInput
.
HoverObject
==
grave
)
if
(
UserInput
.
HoverObject
==
grave
)
if
(!
graveCountShowing
)
if
(!
graveCountShowing
)
{
{
...
@@ -98,9 +102,8 @@ namespace MDPro3.Duel
...
@@ -98,9 +102,8 @@ namespace MDPro3.Duel
Program
.
instance
.
ocgcore
.
GetUI
<
OcgCoreUI
>().
ShowLocationCount
(
new
GPS
{
location
=
(
uint
)
CardLocation
.
Removed
,
controller
=
(
uint
)
controller
});
Program
.
instance
.
ocgcore
.
GetUI
<
OcgCoreUI
>().
ShowLocationCount
(
new
GPS
{
location
=
(
uint
)
CardLocation
.
Removed
,
controller
=
(
uint
)
controller
});
}
}
}
}
bool
graveButtonsCreated
=
false
;
bool
excludeButtonsCreated
=
false
;
private
void
GraveOnClick
()
void
GraveOnClick
()
{
{
AudioManager
.
PlaySE
(
"SE_DUEL_SELECT"
);
AudioManager
.
PlaySE
(
"SE_DUEL_SELECT"
);
...
@@ -138,7 +141,8 @@ namespace MDPro3.Duel
...
@@ -138,7 +141,8 @@ namespace MDPro3.Duel
else
else
ShowGraveButtons
();
ShowGraveButtons
();
}
}
void
ExcludeOnClick
()
private
void
ExcludeOnClick
()
{
{
AudioManager
.
PlaySE
(
"SE_DUEL_SELECT"
);
AudioManager
.
PlaySE
(
"SE_DUEL_SELECT"
);
...
@@ -147,7 +151,7 @@ namespace MDPro3.Duel
...
@@ -147,7 +151,7 @@ namespace MDPro3.Duel
if
(
Program
.
instance
.
ocgcore
.
returnAction
!=
null
)
if
(
Program
.
instance
.
ocgcore
.
returnAction
!=
null
)
return
;
return
;
if
(!
grav
eButtonsCreated
)
if
(!
exclud
eButtonsCreated
)
{
{
bool
spsummmon
=
false
;
bool
spsummmon
=
false
;
bool
activate
=
false
;
bool
activate
=
false
;
...
@@ -177,32 +181,31 @@ namespace MDPro3.Duel
...
@@ -177,32 +181,31 @@ namespace MDPro3.Duel
ShowExcludeButtons
();
ShowExcludeButtons
();
}
}
void
ShowGraveButtons
()
private
void
ShowGraveButtons
()
{
{
foreach
(
var
button
in
graveButtonObjs
)
foreach
(
var
button
in
graveButtonObjs
)
button
.
Show
();
button
.
Show
();
}
}
void
ShowExcludeButtons
()
private
void
ShowExcludeButtons
()
{
{
foreach
(
var
button
in
excludeButtonObjs
)
foreach
(
var
button
in
excludeButtonObjs
)
button
.
Show
();
button
.
Show
();
}
}
void
HideGraveButtons
()
private
void
HideGraveButtons
()
{
{
foreach
(
var
button
in
graveButtonObjs
)
foreach
(
var
button
in
graveButtonObjs
)
button
.
Hide
();
button
.
Hide
();
}
}
void
HideExcludeButtons
()
private
void
HideExcludeButtons
()
{
{
foreach
(
var
button
in
excludeButtonObjs
)
foreach
(
var
button
in
excludeButtonObjs
)
button
.
Hide
();
button
.
Hide
();
}
}
public
List
<
DuelButtonInfo
>
graveButtons
=
new
List
<
DuelButtonInfo
>();
private
void
CreateGraveButtons
()
public
List
<
DuelButton
>
graveButtonObjs
=
new
List
<
DuelButton
>();
public
List
<
DuelButtonInfo
>
excludeButtons
=
new
List
<
DuelButtonInfo
>();
public
List
<
DuelButton
>
excludeButtonObjs
=
new
List
<
DuelButton
>();
void
CreateGraveButtons
()
{
{
if
(
graveButtonsCreated
||
Program
.
instance
.
ocgcore
.
returnAction
!=
null
||
graveButtons
.
Count
==
0
)
if
(
graveButtonsCreated
||
Program
.
instance
.
ocgcore
.
returnAction
!=
null
||
graveButtons
.
Count
==
0
)
return
;
return
;
...
@@ -223,7 +226,8 @@ namespace MDPro3.Duel
...
@@ -223,7 +226,8 @@ namespace MDPro3.Duel
}
}
graveButtonsCreated
=
true
;
graveButtonsCreated
=
true
;
}
}
void
CreateExcludeButtons
()
private
void
CreateExcludeButtons
()
{
{
if
(
excludeButtonsCreated
||
Program
.
instance
.
ocgcore
.
returnAction
!=
null
||
excludeButtons
.
Count
==
0
)
if
(
excludeButtonsCreated
||
Program
.
instance
.
ocgcore
.
returnAction
!=
null
||
excludeButtons
.
Count
==
0
)
return
;
return
;
...
@@ -253,6 +257,7 @@ namespace MDPro3.Duel
...
@@ -253,6 +257,7 @@ namespace MDPro3.Duel
graveButtons
.
Clear
();
graveButtons
.
Clear
();
graveButtonsCreated
=
false
;
graveButtonsCreated
=
false
;
}
}
public
void
ClearExcludeButtons
()
public
void
ClearExcludeButtons
()
{
{
foreach
(
var
go
in
excludeButtonObjs
)
foreach
(
var
go
in
excludeButtonObjs
)
...
@@ -262,6 +267,5 @@ namespace MDPro3.Duel
...
@@ -262,6 +267,5 @@ namespace MDPro3.Duel
excludeButtonsCreated
=
false
;
excludeButtonsCreated
=
false
;
}
}
}
}
}
}
Assets/Scripts/MDPro3/Duel/DuelButton.cs
View file @
61ed9ebc
...
@@ -62,7 +62,7 @@ namespace MDPro3.UI
...
@@ -62,7 +62,7 @@ namespace MDPro3.UI
StartCoroutine
(
RefreshIcons
());
StartCoroutine
(
RefreshIcons
());
}
}
IEnumerator
RefreshIcons
()
private
IEnumerator
RefreshIcons
()
{
{
while
(
TextureManager
.
container
==
null
)
while
(
TextureManager
.
container
==
null
)
yield
return
null
;
yield
return
null
;
...
@@ -151,7 +151,7 @@ namespace MDPro3.UI
...
@@ -151,7 +151,7 @@ namespace MDPro3.UI
GetComponent
<
Button
>().
spriteState
=
spriteState
;
GetComponent
<
Button
>().
spriteState
=
spriteState
;
}
}
void
RefreshPosition
()
private
void
RefreshPosition
()
{
{
if
(
response
[
0
]
==
-
4
)
// 确认
if
(
response
[
0
]
==
-
4
)
// 确认
{
{
...
@@ -223,7 +223,7 @@ namespace MDPro3.UI
...
@@ -223,7 +223,7 @@ namespace MDPro3.UI
transform
.
DOScale
(
0
,
transitionTime
);
transform
.
DOScale
(
0
,
transitionTime
);
}
}
void
OnClick
()
private
void
OnClick
()
{
{
AudioManager
.
PlaySE
(
"SE_DUEL_DECIDE"
);
AudioManager
.
PlaySE
(
"SE_DUEL_DECIDE"
);
...
@@ -260,7 +260,7 @@ namespace MDPro3.UI
...
@@ -260,7 +260,7 @@ namespace MDPro3.UI
}
}
else
if
(
response
[
0
]
==
-
1
||
response
[
0
]
==
-
2
)
else
if
(
response
[
0
]
==
-
1
||
response
[
0
]
==
-
2
)
{
{
List
<
GameCard
>
responseCards
=
new
List
<
GameCard
>();
var
responseCards
=
new
List
<
GameCard
>();
foreach
(
var
card
in
OcgCore
.
cards
)
foreach
(
var
card
in
OcgCore
.
cards
)
if
(
card
.
p
.
controller
==
controller
)
if
(
card
.
p
.
controller
==
controller
)
if
((
card
.
p
.
location
&
location
)
>
0
)
if
((
card
.
p
.
location
&
location
)
>
0
)
...
...
Assets/Scripts/MDPro3/UI/UIComponents/PhaseButtonHandler.cs
View file @
61ed9ebc
...
@@ -7,6 +7,7 @@ using System.Collections;
...
@@ -7,6 +7,7 @@ using System.Collections;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
TMPro
;
using
TMPro
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.EventSystems
;
using
YgomSystem.ElementSystem
;
using
YgomSystem.ElementSystem
;
namespace
MDPro3.UI
namespace
MDPro3.UI
...
@@ -64,8 +65,11 @@ namespace MDPro3.UI
...
@@ -64,8 +65,11 @@ namespace MDPro3.UI
if
(
battlePhase
||
main2Phase
||
endPhase
)
if
(
battlePhase
||
main2Phase
||
endPhase
)
{
{
playerMaterial
.
SetFloat
(
"_Active"
,
1
);
playerMaterial
.
SetFloat
(
"_Active"
,
1
);
//Click
//Click
if
(
UserInput
.
HoverObject
==
collider_
.
gameObject
&&
UserInput
.
MouseLeftUp
)
if
(!
EventSystem
.
current
.
IsPointerOverGameObject
()
&&
UserInput
.
HoverObject
==
collider_
.
gameObject
&&
UserInput
.
MouseLeftUp
)
{
{
if
(
Program
.
instance
.
ocgcore
.
currentPopup
==
null
)
if
(
Program
.
instance
.
ocgcore
.
currentPopup
==
null
)
{
{
...
@@ -82,17 +86,25 @@ namespace MDPro3.UI
...
@@ -82,17 +86,25 @@ namespace MDPro3.UI
Program
.
instance
.
ocgcore
.
GetUI
<
OcgCoreUI
>().
CardList
.
Hide
();
Program
.
instance
.
ocgcore
.
GetUI
<
OcgCoreUI
>().
CardList
.
Hide
();
}
}
}
}
if
(
UserInput
.
HoverObject
==
collider_
.
gameObject
&&
UserInput
.
MouseLeftDown
)
if
(!
EventSystem
.
current
.
IsPointerOverGameObject
()
&&
UserInput
.
HoverObject
==
collider_
.
gameObject
&&
UserInput
.
MouseLeftPressing
)
playerMaterial
.
SetFloat
(
"_PressButton"
,
1
);
playerMaterial
.
SetFloat
(
"_PressButton"
,
1
);
else
else
playerMaterial
.
SetFloat
(
"_PressButton"
,
0
);
playerMaterial
.
SetFloat
(
"_PressButton"
,
0
);
//MouseOver
//MouseOver
if
(
UserInput
.
HoverObject
==
collider_
.
gameObject
&&
!
hover
)
if
(!
EventSystem
.
current
.
IsPointerOverGameObject
()
&&
UserInput
.
HoverObject
==
collider_
.
gameObject
&&
!
hover
)
{
{
hover
=
true
;
hover
=
true
;
DOTween
.
To
(()
=>
mouseOver
,
x
=>
mouseOver
=
x
,
1
,
0.2f
);
DOTween
.
To
(()
=>
mouseOver
,
x
=>
mouseOver
=
x
,
1
,
0.2f
);
}
}
else
if
(
UserInput
.
HoverObject
!=
collider_
&&
hover
)
else
if
(!
EventSystem
.
current
.
IsPointerOverGameObject
()
&&
UserInput
.
HoverObject
!=
collider_
&&
hover
)
{
{
hover
=
false
;
hover
=
false
;
DOTween
.
To
(()
=>
mouseOver
,
x
=>
mouseOver
=
x
,
0
,
0.2f
);
DOTween
.
To
(()
=>
mouseOver
,
x
=>
mouseOver
=
x
,
0
,
0.2f
);
...
...
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