Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro2
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
SophiaCup
MDPro2
Commits
3fb55382
Commit
3fb55382
authored
Jun 19, 2023
by
赤子奈落
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new chain button
parent
8624f898
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
254 additions
and
27 deletions
+254
-27
Assets/ArtSystem/gameInfo/gameInfo.cs
Assets/ArtSystem/gameInfo/gameInfo.cs
+7
-2
Assets/MD/Scripts/ChainButtonHandler.cs
Assets/MD/Scripts/ChainButtonHandler.cs
+99
-0
Assets/MD/Scripts/ChainButtonHandler.cs.meta
Assets/MD/Scripts/ChainButtonHandler.cs.meta
+11
-0
Assets/MD/main.unity
Assets/MD/main.unity
+134
-23
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+3
-2
No files found.
Assets/ArtSystem/gameInfo/gameInfo.cs
View file @
3fb55382
...
...
@@ -50,6 +50,8 @@ public class gameInfo : MonoBehaviour
private
readonly
int
[]
time
=
new
int
[
2
];
public
UIButton
btn
;
// Use this for initialization
private
void
Start
()
{
...
...
@@ -105,8 +107,11 @@ public class gameInfo : MonoBehaviour
width
=
150
*
kb
+
15f
;
var
localPositionPanX
=
(
Utils
.
UIWidth
()
-
150
*
kb
)
/
2
-
15f
;
instance_btnPan
.
transform
.
localPosition
=
new
Vector3
(
localPositionPanX
,
28
,
0
);
instance_lab
.
transform
.
localPosition
=
new
Vector3
(
Utils
.
UIWidth
()
/
2
-
315
,
-
Utils
.
UIHeight
()
/
2
+
90
,
0
);
//instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, 28, 0);
//instance_lab.transform.localPosition = new Vector3(Utils.UIWidth() / 2 - 315, -Utils.UIHeight() / 2 + 90, 0);
instance_btnPan
.
transform
.
localPosition
=
new
Vector3
(
Utils
.
UIWidth
(),
28
,
0
);
instance_lab
.
transform
.
localPosition
=
new
Vector3
(
Utils
.
UIWidth
(),
-
Utils
.
UIHeight
()
/
2
+
90
,
0
);
btn
.
transform
.
localPosition
=
new
Vector3
(
Utils
.
UIWidth
()
/
2
-
30
,
-
Utils
.
UIHeight
()
/
2
+
90
,
0
);
var
j
=
0
;
foreach
(
var
t
in
HashedButtons
)
if
(
t
.
gameObject
!=
null
)
...
...
Assets/MD/Scripts/ChainButtonHandler.cs
0 → 100644
View file @
3fb55382
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
ChainButtonHandler
:
MonoBehaviour
{
gameInfo
gameInfo
;
private
UIButton
btn
;
public
Sprite
duelButtonQE_0_auto_1
;
public
Sprite
duelButtonQE_0_auto_2
;
public
Sprite
duelButtonQE_0_auto_3
;
public
Sprite
duelButtonQE_0_auto_4
;
public
Sprite
duelButtonQE_0_on_1
;
public
Sprite
duelButtonQE_0_on_2
;
public
Sprite
duelButtonQE_0_on_3
;
public
Sprite
duelButtonQE_0_on_4
;
public
Sprite
duelButtonQE_0_off_1
;
public
Sprite
duelButtonQE_0_off_2
;
public
Sprite
duelButtonQE_0_off_3
;
public
Sprite
duelButtonQE_0_off_4
;
Sprite
[]
sprites
=
new
Sprite
[
4
];
public
int
chainType
=
0
;
private
void
Start
()
{
gameInfo
=
Program
.
I
().
new_ui_gameInfo
;
btn
=
GetComponent
<
UIButton
>();
EventDelegate
ed
=
new
EventDelegate
(
this
,
"OnBtnClick"
);
btn
.
onClick
.
Add
(
ed
);
}
private
void
Update
()
{
int
i
=
0
;
if
(
gameInfo
.
get_condition
()
==
gameInfo
.
chainCondition
.
standard
)
i
=
0
;
else
if
(
gameInfo
.
get_condition
()
==
gameInfo
.
chainCondition
.
all
)
i
=
1
;
else
if
(
gameInfo
.
get_condition
()
==
gameInfo
.
chainCondition
.
no
)
i
=
2
;
if
(
chainType
!=
i
)
{
chainType
=
i
;
ChangeSprites
(
i
);
}
}
void
OnBtnClick
()
{
chainType
=
(
chainType
+
1
)
%
3
;
ChangeSprites
(
chainType
);
ChangeChainCondition
(
chainType
);
}
void
ChangeSprites
(
int
i
)
{
switch
(
i
)
{
case
0
:
sprites
[
0
]
=
duelButtonQE_0_auto_1
;
sprites
[
1
]
=
duelButtonQE_0_auto_2
;
sprites
[
2
]
=
duelButtonQE_0_auto_3
;
sprites
[
3
]
=
duelButtonQE_0_auto_4
;
break
;
case
1
:
sprites
[
0
]
=
duelButtonQE_0_on_1
;
sprites
[
1
]
=
duelButtonQE_0_on_2
;
sprites
[
2
]
=
duelButtonQE_0_on_3
;
sprites
[
3
]
=
duelButtonQE_0_on_4
;
break
;
case
2
:
sprites
[
0
]
=
duelButtonQE_0_off_1
;
sprites
[
1
]
=
duelButtonQE_0_off_2
;
sprites
[
2
]
=
duelButtonQE_0_off_3
;
sprites
[
3
]
=
duelButtonQE_0_off_4
;
break
;
}
btn
.
normalSprite2D
=
sprites
[
0
];
btn
.
hoverSprite2D
=
sprites
[
1
];
btn
.
pressedSprite2D
=
sprites
[
2
];
btn
.
disabledSprite2D
=
sprites
[
3
];
btn
.
gameObject
.
SetActive
(
false
);
btn
.
gameObject
.
SetActive
(
true
);
}
void
ChangeChainCondition
(
int
i
)
{
switch
(
i
)
{
case
0
:
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
break
;
case
1
:
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
all
);
break
;
case
2
:
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
no
);
break
;
}
}
}
Assets/MD/Scripts/ChainButtonHandler.cs.meta
0 → 100644
View file @
3fb55382
fileFormatVersion: 2
guid: 1ef858ecced044845908cd4276e201f7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/MD/main.unity
View file @
3fb55382
...
...
@@ -1114,6 +1114,14 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
737802523
}
m_Modifications
:
-
target
:
{
fileID
:
104964
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
128452
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
139962
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
m_Name
value
:
new_gameInfoRemaster
...
...
@@ -1174,6 +1182,74 @@ PrefabInstance:
propertyPath
:
mTexture
value
:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
btn
value
:
objectReference
:
{
fileID
:
1196096837
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
chainButton
value
:
objectReference
:
{
fileID
:
1196096838
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_on_1
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
401bc0e210897f74395197e45018fc33
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_on_2
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
b3a96249fd78adc4089cc942ec353846
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_on_3
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
c7a8f1b6d16ac5f49b0f6448e848a9c2
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_on_4
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
d7196ba003514934ba1091a967941999
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_off_1
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
e871bdd1a11470f4eb3069a3bde81357
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_off_2
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
faf559727c1689f4482104f4d23bfc75
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_off_3
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
46f1c6e415a2eeb42b474bd104bbcd5b
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_off_4
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
5c5fac6241722074c89818378e10c539
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_auto_1
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
e067b5ea8e0b7914799e798cae586d3a
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_auto_2
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
a5f621f8699d4034fb491950897e12b0
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_auto_3
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
2a55d32e6f201ab439cd232cc4ac626e
,
type
:
2
}
-
target
:
{
fileID
:
11495680
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
propertyPath
:
duelButtonQE_0_auto_4
value
:
objectReference
:
{
fileID
:
21300000
,
guid
:
50477e862637f1c4594b673047abc58b
,
type
:
2
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
0f5784805788a664da2c92f42ec39685
,
type
:
3
}
---
!u!114
&98754547
stripped
...
...
@@ -9058,8 +9134,9 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
1196096835
}
-
component
:
{
fileID
:
1196096838
}
-
component
:
{
fileID
:
1196096836
}
-
component
:
{
fileID
:
1196096837
}
-
component
:
{
fileID
:
1196096836
}
-
component
:
{
fileID
:
1196096839
}
m_Layer
:
8
m_Name
:
Button
m_TagString
:
Untagged
...
...
@@ -9075,13 +9152,26 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1196096834
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
-86
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
137373064
}
m_RootOrder
:
2
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1196096836
---
!u!65
&1196096836
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1196096834
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
60
,
y
:
60
,
z
:
0
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1196096837
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
...
...
@@ -9096,7 +9186,7 @@ MonoBehaviour:
tweenTarget
:
{
fileID
:
1196096834
}
hover
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
pressed
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
disabledColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
disabledColor
:
{
r
:
0.5
,
g
:
0.5
,
b
:
0.5
,
a
:
1
}
duration
:
0.2
dragHighlight
:
0
hoverSprite
:
...
...
@@ -9104,27 +9194,11 @@ MonoBehaviour:
disabledSprite
:
hoverSprite2D
:
{
fileID
:
21300000
,
guid
:
a5f621f8699d4034fb491950897e12b0
,
type
:
2
}
pressedSprite2D
:
{
fileID
:
21300000
,
guid
:
2a55d32e6f201ab439cd232cc4ac626e
,
type
:
2
}
disabledSprite2D
:
{
fileID
:
0
}
disabledSprite2D
:
{
fileID
:
21300000
,
guid
:
50477e862637f1c4594b673047abc58b
,
type
:
2
}
pixelSnap
:
0
onClick
:
[]
mTextureOutNormal
:
mTextureOutPressed
:
---
!u!58
&1196096837
CircleCollider2D
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1196096834
}
m_Enabled
:
1
m_Density
:
1
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_UsedByEffector
:
0
m_UsedByComposite
:
0
m_Offset
:
{
x
:
0
,
y
:
0
}
serializedVersion
:
2
m_Radius
:
0.5
---
!u!114
&1196096838
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
@@ -9156,8 +9230,8 @@ MonoBehaviour:
updateAnchors
:
1
mColor
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
mPivot
:
4
mWidth
:
10
0
mHeight
:
10
0
mWidth
:
6
0
mHeight
:
6
0
mDepth
:
0
autoResizeBoxCollider
:
1
hideIfOffScreen
:
0
...
...
@@ -9180,6 +9254,43 @@ MonoBehaviour:
mFixedAspect
:
0
mPixelSize
:
1
nextSprite
:
{
fileID
:
0
}
---
!u!114
&1196096839
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1196096834
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
1ef858ecced044845908cd4276e201f7
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
duelButtonQE_0_auto_1
:
{
fileID
:
21300000
,
guid
:
e067b5ea8e0b7914799e798cae586d3a
,
type
:
2
}
duelButtonQE_0_auto_2
:
{
fileID
:
21300000
,
guid
:
a5f621f8699d4034fb491950897e12b0
,
type
:
2
}
duelButtonQE_0_auto_3
:
{
fileID
:
21300000
,
guid
:
2a55d32e6f201ab439cd232cc4ac626e
,
type
:
2
}
duelButtonQE_0_auto_4
:
{
fileID
:
21300000
,
guid
:
50477e862637f1c4594b673047abc58b
,
type
:
2
}
duelButtonQE_0_on_1
:
{
fileID
:
21300000
,
guid
:
401bc0e210897f74395197e45018fc33
,
type
:
2
}
duelButtonQE_0_on_2
:
{
fileID
:
21300000
,
guid
:
b3a96249fd78adc4089cc942ec353846
,
type
:
2
}
duelButtonQE_0_on_3
:
{
fileID
:
21300000
,
guid
:
c7a8f1b6d16ac5f49b0f6448e848a9c2
,
type
:
2
}
duelButtonQE_0_on_4
:
{
fileID
:
21300000
,
guid
:
d7196ba003514934ba1091a967941999
,
type
:
2
}
duelButtonQE_0_off_1
:
{
fileID
:
21300000
,
guid
:
e871bdd1a11470f4eb3069a3bde81357
,
type
:
2
}
duelButtonQE_0_off_2
:
{
fileID
:
21300000
,
guid
:
faf559727c1689f4482104f4d23bfc75
,
type
:
2
}
duelButtonQE_0_off_3
:
{
fileID
:
21300000
,
guid
:
46f1c6e415a2eeb42b474bd104bbcd5b
,
type
:
2
}
duelButtonQE_0_off_4
:
{
fileID
:
21300000
,
guid
:
5c5fac6241722074c89818378e10c539
,
type
:
2
}
chainType
:
0
---
!u!4
&1208619106
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
484650
,
guid
:
b1ec81ad075831c4da5c2baaaa65594b
,
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
3fb55382
...
...
@@ -884,11 +884,12 @@ public class Ocgcore : ServantWithCardDescription
{
Program
.
cameraPosition
.
z
=
camera_max
;
}
if
(
Input
.
GetKeyDown
(
KeyCode
.
C
))
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
smart
);
//快捷键
//if (Input.GetKeyDown(KeyCode.C)) gameInfo.set_condition(gameInfo.chainCondition.smart);
if
(
Input
.
GetKeyDown
(
KeyCode
.
A
))
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
all
);
if
(
Input
.
GetKeyDown
(
KeyCode
.
S
))
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
no
);
if
(
Input
.
GetKeyUp
(
KeyCode
.
C
))
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
//
if (Input.GetKeyUp(KeyCode.C)) gameInfo.set_condition(gameInfo.chainCondition.standard);
if
(
Input
.
GetKeyUp
(
KeyCode
.
A
))
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
if
(
Input
.
GetKeyUp
(
KeyCode
.
S
))
gameInfo
.
set_condition
(
gameInfo
.
chainCondition
.
standard
);
...
...
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