Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
perfectdicky
YGOProUnity_V2
Commits
8ae57b1a
Commit
8ae57b1a
authored
Apr 10, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent "picking up" dying card in deck builder
parent
d6f3022d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
+3
-0
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+4
-5
No files found.
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
View file @
8ae57b1a
...
@@ -5,6 +5,7 @@ using System;
...
@@ -5,6 +5,7 @@ using System;
public
class
MonoCardInDeckManager
:
MonoBehaviour
{
public
class
MonoCardInDeckManager
:
MonoBehaviour
{
int
loadedPicCode
=
0
;
int
loadedPicCode
=
0
;
YGOSharp
.
Banlist
loaded_banlist
=
null
;
YGOSharp
.
Banlist
loaded_banlist
=
null
;
public
bool
dying
=
false
;
bool
died
=
false
;
bool
died
=
false
;
public
YGOSharp
.
Card
cardData
=
new
YGOSharp
.
Card
();
public
YGOSharp
.
Card
cardData
=
new
YGOSharp
.
Card
();
...
@@ -61,6 +62,7 @@ public class MonoCardInDeckManager : MonoBehaviour {
...
@@ -61,6 +62,7 @@ public class MonoCardInDeckManager : MonoBehaviour {
}
}
else
else
{
{
dying
=
true
;
died
=
true
;
died
=
true
;
gameObject
.
SetActive
(
false
);
gameObject
.
SetActive
(
false
);
}
}
...
@@ -102,6 +104,7 @@ public class MonoCardInDeckManager : MonoBehaviour {
...
@@ -102,6 +104,7 @@ public class MonoCardInDeckManager : MonoBehaviour {
Vector3
to_position
=
getGoodPosition
(
0
);
Vector3
to_position
=
getGoodPosition
(
0
);
Vector3
delta_position
=
to_position
-
form_position
;
Vector3
delta_position
=
to_position
-
form_position
;
GetComponent
<
Rigidbody
>().
AddForce
(
delta_position
*
200
);
GetComponent
<
Rigidbody
>().
AddForce
(
delta_position
*
200
);
dying
=
true
;
}
}
}
}
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
8ae57b1a
...
@@ -1257,7 +1257,8 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1257,7 +1257,8 @@ public class DeckManager : ServantWithCardDescription
goLast
=
gameObject
;
goLast
=
gameObject
;
timeLastDown
=
Program
.
TimePassed
();
timeLastDown
=
Program
.
TimePassed
();
MonoCardInDeckManager
MonoCardInDeckManager_
=
gameObject
.
GetComponent
<
MonoCardInDeckManager
>();
MonoCardInDeckManager
MonoCardInDeckManager_
=
gameObject
.
GetComponent
<
MonoCardInDeckManager
>();
if
(
MonoCardInDeckManager_
!=
null
)
cardPicLoader
cardPicLoader_
=
gameObject
.
GetComponent
<
cardPicLoader
>();
if
(
MonoCardInDeckManager_
!=
null
&&
!
MonoCardInDeckManager_
.
dying
)
{
{
if
(
doubleClick
&&
condition
==
Condition
.
editDeck
&&
deck
.
GetCardCount
(
MonoCardInDeckManager_
.
cardData
.
Id
)
<
currentBanlist
.
GetQuantity
(
MonoCardInDeckManager_
.
cardData
.
Id
))
if
(
doubleClick
&&
condition
==
Condition
.
editDeck
&&
deck
.
GetCardCount
(
MonoCardInDeckManager_
.
cardData
.
Id
)
<
currentBanlist
.
GetQuantity
(
MonoCardInDeckManager_
.
cardData
.
Id
))
{
{
...
@@ -1276,11 +1277,9 @@ public class DeckManager : ServantWithCardDescription
...
@@ -1276,11 +1277,9 @@ public class DeckManager : ServantWithCardDescription
MonoCardInDeckManager_
.
beginDrag
();
MonoCardInDeckManager_
.
beginDrag
();
}
}
}
}
else
if
(
cardPicLoader_
!=
null
)
if
(
condition
==
Condition
.
editDeck
)
{
{
cardPicLoader
cardPicLoader_
=
gameObject
.
GetComponent
<
cardPicLoader
>();
if
(
condition
==
Condition
.
editDeck
)
if
(
cardPicLoader_
!=
null
)
{
{
if
(
deck
.
GetCardCount
(
cardPicLoader_
.
data
.
Id
)
<
currentBanlist
.
GetQuantity
(
cardPicLoader_
.
data
.
Id
))
if
(
deck
.
GetCardCount
(
cardPicLoader_
.
data
.
Id
)
<
currentBanlist
.
GetQuantity
(
cardPicLoader_
.
data
.
Id
))
{
{
...
...
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