Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
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
hex
ygopro2
Commits
77b93c7e
Commit
77b93c7e
authored
Jul 06, 2025
by
hex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reomve iTween
parent
07ad0480
Pipeline
#38584
failed
Changes
28
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
770 additions
and
8757 deletions
+770
-8757
Assets/ArtSystem/YGOPro1/pro1CardShower.cs
Assets/ArtSystem/YGOPro1/pro1CardShower.cs
+15
-7
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
+0
-8
Assets/ArtSystem/gameInfo/gameInfo.cs
Assets/ArtSystem/gameInfo/gameInfo.cs
+36
-26
Assets/ArtSystem/mouseParticle/UIparticle.prefab
Assets/ArtSystem/mouseParticle/UIparticle.prefab
+177
-369
Assets/ArtSystem/picShower/faceShower.cs
Assets/ArtSystem/picShower/faceShower.cs
+31
-13
Assets/ArtSystem/picShower/handShower.cs
Assets/ArtSystem/picShower/handShower.cs
+31
-8
Assets/ArtSystem/superButton/toolBars/mats/toolShift.cs
Assets/ArtSystem/superButton/toolBars/mats/toolShift.cs
+22
-21
Assets/SibylSystem/CardDescription/CardDescription.cs
Assets/SibylSystem/CardDescription/CardDescription.cs
+14
-12
Assets/SibylSystem/MonoHelpers/TextMaster.cs
Assets/SibylSystem/MonoHelpers/TextMaster.cs
+6
-2
Assets/SibylSystem/MonoHelpers/UIHelper.cs
Assets/SibylSystem/MonoHelpers/UIHelper.cs
+3
-12
Assets/SibylSystem/Ocgcore/OCGobjects/gameButton.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameButton.cs
+4
-1
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
+92
-313
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
+0
-27
Assets/SibylSystem/Ocgcore/OCGobjects/gameHiddenButton.cs
Assets/SibylSystem/Ocgcore/OCGobjects/gameHiddenButton.cs
+2
-4
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+37
-44
Assets/SibylSystem/Program.cs
Assets/SibylSystem/Program.cs
+6
-17
Assets/SibylSystem/Servant.cs
Assets/SibylSystem/Servant.cs
+20
-21
Assets/SibylSystem/WindowServant2D.cs
Assets/SibylSystem/WindowServant2D.cs
+10
-6
Assets/SibylSystem/deckManager/DeckManager.cs
Assets/SibylSystem/deckManager/DeckManager.cs
+52
-66
Assets/old/Ocgcore/animation_scripts/screenFader.cs
Assets/old/Ocgcore/animation_scripts/screenFader.cs
+10
-10
Assets/old/Ocgcore/numbers/number_loader.cs
Assets/old/Ocgcore/numbers/number_loader.cs
+71
-55
Assets/old/UiverseAssests/art_plugin/FT_Pulse_volume01/ocgcore/fade_died.cs
...Assests/art_plugin/FT_Pulse_volume01/ocgcore/fade_died.cs
+12
-9
Assets/old/UiverseAssests/art_plugin/attack_sign/sorder.cs
Assets/old/UiverseAssests/art_plugin/attack_sign/sorder.cs
+17
-16
Assets/old/UiverseAssests/art_plugin/coin/coiner.cs
Assets/old/UiverseAssests/art_plugin/coin/coiner.cs
+75
-62
Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/LightningBolt.cs
...Assests/art_plugin/thunder/RAYOS/Sources/LightningBolt.cs
+27
-27
Assets/old/UiverseAssests/itween.meta
Assets/old/UiverseAssests/itween.meta
+0
-9
Assets/old/UiverseAssests/itween/iTween.cs
Assets/old/UiverseAssests/itween/iTween.cs
+0
-7580
Assets/old/UiverseAssests/itween/iTween.cs.meta
Assets/old/UiverseAssests/itween/iTween.cs.meta
+0
-12
No files found.
Assets/ArtSystem/YGOPro1/pro1CardShower.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
public
class
pro1CardShower
:
MonoBehaviour
{
public
UITexture
card
;
public
UITexture
mask
;
public
UITexture
disable
;
public
TweenAlpha
t
;
public
void
run
()
{
mask
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(-
140
,
0
,
0
);
iTween
.
MoveToLocal
(
mask
.
gameObject
,
new
Vector3
(
140
,
0
,
0
),
0.7f
);
// 1. 将mask的初始位置设置好
mask
.
transform
.
localPosition
=
new
Vector3
(-
140
,
0
,
0
);
// 2. 使用 DOTween 执行移动动画
// 由于只改变X轴,使用 DOLocalMoveX 意图更明确,性能也略好
mask
.
transform
.
DOLocalMoveX
(
140
,
0.7f
);
}
public
void
Dis
()
{
iTween
.
ScaleTo
(
disable
.
gameObject
,
new
Vector3
(
1
,
1
,
1
),
0.7f
);
t
.
duration
=
0.7f
;
t
.
enabled
=
true
;
// 1. 缩放动画
disable
.
transform
.
DOScale
(
Vector3
.
one
,
0.7f
);
// 2. Alpha 透明度动画
// 使用 DOTween 的通用数值渐变来替代 NGUI 的 TweenAlpha 组件
// 这让所有动画都由 DOTween 控制,代码更统一,也移除了对 TweenAlpha 的依赖
// 假设目标 alpha 是 1 (完全不透明)
DOTween
.
To
(()
=>
disable
.
alpha
,
x
=>
disable
.
alpha
=
x
,
1f
,
0.7f
);
}
}
Assets/ArtSystem/deckManager/MonoCardInDeckManager.cs
View file @
77b93c7e
...
...
@@ -102,14 +102,6 @@ public class MonoCardInDeckManager : MonoBehaviour
physicalOFF
();
physicalHalfON
();
isDraging
=
true
;
// Program.go(
// 1,
// () =>
// {
// iTween.RotateTo(gameObject, new Vector3(90, 0, 0), 0.6f);
// }
// );
transform
.
DORotate
(
new
Vector3
(
90
,
0
,
0
),
0.6f
).
SetDelay
(
0
);
}
...
...
Assets/ArtSystem/gameInfo/gameInfo.cs
View file @
77b93c7e
using
UnityEngine
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
DG.Tweening
;
using
UnityEngine
;
public
class
gameUIbutton
{
...
...
@@ -71,7 +73,7 @@ public class gameInfo : MonoBehaviour
me
.
transform
.
SetParent
(
gameObject
.
transform
);
opponent
=
((
GameObject
)
MonoBehaviour
.
Instantiate
(
mod_healthBar
,
new
Vector3
(
1000
,
0
,
0
),
Quaternion
.
identity
)).
GetComponent
<
barPngLoader
>();
opponent
.
transform
.
SetParent
(
gameObject
.
transform
);
Transform
[]
Transforms
=
me
.
GetComponentsInChildren
<
Transform
>();
foreach
(
Transform
child
in
Transforms
)
{
...
...
@@ -93,7 +95,7 @@ public class gameInfo : MonoBehaviour
{
k
=
1.2f
;
}
if
(
k
<
0.8f
)
if
(
k
<
0.8f
)
{
k
=
0.8f
;
}
...
...
@@ -111,7 +113,7 @@ public class gameInfo : MonoBehaviour
instance_btnPan
.
gameObject
.
transform
.
localScale
=
ksb
;
opponent
.
transform
.
localScale
=
ks
;
me
.
transform
.
localScale
=
ks
;
if
(!
swaped
)
if
(!
swaped
)
{
opponent
.
transform
.
localPosition
=
new
Vector3
(
Screen
.
width
/
2
-
14
,
Screen
.
height
/
2
-
14
);
me
.
transform
.
localPosition
=
new
Vector3
(
Screen
.
width
/
2
-
14
,
Screen
.
height
/
2
-
14
-
k
*
(
float
)(
opponent
.
under
.
height
));
...
...
@@ -187,11 +189,11 @@ public class gameInfo : MonoBehaviour
{
child
.
gameObject
.
layer
=
instance_btnPan
.
gameObject
.
layer
;
}
hashedButton
.
gameObject
.
transform
.
SetParent
(
instance_btnPan
.
transform
,
false
);
hashedButton
.
gameObject
.
transform
.
SetParent
(
instance_btnPan
.
transform
,
false
);
hashedButton
.
gameObject
.
transform
.
localScale
=
Vector3
.
zero
;
hashedButton
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
0
,
-
120
,
0
);
hashedButton
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
0
,
-
120
,
0
);
hashedButton
.
gameObject
.
transform
.
localEulerAngles
=
Vector3
.
zero
;
iTween
.
ScaleTo
(
hashedButton
.
gameObject
,
new
Vector3
(
0.9f
,
0.9f
,
0.9f
),
0.3f
);
hashedButton
.
gameObject
.
transform
.
DOScale
(
new
Vector3
(
0.9f
,
0.9f
,
0.9f
),
0.3f
);
hashedButton
.
dying
=
false
;
HashedButtons
.
Add
(
hashedButton
);
refreshLine
();
...
...
@@ -347,28 +349,34 @@ public class gameInfo : MonoBehaviour
return
time
[
0
]
<
Program
.
I
().
ocgcore
.
timeLimit
/
3
;
}
void
setTimeAbsolutely
(
int
player
,
int
t
)
private
void
setTimeAbsolutely
(
int
player
,
int
t
)
{
if
(
Program
.
I
().
ocgcore
.
timeLimit
==
0
)
{
return
;
}
if
(
player
==
0
)
{
me
.
api_timeHint
.
text
=
t
.
ToString
()
+
"/"
+
Program
.
I
().
ocgcore
.
timeLimit
.
ToString
();
opponent
.
api_timeHint
.
text
=
"waiting"
;
UIHelper
.
clearITWeen
(
me
.
api_healthBar
.
gameObject
);
iTween
.
MoveToLocal
(
me
.
api_timeBar
.
gameObject
,
new
Vector3
((
float
)(
me
.
api_timeBar
.
width
)
-
(
float
)
t
/
(
float
)
Program
.
I
().
ocgcore
.
timeLimit
*
(
float
)(
me
.
api_timeBar
.
width
),
me
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
y
,
me
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
z
),
1f
);
// 停止之前的动画并开始新动画
me
.
api_timeBar
.
transform
.
DOKill
();
me
.
api_timeBar
.
transform
.
DOLocalMoveX
((
float
)(
me
.
api_timeBar
.
width
)
-
(
float
)
t
/
(
float
)
Program
.
I
().
ocgcore
.
timeLimit
*
(
float
)(
me
.
api_timeBar
.
width
),
1f
);
}
if
(
player
==
1
)
{
opponent
.
api_timeHint
.
text
=
t
.
ToString
()
+
"/"
+
Program
.
I
().
ocgcore
.
timeLimit
.
ToString
();
me
.
api_timeHint
.
text
=
"waiting"
;
UIHelper
.
clearITWeen
(
opponent
.
api_healthBar
.
gameObject
);
iTween
.
MoveToLocal
(
opponent
.
api_timeBar
.
gameObject
,
new
Vector3
((
float
)(
opponent
.
api_timeBar
.
width
)
-
(
float
)
t
/
(
float
)
Program
.
I
().
ocgcore
.
timeLimit
*
(
float
)(
opponent
.
api_timeBar
.
width
),
opponent
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
y
,
opponent
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
z
),
1f
);
// 停止之前的动画并开始新动画
opponent
.
api_timeBar
.
transform
.
DOKill
();
opponent
.
api_timeBar
.
transform
.
DOLocalMoveX
((
float
)(
opponent
.
api_timeBar
.
width
)
-
(
float
)
t
/
(
float
)
Program
.
I
().
ocgcore
.
timeLimit
*
(
float
)(
opponent
.
api_timeBar
.
width
),
1f
);
}
}
public
void
realize
()
{
me
.
api_healthHint
.
text
=
((
float
)
Program
.
I
().
ocgcore
.
life_0
>
0
?
Program
.
I
().
ocgcore
.
life_0
:
0
).
ToString
();
...
...
@@ -377,20 +385,22 @@ public class gameInfo : MonoBehaviour
opponent
.
api_name
.
text
=
Program
.
I
().
ocgcore
.
name_1_c
;
me
.
api_face
.
mainTexture
=
UIHelper
.
getFace
(
Program
.
I
().
ocgcore
.
name_0_c
);
opponent
.
api_face
.
mainTexture
=
UIHelper
.
getFace
(
Program
.
I
().
ocgcore
.
name_1_c
);
iTween
.
MoveToLocal
(
me
.
api_healthBar
.
gameObject
,
new
Vector3
(
(
float
)(
me
.
api_healthBar
.
width
)
-
getRealLife
(
Program
.
I
().
ocgcore
.
life_0
)
/
((
float
)
Program
.
I
().
ocgcore
.
lpLimit
)
*
(
float
)(
me
.
api_healthBar
.
width
),
me
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
y
,
me
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
z
),
1f
);
iTween
.
MoveToLocal
(
opponent
.
api_healthBar
.
gameObject
,
new
Vector3
(
(
float
)(
opponent
.
api_healthBar
.
width
)
-
getRealLife
(
Program
.
I
().
ocgcore
.
life_1
)
/
((
float
)
Program
.
I
().
ocgcore
.
lpLimit
)
*
(
float
)(
opponent
.
api_healthBar
.
width
),
opponent
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
y
,
opponent
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
z
),
1f
);
// 玩家自己
me
.
api_healthBar
.
transform
.
DOKill
();
float
myLpTargetX
=
(
float
)(
me
.
api_healthBar
.
width
)
-
getRealLife
(
Program
.
I
().
ocgcore
.
life_0
)
/
((
float
)
Program
.
I
().
ocgcore
.
lpLimit
)
*
(
float
)(
me
.
api_healthBar
.
width
);
me
.
api_healthBar
.
transform
.
DOLocalMoveX
(
myLpTargetX
,
1f
);
// 对手
opponent
.
api_healthBar
.
transform
.
DOKill
();
float
opLpTargetX
=
(
float
)(
opponent
.
api_healthBar
.
width
)
-
getRealLife
(
Program
.
I
().
ocgcore
.
life_1
)
/
((
float
)
Program
.
I
().
ocgcore
.
lpLimit
)
*
(
float
)(
opponent
.
api_healthBar
.
width
);
opponent
.
api_healthBar
.
transform
.
DOLocalMoveX
(
opLpTargetX
,
1f
);
instance_lab
.
Clear
();
if
(
Program
.
I
().
ocgcore
.
confirmedCards
.
Count
>
0
)
if
(
Program
.
I
().
ocgcore
.
confirmedCards
.
Count
>
0
)
{
instance_lab
.
Add
(
GameStringHelper
.
yijingqueren
);
}
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
confirmedCards
)
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
confirmedCards
)
{
instance_lab
.
Add
(
item
);
}
...
...
@@ -417,7 +427,7 @@ public class gameInfo : MonoBehaviour
{
time
[
0
]--;
}
if
(
amIdanger
())
if
(
amIdanger
())
{
if
(
Program
.
I
().
ocgcore
!=
null
)
{
...
...
@@ -438,12 +448,12 @@ public class gameInfo : MonoBehaviour
public
enum
chainCondition
{
standard
,
no
,
all
,
smart
standard
,
no
,
all
,
smart
}
public
void
set_condition
(
chainCondition
c
)
{
switch
(
c
)
switch
(
c
)
{
case
chainCondition
.
standard
:
toggle_all
.
value
=
false
;
...
...
Assets/ArtSystem/mouseParticle/UIparticle.prefab
View file @
77b93c7e
...
...
@@ -3,9 +3,10 @@
---
!u!1
&102262
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
5
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
497540
}
m_Layer
:
17
...
...
@@ -15,17 +16,32 @@ GameObject:
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&497540
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
102262
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
152.4026
,
y
:
916.32385
,
z
:
820.7068
}
m_LocalScale
:
{
x
:
360
,
y
:
360
,
z
:
360
}
m_ConstrainProportionsScale
:
0
m_Children
:
-
{
fileID
:
462074
}
-
{
fileID
:
457572
}
m_Father
:
{
fileID
:
444030
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&104710
GameObject
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
5
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
457572
}
-
component
:
{
fileID
:
1537834
}
-
component
:
{
fileID
:
1280010
}
-
component
:
{
fileID
:
2656486
}
m_Layer
:
17
m_Name
:
tri
m_TagString
:
Untagged
...
...
@@ -33,12 +49,28 @@ GameObject:
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&457572
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
104710
}
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
:
497540
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&119794
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
5
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
488246
}
-
component
:
{
fileID
:
2091536
}
...
...
@@ -50,236 +82,38 @@ GameObject:
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&136044
GameObject
:
m_ObjectHideFlags
:
0
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
444030
}
-
component
:
{
fileID
:
11491940
}
-
component
:
{
fileID
:
11466520
}
-
component
:
{
fileID
:
5486994
}
-
component
:
{
fileID
:
11473836
}
m_Layer
:
10
m_Name
:
UIparticle
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!1
&177044
GameObject
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
5
m_Component
:
-
component
:
{
fileID
:
462074
}
-
component
:
{
fileID
:
1598580
}
-
component
:
{
fileID
:
1298152
}
-
component
:
{
fileID
:
2655262
}
m_Layer
:
17
m_Name
:
square
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&444030
Transform
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
136044
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
0.0027777778
,
y
:
0.0027777778
,
z
:
0.0027777778
}
m_Children
:
-
{
fileID
:
488246
}
-
{
fileID
:
497540
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&457572
Transform
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
104710
}
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_Children
:
[]
m_Father
:
{
fileID
:
497540
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&462074
Transform
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
177044
}
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_Children
:
[]
m_Father
:
{
fileID
:
497540
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&488246
Transform
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
119794
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
-700
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_ConstrainProportionsScale
:
0
m_Children
:
[]
m_Father
:
{
fileID
:
444030
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!4
&497540
Transform
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
102262
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
152.4026
,
y
:
916.32385
,
z
:
820.7068
}
m_LocalScale
:
{
x
:
360
,
y
:
360
,
z
:
360
}
m_Children
:
-
{
fileID
:
462074
}
-
{
fileID
:
457572
}
m_Father
:
{
fileID
:
444030
}
m_RootOrder
:
1
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!12
&1280010
ParticleAnimator
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
104710
}
Does Animate Color?
:
1
colorAnimation[0]
:
serializedVersion
:
2
rgba
:
4278190335
colorAnimation[1]
:
serializedVersion
:
2
rgba
:
4283957503
colorAnimation[2]
:
serializedVersion
:
2
rgba
:
4294967295
colorAnimation[3]
:
serializedVersion
:
2
rgba
:
3036668834
colorAnimation[4]
:
serializedVersion
:
2
rgba
:
184527434
worldRotationAxis
:
{
x
:
0
,
y
:
0
,
z
:
0
}
localRotationAxis
:
{
x
:
0
,
y
:
0
,
z
:
0
}
sizeGrow
:
3
rndForce
:
{
x
:
0
,
y
:
0
,
z
:
0
}
force
:
{
x
:
0
,
y
:
0
,
z
:
0
}
damping
:
0.03
stopSimulation
:
0
autodestruct
:
0
---
!u!12
&1298152
ParticleAnimator
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
177044
}
Does Animate Color?
:
1
colorAnimation[0]
:
serializedVersion
:
2
rgba
:
4284740095
colorAnimation[1]
:
serializedVersion
:
2
rgba
:
4290442495
colorAnimation[2]
:
serializedVersion
:
2
rgba
:
4294967295
colorAnimation[3]
:
serializedVersion
:
2
rgba
:
3036668834
colorAnimation[4]
:
serializedVersion
:
2
rgba
:
184527434
worldRotationAxis
:
{
x
:
0
,
y
:
0
,
z
:
0
}
localRotationAxis
:
{
x
:
0
,
y
:
0
,
z
:
0
}
sizeGrow
:
5
rndForce
:
{
x
:
0
,
y
:
0
,
z
:
0
}
force
:
{
x
:
0
,
y
:
0
,
z
:
0
}
damping
:
0.03
stopSimulation
:
0
autodestruct
:
0
---
!u!15
&1537834
EllipsoidParticleEmitter
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
104710
}
serializedVersion
:
2
m_Enabled
:
1
m_Emit
:
0
minSize
:
0.2
maxSize
:
0.3
minEnergy
:
0.6
maxEnergy
:
1
minEmission
:
20
maxEmission
:
20
worldVelocity
:
{
x
:
0
,
y
:
0
,
z
:
0
}
localVelocity
:
{
x
:
0
,
y
:
0
,
z
:
0
}
rndVelocity
:
{
x
:
3
,
y
:
3
,
z
:
3
}
emitterVelocityScale
:
0.05
tangentVelocity
:
{
x
:
0
,
y
:
0
,
z
:
0
}
angularVelocity
:
0
rndAngularVelocity
:
0
rndRotation
:
0
Simulate in Worldspace?
:
1
m_OneShot
:
0
m_Ellipsoid
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_MinEmitterRange
:
0
---
!u!15
&1598580
EllipsoidParticleEmitter
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
177044
}
serializedVersion
:
2
m_Enabled
:
1
m_Emit
:
0
minSize
:
0.2
maxSize
:
0.3
minEnergy
:
0.6
maxEnergy
:
1
minEmission
:
60
maxEmission
:
60
worldVelocity
:
{
x
:
0
,
y
:
0
,
z
:
0
}
localVelocity
:
{
x
:
0
,
y
:
0
,
z
:
0
}
rndVelocity
:
{
x
:
3
,
y
:
3
,
z
:
3
}
emitterVelocityScale
:
0.05
tangentVelocity
:
{
x
:
0
,
y
:
0
,
z
:
0
}
angularVelocity
:
0
rndAngularVelocity
:
0
rndRotation
:
0
Simulate in Worldspace?
:
1
m_OneShot
:
0
m_Ellipsoid
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_MinEmitterRange
:
0
---
!u!20
&2091536
Camera
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
119794
}
m_Enabled
:
1
serializedVersion
:
2
m_ClearFlags
:
3
m_BackGroundColor
:
{
r
:
0.5
,
g
:
0.5
,
b
:
0.5
,
a
:
1
}
m_projectionMatrixMode
:
1
m_GateFitMode
:
2
m_FOVAxisMode
:
0
m_SensorSize
:
{
x
:
36
,
y
:
24
}
m_LensShift
:
{
x
:
0
,
y
:
0
}
m_FocalLength
:
50
m_NormalizedViewPortRect
:
serializedVersion
:
2
x
:
0
...
...
@@ -306,114 +140,12 @@ Camera:
m_OcclusionCulling
:
1
m_StereoConvergence
:
10
m_StereoSeparation
:
0.022
---
!u!26
&2655262
ParticleRenderer
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
177044
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_Materials
:
-
{
fileID
:
2100000
,
guid
:
ce38205273cfc784fa4f516504226836
,
type
:
2
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
serializedVersion
:
2
m_CameraVelocityScale
:
0
m_StretchParticles
:
0
m_LengthScale
:
2
m_VelocityScale
:
0
m_MaxParticleSize
:
0.25
UV Animation
:
x Tile
:
1
y Tile
:
1
cycles
:
1
---
!u!26
&2656486
ParticleRenderer
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
104710
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_Materials
:
-
{
fileID
:
2100000
,
guid
:
724cd0370cbb68a4e8c7ad776fa66d98
,
type
:
2
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
serializedVersion
:
2
m_CameraVelocityScale
:
0
m_StretchParticles
:
0
m_LengthScale
:
2
m_VelocityScale
:
0
m_MaxParticleSize
:
0.25
UV Animation
:
x Tile
:
1
y Tile
:
1
cycles
:
1
---
!u!54
&5486994
Rigidbody
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
136044
}
serializedVersion
:
2
m_Mass
:
1
m_Drag
:
0
m_AngularDrag
:
0.05
m_UseGravity
:
0
m_IsKinematic
:
1
m_Interpolate
:
0
m_Constraints
:
0
m_CollisionDetection
:
0
---
!u!114
&11412860
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
119794
}
m_Enabled
:
1
m_EditorHideFlags
:
0
...
...
@@ -450,11 +182,70 @@ MonoBehaviour:
cancelKey0
:
27
cancelKey1
:
331
autoHideCursor
:
1
---
!u!1
&136044
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
444030
}
-
component
:
{
fileID
:
11491940
}
-
component
:
{
fileID
:
11466520
}
-
component
:
{
fileID
:
5486994
}
-
component
:
{
fileID
:
11473836
}
m_Layer
:
10
m_Name
:
UIparticle
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&444030
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
136044
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
0.0027777778
,
y
:
0.0027777778
,
z
:
0.0027777778
}
m_ConstrainProportionsScale
:
0
m_Children
:
-
{
fileID
:
488246
}
-
{
fileID
:
497540
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&11491940
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
136044
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
2c5ecb5660b11414fb042fb826e03b73
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
scalingStyle
:
1
manualWidth
:
1280
manualHeight
:
720
minimumHeight
:
320
maximumHeight
:
1536
fitWidth
:
0
fitHeight
:
1
adjustByDPI
:
0
shrinkPortraitUI
:
0
---
!u!114
&11466520
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
136044
}
m_Enabled
:
1
m_EditorHideFlags
:
0
...
...
@@ -495,11 +286,28 @@ MonoBehaviour:
mDepth
:
0
mSortingOrder
:
0
mClipOffset
:
{
x
:
0
,
y
:
0
}
---
!u!54
&5486994
Rigidbody
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
136044
}
serializedVersion
:
2
m_Mass
:
1
m_Drag
:
0
m_AngularDrag
:
0.05
m_UseGravity
:
0
m_IsKinematic
:
1
m_Interpolate
:
0
m_Constraints
:
0
m_CollisionDetection
:
0
---
!u!114
&11473836
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_PrefabParentObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
136044
}
m_Enabled
:
1
m_EditorHideFlags
:
0
...
...
@@ -508,34 +316,34 @@ MonoBehaviour:
m_EditorClassIdentifier
:
camera
:
{
fileID
:
2091536
}
trans
:
{
fileID
:
497540
}
---
!u!1
14
&11491940
MonoBehaviour
:
m_ObjectHideFlags
:
1
m_
PrefabParent
Object
:
{
fileID
:
0
}
m_PrefabIn
ternal
:
{
fileID
:
10010000
0
}
m_
GameObject
:
{
fileID
:
136044
}
m_Enabled
:
1
m_
EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
2c5ecb5660b11414fb042fb826e03b73
,
type
:
3
}
m_
Name
:
m_
EditorClassIdentifier
:
scalingStyle
:
1
m
anualWidth
:
1280
m
anualHeight
:
72
0
m
inimumHeight
:
32
0
m
aximumHeight
:
1536
fitWidth
:
0
fitHeight
:
1
adjustByDPI
:
0
shrinkPortraitUI
:
0
---
!u!1001
&100100000
Prefab
:
m_
ObjectHideFlags
:
1
serializedVersion
:
2
m_
Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
[]
m_RemovedComponents
:
[]
m_
ParentPrefab
:
{
fileID
:
0
}
m_Root
GameObject
:
{
fileID
:
136044
}
m_
IsPrefabParent
:
1
---
!u!1
&177044
GameObject
:
m_ObjectHideFlags
:
0
m_
CorrespondingSource
Object
:
{
fileID
:
0
}
m_PrefabIn
stance
:
{
fileID
:
0
}
m_
PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_
Component
:
-
component
:
{
fileID
:
462074
}
m_
Layer
:
17
m_
Name
:
square
m_TagString
:
Untagged
m
_Icon
:
{
fileID
:
0
}
m
_NavMeshLayer
:
0
m
_StaticEditorFlags
:
0
m
_IsActive
:
1
---
!u!4
&462074
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_
GameObject
:
{
fileID
:
177044
}
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
:
49754
0
}
m_Root
Order
:
0
m_
LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
Assets/ArtSystem/picShower/faceShower.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
public
class
faceShower
:
MonoBehaviour
{
void
Start
()
{
gameObject
.
transform
.
position
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
*
1.5f
,
0
));
iTween
.
MoveToAction
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
/
2
,
0
)),
0.6f
,()=>{
iTween
.
ScaleToAction
(
gameObject
,
Vector3
.
zero
,
0.6f
,
()
=>
{
Destroy
(
gameObject
);
},
1f
);
},
0
);
}
using
System.Collections
;
using
DG.Tweening
;
using
UnityEngine
;
public
class
faceShower
:
MonoBehaviour
{
void
Start
()
{
// 预先计算目标位置,使代码更清晰
Vector3
screenCenterWorldPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
/
2
,
0
));
// 设置初始位置(这一行与动画无关,保持不变)
gameObject
.
transform
.
position
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
*
1.5f
,
0
));
// 使用 DOTween 的 Sequence 来创建一个动画链
Sequence
mySequence
=
DOTween
.
Sequence
();
// 1. 第一个动画:移动到屏幕中心,耗时 0.6 秒
mySequence
.
Append
(
transform
.
DOMove
(
screenCenterWorldPos
,
0.6f
));
// 2. 插入一个 1 秒的延迟
mySequence
.
AppendInterval
(
1f
);
// 3. 第二个动画:缩小到0,耗时 0.6 秒
mySequence
.
Append
(
transform
.
DOScale
(
Vector3
.
zero
,
0.6f
));
// 4. 设置整个序列完成后的回调:销毁游戏对象
// OnComplete 在序列所有动画和延迟都执行完毕后触发
mySequence
.
OnComplete
(()
=>
{
Destroy
(
gameObject
);
});
}
}
Assets/ArtSystem/picShower/handShower.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
public
class
handShower
:
MonoBehaviour
{
...
...
@@ -17,14 +19,35 @@ public class handShower : MonoBehaviour
pics
[
2
]
=
GameTextureManager
.
get
(
"bu"
);
texture_0
.
mainTexture
=
pics
[
me
];
texture_1
.
mainTexture
=
pics
[
op
];
GameObject_0
.
transform
.
position
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
-
Screen
.
height
*
1.5f
,
0
));
iTween
.
MoveToAction
(
GameObject_0
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
/
2
-
80
,
0
)),
1f
,
()
=>
{
Destroy
(
GameObject_0
,
0.3f
);
},
0
);
GameObject_1
.
transform
.
position
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
*
1.5f
,
0
));
iTween
.
MoveToAction
(
GameObject_1
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
/
2
+
80
,
0
)),
1f
,
()
=>
{
Destroy
(
GameObject_1
,
0.3f
);
},
0
);
// --- 核心修改:使用本地坐标和 DOLocalMove ---
// 1. 设置初始位置 (在屏幕外)
// NGUI的坐标系通常中心是(0,0),单位接近像素。
// 我们把它们放在屏幕的上下方很远的地方。
GameObject_0
.
transform
.
localPosition
=
new
Vector3
(
0
,
-
1000
,
0
);
// 从下方来
GameObject_1
.
transform
.
localPosition
=
new
Vector3
(
0
,
1000
,
0
);
// 从上方来
// 2. 定义目标本地坐标
// 不再需要复杂的ScreenToWorldPoint!直接使用像素偏移值。
Vector3
targetPos0
=
new
Vector3
(
0
,
-
150
,
0
);
// 停在中心点下方150像素
Vector3
targetPos1
=
new
Vector3
(
0
,
150
,
0
);
// 停在中心点上方150像素
// 注意:我将80改成了150,因为80的间距可能太小,你可以根据效果调整。
// 3. 执行动画
// 使用 DOLocalMove 而不是 DOMove
GameObject_0
.
transform
.
DOLocalMove
(
targetPos0
,
1f
).
SetEase
(
Ease
.
OutCubic
).
OnComplete
(()
=>
{
// 添加一个空值检查,这是一个好习惯
if
(
GameObject_0
!=
null
)
{
Destroy
(
GameObject_0
,
0.3f
);
}
});
GameObject_1
.
transform
.
DOLocalMove
(
targetPos1
,
1f
).
SetEase
(
Ease
.
OutCubic
).
OnComplete
(()
=>
{
if
(
GameObject_1
!=
null
)
{
Destroy
(
GameObject_1
,
0.3f
);
}
});
}
}
Assets/ArtSystem/superButton/toolBars/mats/toolShift.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
public
class
toolShift
:
MonoBehaviour
{
public
GameObject
ObjectMust
=
null
;
...
...
@@ -40,32 +42,31 @@ public class toolShift : MonoBehaviour {
}
public
void
shift
()
{
// 获取当前对象的本地坐标
Vector3
va
=
ObjectMust
.
transform
.
localPosition
;
const
float
duration
=
0.6f
;
if
(
ObjectOption
==
null
)
{
// 目标Y坐标,根据当前位置在 0 和 -100 之间切换
float
targetY
=
(
va
.
y
>=
0
)
?
-
100f
:
0f
;
// 使用 DOTween 的 DOLocalMoveY,因为它只改变Y轴,意图更明确且性能稍好
ObjectMust
.
transform
.
DOLocalMoveY
(
targetY
,
duration
);
}
else
{
Vector3
va
=
ObjectMust
.
transform
.
localPosition
;
if
(
ObjectOption
==
null
)
Vector3
vb
=
ObjectOption
.
transform
.
localPosition
;
if
(
va
.
y
>
vb
.
y
)
{
if
(
va
.
y
>=
0
)
{
iTween
.
MoveToLocal
(
ObjectMust
,
new
Vector3
(
va
.
x
,
-
100
,
va
.
z
),
0.6f
);
}
else
{
iTween
.
MoveToLocal
(
ObjectMust
,
new
Vector3
(
va
.
x
,
0
,
va
.
z
),
0.6f
);
}
ObjectMust
.
transform
.
DOLocalMoveY
(-
100f
,
duration
);
ObjectOption
.
transform
.
DOLocalMoveY
(
0f
,
duration
);
}
else
{
Vector3
vb
=
ObjectOption
.
transform
.
localPosition
;
if
(
va
.
y
>
vb
.
y
)
{
iTween
.
MoveToLocal
(
ObjectMust
,
new
Vector3
(
va
.
x
,
-
100
,
va
.
z
),
0.6f
);
iTween
.
MoveToLocal
(
ObjectOption
,
new
Vector3
(
vb
.
x
,
0
,
vb
.
z
),
0.6f
);
}
else
{
iTween
.
MoveToLocal
(
ObjectMust
,
new
Vector3
(
va
.
x
,
0
,
va
.
z
),
0.6f
);
iTween
.
MoveToLocal
(
ObjectOption
,
new
Vector3
(
vb
.
x
,
-
100
,
vb
.
z
),
0.6f
);
}
ObjectMust
.
transform
.
DOLocalMoveY
(
0f
,
duration
);
ObjectOption
.
transform
.
DOLocalMoveY
(-
100f
,
duration
);
}
}
}
}
Assets/SibylSystem/CardDescription/CardDescription.cs
View file @
77b93c7e
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
DG.Tweening
;
public
class
CardDescription
:
Servant
{
...
...
@@ -100,13 +101,14 @@ public class CardDescription : Servant
if
(
gameObject
!=
null
)
{
underSprite
.
height
=
Screen
.
height
+
4
;
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
Screen
.
height
/
2
,
0
)
),
1.2f
// 计算目标世界坐标
Vector3
hidePosition
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(-
underSprite
.
width
-
20
,
Screen
.
height
/
2
,
0
)
);
// 使用 DOTween 的 DOMove 方法,并添加一个缓动效果使动画更平滑
gameObject
.
transform
.
DOMove
(
hidePosition
,
1.2f
).
SetEase
(
Ease
.
OutCubic
);
setTitle
(
""
);
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
false
;
}
...
...
@@ -124,13 +126,13 @@ public class CardDescription : Servant
offset
=
66
;
}
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
offset
,
Screen
.
height
/
2
,
0
)
),
1.2f
// 计算目标世界坐标
Vector3
showPosition
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
offset
,
Screen
.
height
/
2
,
0
)
);
// 执行显示动画
gameObject
.
transform
.
DOMove
(
showPosition
,
1.2f
).
SetEase
(
Ease
.
OutCubic
);
resizer
.
gameObject
.
GetComponent
<
BoxCollider
>().
enabled
=
true
;
}
}
...
...
Assets/SibylSystem/MonoHelpers/TextMaster.cs
View file @
77b93c7e
using
System
;
using
UnityEngine
;
using
DG.Tweening
;
public
class
TextMaster
{
...
...
@@ -18,8 +20,10 @@ public class TextMaster
Program
.
ui_main_3d
,
false
);
UIHelper
.
clearITWeen
(
gameObject
);
iTween
.
ScaleTo
(
gameObject
,
new
Vector3
(
0.03f
,
0.03f
,
0.03f
),
0.6f
);
gameObject
.
transform
.
DOKill
();
gameObject
.
transform
.
DOScale
(
new
Vector3
(
0.03f
,
0.03f
,
0.03f
),
0.6f
);
}
else
{
...
...
Assets/SibylSystem/MonoHelpers/UIHelper.cs
View file @
77b93c7e
...
...
@@ -2,8 +2,8 @@
using
System.Collections
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text
;
using
System.Runtime.InteropServices
;
using
System.Text
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
...
...
@@ -21,7 +21,7 @@ public static class UIHelper
[
DllImport
(
"user32"
)]
static
extern
uint
GetWindowThreadProcessId
(
IntPtr
hWnd
,
ref
IntPtr
lpdwProcessId
);
[
DllImport
(
"user32"
)]
static
extern
int
GetClassNameW
(
IntPtr
hWnd
,
[
MarshalAs
(
UnmanagedType
.
LPWStr
)]
StringBuilder
lpString
,
int
nMaxCount
);
static
extern
int
GetClassNameW
(
IntPtr
hWnd
,
[
MarshalAs
(
UnmanagedType
.
LPWStr
)]
StringBuilder
lpString
,
int
nMaxCount
);
[
DllImport
(
"user32"
)]
static
extern
bool
IsZoomed
(
IntPtr
hWnd
);
[
DllImport
(
"user32"
)]
...
...
@@ -46,7 +46,7 @@ public static class UIHelper
StringBuilder
ClassName
=
new
StringBuilder
(
256
);
GetClassNameW
(
hwnd
,
ClassName
,
ClassName
.
Capacity
);
if
(
string
.
Compare
(
ClassName
.
ToString
(),
"UnityWndClass"
,
true
,
System
.
Globalization
.
CultureInfo
.
InvariantCulture
)
==
0
)
{
GetWindowThreadProcessId
(
hwnd
,
ref
id
);
...
...
@@ -697,15 +697,6 @@ public static class UIHelper
return
return_value
;
}
internal
static
void
clearITWeen
(
GameObject
gameObject
)
{
iTween
[]
iTweens
=
gameObject
.
GetComponents
<
iTween
>();
for
(
int
i
=
0
;
i
<
iTweens
.
Length
;
i
++)
{
MonoBehaviour
.
DestroyImmediate
(
iTweens
[
i
]);
}
}
internal
static
float
get_left_right_index
(
float
left
,
float
right
,
int
i
,
int
count
)
{
float
return_value
=
0
;
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameButton.cs
View file @
77b93c7e
using
System
;
using
UnityEngine
;
using
DG.Tweening
;
public
class
gameButton
:
OCGobject
{
...
...
@@ -36,7 +37,9 @@ public class gameButton : OCGobject
gameObject
.
GetComponent
<
iconSetForButton
>().
setTexture
(
type
);
gameObject
.
GetComponent
<
iconSetForButton
>().
setText
(
hint
);
gameObject
.
transform
.
localScale
=
Vector3
.
zero
;
iTween
.
ScaleTo
(
gameObject
,
new
Vector3
(
0.7f
*
(
float
)
Screen
.
height
/
700f
,
0.7f
*
(
float
)
Screen
.
height
/
700f
,
0.7f
*
(
float
)
Screen
.
height
/
700f
),
0.2f
);
float
targetScale
=
0.7f
*
(
float
)
Screen
.
height
/
700f
;
gameObject
.
transform
.
DOScale
(
targetScale
,
0.2f
);
}
gameObject
.
transform
.
position
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
v
);
}
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameCard.cs
View file @
77b93c7e
...
...
@@ -2,9 +2,9 @@
using
System.Collections
;
using
System.Collections.Generic
;
using
System.IO
;
using
DG.Tweening
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
DG.Tweening
;
public
enum
gameCardCondition
...
...
@@ -167,7 +167,7 @@ public class gameCard : OCGobject
{
set_overlay_light
(
0
);
clearCookie
();
UIHelper
.
clearITWeen
(
gameObject
);
gameObject
.
transform
.
DOKill
(
);
del_all_decoration
();
for
(
int
i
=
0
;
i
<
allObjects
.
Count
;
i
++)
{
...
...
@@ -566,29 +566,6 @@ public class gameCard : OCGobject
}
}
//float deltaTimeCloseUp=0;
//private void ES_excited_handler_close_up_handler()
//{
// float faT = 0.25f;
// deltaTimeCloseUp += Time.deltaTime;
// if (deltaTimeCloseUp > faT)
// {
// deltaTimeCloseUp = faT;
// }
// Vector3 screenposition = Program.camera_game_main.WorldToScreenPoint(accurate_position);
// Vector3 worldposition = Camera.main.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y, screenposition.z - 10));
// gameObject.transform.position = new Vector3
// (
// iTween.easeOutQuad(accurate_position.x, worldposition.x, deltaTimeCloseUp / faT),
// iTween.easeOutQuad(accurate_position.y, worldposition.y, deltaTimeCloseUp / faT),
// iTween.easeOutQuad(accurate_position.z, worldposition.z, deltaTimeCloseUp / faT)
// );
// if (game_object_verticle_drawing != null)
// {
// card_verticle_drawing_handler();
// }
//}
private
void
ES_excited_handler_close_up_handler
()
{
Vector3
screenposition
=
Program
.
camera_game_main
.
WorldToScreenPoint
(
accurate_position
);
...
...
@@ -715,14 +692,10 @@ public class gameCard : OCGobject
private
void
ES_enter_excited
()
{
// iTween[] iTweens = gameObject.GetComponents<iTween>();
// for (int i = 0; i < iTweens.Length; i++)
// MonoBehaviour.DestroyImmediate(iTweens[i]);
DOTween
.
Kill
(
gameObject
.
transform
);
if
(
condition
==
gameCardCondition
.
floating_clickable
)
{
flash_line_on
();
// iTween.RotateTo(gameObject, new Vector3(-30, 0, 0), 0.3f);
gameObject
.
transform
.
DORotate
(
new
Vector3
(-
30
,
0
,
0
),
0.3f
);
}
ES_excited_unsafe_should_not_be_changed_dont_touch_this
=
true
;
...
...
@@ -776,7 +749,6 @@ public class gameCard : OCGobject
// iTween[] iTweens = gameObject.GetComponents<iTween>();
// for (int i = 0; i < iTweens.Length; i++)
// MonoBehaviour.DestroyImmediate(iTweens[i]);
DOTween
.
Kill
(
gameObject
.
transform
);
flash_line_off
();
ES_excited_unsafe_should_not_be_changed_dont_touch_this
=
false
;
for
(
int
i
=
0
;
i
<
buttons
.
Count
;
i
++)
...
...
@@ -802,20 +774,6 @@ public class gameCard : OCGobject
TweenTo
(
accurate_position
,
accurate_rotation
);
}
private
void
ES_safe_card_move
(
Hashtable
move_hash
,
Hashtable
rotate_hash
)
{
UIHelper
.
clearITWeen
(
gameObject
);
MonoBehaviour
.
DestroyImmediate
(
gameObject
.
GetComponent
<
screenFader
>());
if
(
Math
.
Abs
((
int
)(
gameObject
.
transform
.
eulerAngles
.
z
))
==
180
)
{
Vector3
p
=
gameObject
.
transform
.
eulerAngles
;
p
.
z
=
179f
;
gameObject
.
transform
.
eulerAngles
=
p
;
}
iTween
.
MoveTo
(
gameObject
,
move_hash
);
iTween
.
RotateTo
(
gameObject
,
rotate_hash
);
}
#
endregion
#
region
UA_system
...
...
@@ -854,7 +812,7 @@ public class gameCard : OCGobject
UA_reloadCardHintPosition
();
if
(
rush
)
{
UIHelper
.
clearITWeen
(
gameObject
);
gameObject
.
transform
.
DOKill
(
);
gameObject
.
transform
.
position
=
gived_position
;
gameObject
.
transform
.
eulerAngles
=
gived_rotation
;
}
...
...
@@ -876,99 +834,6 @@ public class gameCard : OCGobject
}
}
// public void TweenTo(Vector3 pos, Vector3 rot, bool exciting = false)
// {
// float time = 0.1f;
// time += Vector3.Distance(pos, gameObject.transform.position) * 0.2f / 30f;
// if (time < 0.1f)
// {
// time = 0.1f;
// }
// if (time > 0.3f)
// {
// time = 0.3f;
// }
// //time *= 20;
// iTween.EaseType e = iTween.EaseType.easeOutQuad;
// if (
// Vector3.Distance(Vector3.zero, pos)
// < Vector3.Distance(Vector3.zero, gameObject.transform.position)
// )
// {
// e = iTween.EaseType.easeInQuad;
// }
// if (
// (
// (
// Math.Abs(gived_rotation.x) < 10
// && Vector3.Distance(pos, gameObject.transform.position) > 1f
// )
// )
// || (
// accurate_position.x == pos.x
// && accurate_position.y < pos.y
// && accurate_position.z == pos.z
// )
// )
// {
// Vector3 from = gameObject.transform.position;
// Vector3 to = pos;
// Vector3[] path = new Vector3[30];
// for (int i = 0; i < 30; i++)
// {
// path[i] =
// from
// + (to - from) * (float)i / 29f
// + (new Vector3(0, 1.5f, 0)) * (float)Math.Sin(3.1415926 * (double)i / 29d);
// }
// if (exciting)
// {
// ES_safe_card_move(
// iTween.Hash("x", pos.x, "y", pos.y, "z", pos.z, "path", path, "time", time),
// iTween.Hash("x", rot.x, "y", rot.y, "z", rot.z, "time", time)
// );
// }
// else
// {
// ES_safe_card_move(
// iTween.Hash(
// "x",
// pos.x,
// "y",
// pos.y,
// "z",
// pos.z,
// "path",
// path,
// "time",
// time,
// "easetype",
// e
// ),
// iTween.Hash("x", rot.x, "y", rot.y, "z", rot.z, "time", time, "easetype", e)
// );
// }
// }
// else
// {
// if (exciting)
// {
// ES_safe_card_move(
// iTween.Hash("x", pos.x, "y", pos.y, "z", pos.z, "time", time),
// iTween.Hash("x", rot.x, "y", rot.y, "z", rot.z, "time", time)
// );
// }
// else
// {
// ES_safe_card_move(
// iTween.Hash("x", pos.x, "y", pos.y, "z", pos.z, "time", time, "easetype", e),
// iTween.Hash("x", rot.x, "y", rot.y, "z", rot.z, "time", time, "easetype", e)
// );
// }
// }
// }
public
void
TweenTo
(
Vector3
pos
,
Vector3
rot
,
bool
exciting
=
false
)
{
float
time
=
0.1f
;
...
...
@@ -1987,6 +1852,40 @@ public class gameCard : OCGobject
#
region
publicTools
// public void show_number(int number, bool add = false)
// {
// if (add)
// {
// show_number(number_showing * 10 + number);
// return;
// }
// if (number == 0)
// {
// if (obj_number != null)
// {
// obj_number.transform.DOScale(Vector3.zero, 0.3f).OnComplete(() => destroy(obj_number));
// obj_number = null;
// }
// }
// else
// {
// if (obj_number != null && number_showing != number)
// {
// obj_number.transform.DOScale(Vector3.zero, 0.3f).OnComplete(() => destroy(obj_number));
// obj_number = null;
// }
// if (obj_number == null)
// {
// obj_number = create(Program.I().mod_ocgcore_card_number_shower);
// obj_number.transform.GetComponent<TMPro.TextMeshPro>().text = number.ToString();
// obj_number.transform.localScale = Vector3.zero;
// obj_number.transform.DOScale(new Vector3(1, 1, 1), 0.3f);
// obj_number.transform.DORotate(new Vector3(60, 0, 0), 0.3f);
// }
// }
// number_showing = number;
// }
public
void
show_number
(
int
number
,
bool
add
=
false
)
{
if
(
add
)
...
...
@@ -1994,32 +1893,59 @@ public class gameCard : OCGobject
show_number
(
number_showing
*
10
+
number
);
return
;
}
if
(
number
==
0
)
// 如果请求显示的数字和当前正在显示的数字相同,则无需任何操作。
if
(
number_showing
==
number
)
{
if
(
obj_number
!=
null
)
{
obj_number
.
transform
.
DOScale
(
Vector3
.
zero
,
0.3f
).
OnComplete
(()
=>
destroy
(
obj_number
));
obj_number
=
null
;
}
return
;
}
else
// --- 处理旧数字对象的退场 ---
if
(
obj_number
!=
null
)
{
if
(
obj_number
!=
null
&&
number_showing
!=
number
)
{
obj_number
.
transform
.
DOScale
(
Vector3
.
zero
,
0.3f
).
OnComplete
(()
=>
destroy
(
obj_number
));
obj_number
=
null
;
}
// 捕获对旧对象的引用,以便在动画回调中使用
GameObject
numberObjectToDestroy
=
obj_number
;
if
(
obj_number
==
null
)
{
obj_number
=
create
(
Program
.
I
().
mod_ocgcore_card_number_shower
);
obj_number
.
transform
.
GetComponent
<
TMPro
.
TextMeshPro
>().
text
=
number
.
ToString
();
obj_number
.
transform
.
localScale
=
Vector3
.
zero
;
obj_number
.
transform
.
DOScale
(
new
Vector3
(
1
,
1
,
1
),
0.3f
);
obj_number
.
transform
.
DORotate
(
new
Vector3
(
60
,
0
,
0
),
0.3f
);
}
// 停止该对象上所有正在运行的DOTween动画,防止冲突
DOTween
.
Kill
(
numberObjectToDestroy
.
transform
);
// 启动缩小动画,并在动画完成后销毁对象
numberObjectToDestroy
.
transform
.
DOScale
(
Vector3
.
zero
,
0.3f
)
.
SetEase
(
Ease
.
InBack
)
// 使用一个更自然的缓动效果
.
OnComplete
(()
=>
{
// 只有当这个即将销毁的对象还是当前卡片引用的对象时,才将引用置空。
// 这是一个安全检查,防止销毁了新创建的对象。
if
(
this
.
obj_number
==
numberObjectToDestroy
)
{
this
.
obj_number
=
null
;
}
destroy
(
numberObjectToDestroy
);
});
}
// --- 处理新数字对象的进场 ---
number_showing
=
number
;
if
(
number
>
0
)
{
// 创建新的数字对象。这会覆盖掉this.obj_number的引用,
// 旧对象的动画和销毁过程不会受影响。
obj_number
=
create
(
Program
.
I
().
mod_ocgcore_card_number_shower
);
obj_number
.
transform
.
GetComponent
<
TMPro
.
TextMeshPro
>().
text
=
number
.
ToString
();
// 从零大小开始放大,创建更流畅的出现效果
obj_number
.
transform
.
localScale
=
Vector3
.
zero
;
// 启动放大和旋转动画
obj_number
.
transform
.
DOScale
(
new
Vector3
(
1
,
1
,
1
),
0.3f
).
SetEase
(
Ease
.
OutBack
);
obj_number
.
transform
.
DORotate
(
new
Vector3
(
60
,
0
,
0
),
0.3f
);
}
else
// 如果 number <= 0,意味着我们只是想隐藏数字
{
// 我们已经在上面启动了旧对象的销毁动画,现在只需将主引用置空。
obj_number
=
null
;
}
}
...
...
@@ -2441,148 +2367,6 @@ public class gameCard : OCGobject
animation_confirm_common
(
null
,
rotation
,
time_move
,
time_still
,
true
);
}
// public void animation_confirm(
// Vector3 position,
// Vector3 rotation,
// float time_move,
// float time_still
// )
// {
// ES_lock(time_move + time_move + time_still);
// confirm_step_time_still = time_still;
// confirm_step_time_move = time_move;
// confirm_step_r = rotation;
// iTween[] iTweens = gameObject.GetComponents<iTween>();
// for (int i = 0; i < iTweens.Length; i++)
// MonoBehaviour.Destroy(iTweens[i]);
// iTween.MoveTo(
// gameObject,
// iTween.Hash(
// "x",
// position.x,
// "y",
// position.y,
// "z",
// position.z,
// "onupdate",
// (Action)RefreshFunction_decoration,
// "oncomplete",
// (Action)confirm_step_2,
// "time",
// confirm_step_time_move
// )
// );
// iTween.RotateTo(
// gameObject,
// iTween.Hash(
// "x",
// confirm_step_r.x,
// "y",
// confirm_step_r.y,
// "z",
// confirm_step_r.z,
// "time",
// confirm_step_time_move
// )
// );
// }
// public void animation_confirm_screenCenter(Vector3 rotation, float time_move, float time_still)
// {
// ES_lock(time_move + time_move + time_still);
// confirm_step_time_still = time_still;
// confirm_step_time_move = time_move;
// confirm_step_r = rotation;
// iTween[] iTweens = gameObject.GetComponents<iTween>();
// for (int i = 0; i < iTweens.Length; i++)
// MonoBehaviour.DestroyImmediate(iTweens[i]);
// iTween.RotateTo(
// gameObject,
// iTween.Hash(
// "x",
// confirm_step_r.x,
// "y",
// confirm_step_r.y,
// "z",
// confirm_step_r.z,
// "easetype",
// iTween.EaseType.spring,
// "onupdate",
// (Action)RefreshFunction_decoration,
// "oncomplete",
// (Action)confirm_step_2,
// "time",
// confirm_step_time_move
// )
// );
// var ttt = gameObject.AddComponent<screenFader>();
// ttt.from = gameObject.transform.position;
// ttt.time = time_move;
// ttt.deltaTimeCloseUp = 0;
// MonoBehaviour.Destroy(ttt, time_move + time_still);
// }
Vector3
confirm_step_r
=
Vector3
.
zero
;
float
confirm_step_time_still
=
0
;
float
confirm_step_time_move
=
0
;
void
confirm_step_2
()
{
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
confirm_step_r
.
x
,
"y"
,
confirm_step_r
.
y
,
"z"
,
confirm_step_r
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"oncomplete"
,
(
Action
)
confirm_step_3
,
"time"
,
confirm_step_time_still
)
);
}
void
confirm_step_3
()
{
iTween
.
RotateTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
accurate_rotation
.
x
,
"y"
,
accurate_rotation
.
y
,
"z"
,
accurate_rotation
.
z
,
"time"
,
confirm_step_time_move
)
);
iTween
.
MoveTo
(
gameObject
,
iTween
.
Hash
(
"x"
,
accurate_position
.
x
,
"y"
,
accurate_position
.
y
,
"z"
,
accurate_position
.
z
,
"onupdate"
,
(
Action
)
RefreshFunction_decoration
,
"time"
,
confirm_step_time_move
,
"easetype"
,
iTween
.
EaseType
.
easeInQuad
)
);
}
public
void
animation_shake_to
(
float
time
)
{
ES_lock
(
time
);
...
...
@@ -2599,10 +2383,13 @@ public class gameCard : OCGobject
DOTween
.
Kill
(
gameObject
.
transform
);
MonoBehaviour
.
DestroyImmediate
(
gameObject
.
GetComponent
<
screenFader
>());
gameObject
.
transform
.
DOMove
(
position
,
0.2f
);
gameObject
.
transform
.
DORotate
(
rotation
,
0.21f
)
.
OnUpdate
(
RefreshFunction_decoration
)
.
OnComplete
(
ES_safe_card_move_to_original_place
);
Sequence
rushSequence
=
DOTween
.
Sequence
();
rushSequence
.
SetTarget
(
gameObject
.
transform
);
rushSequence
.
Append
(
gameObject
.
transform
.
DOMove
(
position
,
0.2f
));
rushSequence
.
Join
(
gameObject
.
transform
.
DORotate
(
rotation
,
0.21f
));
rushSequence
.
OnUpdate
(
RefreshFunction_decoration
);
// OnComplete 现在是 Sequence 的一部分
rushSequence
.
OnComplete
(
ES_safe_card_move_to_original_place
);
}
...
...
@@ -2774,15 +2561,7 @@ public class gameCard : OCGobject
shower
.
mask
.
mainTexture
=
GameTextureManager
.
Mask
;
shower
.
disable
.
mainTexture
=
GameTextureManager
.
negated
;
shower
.
transform
.
localScale
=
Vector3
.
zero
;
// iTween.ScaleTo(
// shower.gameObject,
// iTween.Hash(
// "scale",
// new Vector3(Screen.height / 650f, Screen.height / 650f, Screen.height / 650f),
// "time",
// 0.5f
// )
// );
Vector3
targetScale
=
new
Vector3
(
Screen
.
height
/
650f
,
Screen
.
height
/
650f
,
Screen
.
height
/
650f
);
shower
.
transform
.
DOScale
(
targetScale
,
0.5f
);
Ocgcore
.
LRCgo
=
shower
.
gameObject
;
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameField.cs
View file @
77b93c7e
...
...
@@ -453,16 +453,12 @@ public class GameField : OCGobject
if
(
tex
!=
null
)
{
UIHelper
.
getByName
<
UITexture
>(
gameObject
,
"field_"
+
player
.
ToString
()).
mainTexture
=
tex
;
// UIHelper.clearITWeen(UIHelper.getByName(gameObject, "obj_" + player.ToString()));
// iTween.ScaleTo(UIHelper.getByName(gameObject, "obj_" + player.ToString()), new Vector3(1, 1, 1), 0.5f);
var
obj
=
UIHelper
.
getByName
(
gameObject
,
"obj_"
+
player
.
ToString
());
DOTween
.
Kill
(
obj
.
transform
);
obj
.
transform
.
DOScale
(
new
Vector3
(
1
,
1
,
1
),
0.5f
);
}
else
{
// UIHelper.clearITWeen(UIHelper.getByName(gameObject, "obj_" + player.ToString()));
// iTween.ScaleTo(UIHelper.getByName(gameObject, "obj_" + player.ToString()), new Vector3(0, 0, 0), 0.5f);
var
obj
=
UIHelper
.
getByName
(
gameObject
,
"obj_"
+
player
.
ToString
());
DOTween
.
Kill
(
obj
.
transform
);
obj
.
transform
.
DOScale
(
Vector3
.
zero
,
0.5f
);
...
...
@@ -470,8 +466,6 @@ public class GameField : OCGobject
}
else
{
// UIHelper.clearITWeen(UIHelper.getByName(gameObject, "obj_" + player.ToString()));
// iTween.ScaleTo(UIHelper.getByName(gameObject, "obj_" + player.ToString()), new Vector3(0, 0, 0), 0.5f);
var
obj
=
UIHelper
.
getByName
(
gameObject
,
"obj_"
+
player
.
ToString
());
DOTween
.
Kill
(
obj
.
transform
);
obj
.
transform
.
DOScale
(
Vector3
.
zero
,
0.5f
);
...
...
@@ -508,7 +502,6 @@ public class GameField : OCGobject
{
Program
.
I
().
mod_ocgcore_ss_dark_hole
.
transform
.
localScale
=
Vector3
.
zero
;
cookie_dark_hole
=
create
(
Program
.
I
().
mod_ocgcore_ss_dark_hole
,
v
);
// iTween.ScaleTo(cookie_dark_hole, new Vector3(6, 6, 6), 1f);
cookie_dark_hole
.
transform
.
DOScale
(
new
Vector3
(
6
,
6
,
6
),
1f
);
cookie_dark_hole
.
transform
.
eulerAngles
=
new
Vector3
(
90
,
0
,
0
);
}
...
...
@@ -517,20 +510,6 @@ public class GameField : OCGobject
{
if
(
cookie_dark_hole
!=
null
)
{
// iTween.ScaleTo(cookie_dark_hole, iTween.Hash(
// "delay", 1f,
// "x", 0,
// "y", 0,
// "z", 0,
// "time", 1f
// ));
// iTween.MoveTo(cookie_dark_hole, iTween.Hash(
// "delay", 1f,
// "position", v,
// "time", 1f
// ));
// destroy(cookie_dark_hole, 1.4f);
// 使用 DOTween 的序列来实现延迟和组合动画
Sequence
seq
=
DOTween
.
Sequence
();
seq
.
AppendInterval
(
1f
);
// 延迟1秒
seq
.
Append
(
cookie_dark_hole
.
transform
.
DOScale
(
Vector3
.
zero
,
1f
));
...
...
@@ -798,12 +777,6 @@ public class GameField : OCGobject
if
(
player
==
0
)
{
Program
.
I
().
ocgcore
.
Sleep
((
int
)(
60
*
(
float
)
amount
/
2500f
));
// iTween.ShakePosition(Program.camera_game_main.gameObject, iTween.Hash(
// "x", (float)amount / 1500f,
// "y", (float)amount / 1500f,
// "z", (float)amount / 1500f,
// "time", (float)amount / 2500f
// ));
float
duration
=
(
float
)
amount
/
2500f
;
float
strength
=
(
float
)
amount
/
1500f
;
...
...
Assets/SibylSystem/Ocgcore/OCGobjects/gameHiddenButton.cs
View file @
77b93c7e
using
System
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
public
class
gameHiddenButton
:
OCGobject
{
public
CardLocation
location
;
...
...
@@ -291,8 +291,6 @@ public class gameHiddenButton : OCGobject
qidian
+
((
float
)
index
/
(
float
)(
gezi
-
1
))
*
(
zhongdian
-
qidian
);
//iTween.MoveTo(Program.I().ocgcore.cards[i].gameObject, Camera.main.ScreenToWorldPoint(screen_vector_to_move), 0.5f);
//iTween.RotateTo(Program.I().ocgcore.cards[i].gameObject, new Vector3(-30, 0, 0), 0.1f);
Program
.
I
().
ocgcore
.
cards
[
i
].
TweenTo
(
Camera
.
main
.
ScreenToWorldPoint
(
screen_vector_to_move
),
new
Vector3
(-
30
,
0
,
0
),
true
);
}
}
...
...
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
77b93c7e
...
...
@@ -2,9 +2,9 @@
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
DG.Tweening
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
DG.Tweening
;
public
class
Ocgcore
:
ServantWithCardDescription
...
...
@@ -466,7 +466,6 @@ public class Ocgcore : ServantWithCardDescription
{
gameInfo
.
gameObject
.
transform
.
localPosition
=
new
Vector3
(
300
,
0
,
0
);
gameInfo
.
gameObject
.
SetActive
(
true
);
// iTween.MoveToLocal(gameInfo.gameObject, Vector3.zero, 0.6f);
gameInfo
.
gameObject
.
transform
.
DOLocalMove
(
Vector3
.
zero
,
0.6f
);
gameInfo
.
ini
();
UIHelper
.
getByName
<
UIToggle
>(
gameInfo
.
gameObject
,
"ignore_"
).
value
=
false
;
...
...
@@ -1261,24 +1260,24 @@ public class Ocgcore : ServantWithCardDescription
return
true
;
case
GameMessage
.
Attack
:
return
true
;
//case GameMessage.Attack:
// if (Program.I().setting.setting.Vbattle.value)
// {
// return true;
// }
// else
// {
// return false;
// }
//case GameMessage.Battle:
// if (Program.I().setting.setting.Vbattle.value)
// {
// return false;
// }
// else
// {
// return true;
// }
//case GameMessage.Attack:
// if (Program.I().setting.setting.Vbattle.value)
// {
// return true;
// }
// else
// {
// return false;
// }
//case GameMessage.Battle:
// if (Program.I().setting.setting.Vbattle.value)
// {
// return false;
// }
// else
// {
// return true;
// }
}
return
false
;
}
...
...
@@ -5804,22 +5803,11 @@ public class Ocgcore : ServantWithCardDescription
r
.
ReadByte
();
UIHelper
.
playSound
(
"explode"
,
0.4f
);
int
amount
=
(
int
)(
Mathf
.
Clamp
(
attackCard
.
get_data
().
Attack
,
0
,
3500
)
*
0.8f
);
// iTween.ShakePosition(
// Program.camera_game_main.gameObject,
// iTween.Hash(
// "x",
// (float)amount / 1500f,
// "y",
// (float)amount / 1500f,
// "z",
// (float)amount / 1500f,
// "time",
// (float)amount / 2500f
// )
// );
float
duration
=
(
float
)
amount
/
2500f
;
float
strength
=
(
float
)
amount
/
1500f
;
Program
.
camera_game_main
.
transform
.
DOShakePosition
(
duration
,
strength
);
VectorAttackCard
=
get_point_worldposition
(
gpsAttacker
);
if
(
attackedCard
==
null
||
gpsAttacked
.
location
==
0
)
{
...
...
@@ -5873,7 +5861,7 @@ public class Ocgcore : ServantWithCardDescription
case
GameMessage
.
ReleaseRelation
:
break
;
case
GameMessage
.
TossCoin
:
player
=
r
.
ReadByte
(
);
player
=
localPlayer
(
r
.
ReadByte
()
);
count
=
r
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
...
...
@@ -5897,19 +5885,17 @@ public class Ocgcore : ServantWithCardDescription
}
destroy
(
tempobj
,
7
);
}
if
(
data
==
0
)
{
RMSshow_none
(
InterString
.
Get
(
"硬币反面"
));
}
else
{
RMSshow_none
(
InterString
.
Get
(
"硬币正面"
));
}
// 1. 根据玩家选择格式模板
string
formatKey
=
(
player
==
0
)
?
"我方硬币结果:"
:
"对方硬币结果:"
;
// 2. 根据数据选择结果
string
resultKey
=
(
data
==
0
)
?
"反面"
:
"正面"
;
// 3. 组合并显示提示
RMSshow_none
(
$"
{
formatKey
}{
resultKey
}
"
);
}
Sleep
(
280
);
break
;
case
GameMessage
.
TossDice
:
player
=
r
.
ReadByte
(
);
player
=
localPlayer
(
r
.
ReadByte
()
);
count
=
r
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
...
...
@@ -5926,7 +5912,14 @@ public class Ocgcore : ServantWithCardDescription
tempobj
.
GetComponent
<
coiner
>().
todice
(
data
);
destroy
(
tempobj
,
7
);
}
RMSshow_none
(
InterString
.
Get
(
"骰子结果:[?]"
,
data
.
ToString
()));
if
(
player
==
0
)
{
RMSshow_none
(
$"我方骰子结果:
{
data
}
"
);
}
else
{
RMSshow_none
(
$"对方骰子结果:
{
data
}
"
);
}
}
Sleep
(
280
);
break
;
...
...
Assets/SibylSystem/Program.cs
View file @
77b93c7e
...
...
@@ -7,6 +7,7 @@ using System.Threading;
using
ICSharpCode.SharpZipLib.Core
;
using
ICSharpCode.SharpZipLib.Zip
;
using
UnityEngine
;
using
DG.Tweening
;
public
class
Program
:
MonoBehaviour
{
...
...
@@ -907,8 +908,10 @@ public class Program : MonoBehaviour
}
if
(
fade
==
true
)
{
// 先将初始缩放设为0
return_value
.
transform
.
localScale
=
Vector3
.
zero
;
iTween
.
ScaleToE
(
return_value
,
scale
,
0.3f
);
// 使用 DOTween 的 DOScale 方法,并添加一个更生动的 EaseType
return_value
.
transform
.
DOScale
(
scale
,
0.3f
).
SetEase
(
Ease
.
OutBack
);
}
return
return_value
;
}
...
...
@@ -921,7 +924,8 @@ public class Program : MonoBehaviour
{
if
(
fade
)
{
iTween
.
ScaleTo
(
obj
,
Vector3
.
zero
,
0.4f
);
// 使用 DOTween 执行缩放动画
obj
.
transform
.
DOScale
(
Vector3
.
zero
,
0.4f
);
MonoBehaviour
.
Destroy
(
obj
,
0.6f
);
}
else
...
...
@@ -943,21 +947,6 @@ public class Program : MonoBehaviour
}
}
//public static void shiftCameraPan(Camera camera, bool enabled)
//{
// cameraPaning = enabled;
// PanWithMouse panWithMouse = camera.gameObject.GetComponent<PanWithMouse>();
// if (panWithMouse == null)
// {
// panWithMouse = camera.gameObject.AddComponent<PanWithMouse>();
// }
// panWithMouse.enabled = enabled;
// if (enabled == false)
// {
// iTween.RotateTo(camera.gameObject, new Vector3(60, 0, 0), 0.6f);
// }
//}
public
static
void
reMoveCam
(
float
xINscreen
)
{
float
all
=
(
float
)
Screen
.
width
/
2f
;
...
...
Assets/SibylSystem/Servant.cs
View file @
77b93c7e
...
...
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using
System.IO
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
DG.Tweening
;
public
class
Servant
{
...
...
@@ -106,16 +108,14 @@ public class Servant
buttomToScreen
,
0
);
iTween
.
MoveTo
(
toolBar
,
Program
.
camera_back_ground_2d
.
ScreenToWorldPoint
(
vectorOfShowedBar_Screen
),
0.6f
);
toolBar
.
transform
.
localScale
=
new
Vector3
(
((
float
)
Screen
.
height
)
/
700f
,
((
float
)
Screen
.
height
)
/
700f
,
((
float
)
Screen
.
height
)
/
700f
);
Vector3
targetWorldPosition
=
Program
.
camera_back_ground_2d
.
ScreenToWorldPoint
(
vectorOfShowedBar_Screen
);
// 使用 DOTween 执行移动动画
toolBar
.
transform
.
DOMove
(
targetWorldPosition
,
0.6f
);
// 缩放操作与动画库无关,保持不变
float
scaleFactor
=
Screen
.
height
/
700f
;
toolBar
.
transform
.
localScale
=
new
Vector3
(
scaleFactor
,
scaleFactor
,
scaleFactor
);
var
items
=
toolBar
.
GetComponentsInChildren
<
toolShift
>();
for
(
int
i
=
0
;
i
<
items
.
Length
;
i
++)
{
...
...
@@ -124,21 +124,20 @@ public class Servant
}
}
public
void
hideBarOnly
()
public
void
hideBarOnly
()
{
if
(
toolBar
!=
null
)
{
Vector3
vectorOfHidedBar_Screen
=
new
Vector3
(
Screen
.
width
-
RightToScreen
,
-
100
,
0
);
iTween
.
MoveTo
(
toolBar
,
Program
.
camera_back_ground_2d
.
ScreenToWorldPoint
(
vectorOfHidedBar_Screen
),
0.6f
);
toolBar
.
transform
.
localScale
=
new
Vector3
(
((
float
)
Screen
.
height
)
/
700f
,
((
float
)
Screen
.
height
)
/
700f
,
((
float
)
Screen
.
height
)
/
700f
);
Vector3
targetWorldPosition
=
Program
.
camera_back_ground_2d
.
ScreenToWorldPoint
(
vectorOfHidedBar_Screen
);
// 使用 DOTween 执行移动动画
toolBar
.
transform
.
DOMove
(
targetWorldPosition
,
0.6f
);
// 缩放操作与动画库无关,保持不变
float
scaleFactor
=
Screen
.
height
/
700f
;
toolBar
.
transform
.
localScale
=
new
Vector3
(
scaleFactor
,
scaleFactor
,
scaleFactor
);
var
items
=
toolBar
.
GetComponentsInChildren
<
toolShift
>();
for
(
int
i
=
0
;
i
<
items
.
Length
;
i
++)
{
...
...
Assets/SibylSystem/WindowServant2D.cs
View file @
77b93c7e
using
System
;
using
DG.Tweening
;
using
UnityEngine
;
public
class
WindowServant2D
:
Servant
{
public
override
void
applyHideArrangement
()
{
if
(
gameObject
!=
null
)
{
UIHelper
.
clearITWeen
(
gameObject
);
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
*
1.5f
,
0
)),
0.6f
);
gameObject
.
transform
.
DOKill
();
Vector3
hidePosition
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
*
1.5f
,
0
));
gameObject
.
transform
.
DOMove
(
hidePosition
,
0.6f
);
}
resize
();
}
public
override
void
applyShowArrangement
()
{
if
(
gameObject
!=
null
)
{
UIHelper
.
clearITWeen
(
gameObject
);
iTween
.
MoveTo
(
gameObject
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
/
2
,
0
)),
0.6f
);
gameObject
.
transform
.
DOKill
();
Vector3
showPosition
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
/
2
,
Screen
.
height
/
2
,
0
));
gameObject
.
transform
.
DOMove
(
showPosition
,
0.6f
);
}
resize
();
}
void
resize
()
{
if
(
gameObject
!=
null
)
...
...
Assets/SibylSystem/deckManager/DeckManager.cs
View file @
77b93c7e
...
...
@@ -4,6 +4,8 @@ using System.IO;
using
System.Text
;
using
UnityEngine
;
using
YGOSharp.OCGWrapper.Enums
;
using
DG.Tweening
;
public
class
DeckManager
:
ServantWithCardDescription
{
...
...
@@ -185,13 +187,10 @@ public class DeckManager : ServantWithCardDescription
{
base
.
applyHideArrangement
();
Program
.
cameraFacing
=
false
;
iTween
.
MoveTo
(
gameObjectSearch
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
+
600
,
Screen
.
height
/
2
,
600
)
),
0.6f
);
Vector3
targetPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
+
600
,
Screen
.
height
/
2
,
600
)
);
gameObjectSearch
.
transform
.
DOMove
(
targetPos
,
0.6f
);
refreshDetail
();
}
...
...
@@ -201,13 +200,10 @@ public class DeckManager : ServantWithCardDescription
Program
.
cameraFacing
=
true
;
UITexture
tex
=
UIHelper
.
getByName
<
UITexture
>(
gameObjectSearch
,
"under_"
);
tex
.
height
=
Screen
.
height
;
iTween
.
MoveTo
(
gameObjectSearch
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
MAIN_PANEL_MARGIN_RIGHT
,
Screen
.
height
/
2
,
0
)
),
0.6f
);
Vector3
targetPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
MAIN_PANEL_MARGIN_RIGHT
,
Screen
.
height
/
2
,
0
)
);
gameObjectSearch
.
transform
.
DOMove
(
targetPos
,
0.6f
);
refreshDetail
();
}
...
...
@@ -405,7 +401,7 @@ public class DeckManager : ServantWithCardDescription
{
try
{
UIHelper
.
clearITWeen
(
item
.
gameObject
);
item
.
gameObject
.
transform
.
DOKill
(
);
var
rid
=
item
.
gameObject
.
GetComponent
<
Rigidbody
>();
if
(
rid
==
null
)
{
...
...
@@ -517,20 +513,19 @@ public class DeckManager : ServantWithCardDescription
if
(
detailShowed
)
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
700
;
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
MAIN_SEARCH_PANEL_WIDTH
-
DETAILED_SEARCH_PANEL_WIDTH
-
115f
*
Screen
.
height
/
700f
,
Screen
.
height
*
0.5f
,
0
)
),
0.6f
Vector3
targetPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
MAIN_SEARCH_PANEL_WIDTH
-
DETAILED_SEARCH_PANEL_WIDTH
-
115f
*
Screen
.
height
/
700f
,
Screen
.
height
*
0.5f
,
0
)
);
gameObjectDetailedSearch
.
transform
.
DOMove
(
targetPos
,
0.6f
);
reShowBar
(
0
,
MAIN_SEARCH_PANEL_WIDTH
...
...
@@ -540,20 +535,19 @@ public class DeckManager : ServantWithCardDescription
else
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
700
;
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
MAIN_SEARCH_PANEL_WIDTH
-
DETAILED_SEARCH_PANEL_WIDTH
-
115f
*
Screen
.
height
/
700f
,
Screen
.
height
*
1.5f
,
0
)
),
0.6f
Vector3
targetPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
MAIN_SEARCH_PANEL_WIDTH
-
DETAILED_SEARCH_PANEL_WIDTH
-
115f
*
Screen
.
height
/
700f
,
Screen
.
height
*
1.5f
,
0
)
);
gameObjectDetailedSearch
.
transform
.
DOMove
(
targetPos
,
0.6f
);
reShowBar
(
0
,
CAMERA_MARGIN_RIGHT_NORMAL
);
}
}
...
...
@@ -563,37 +557,29 @@ public class DeckManager : ServantWithCardDescription
if
(
detailShowed
)
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Screen
.
height
;
// [修改] 使用常量替换硬编码的 575f
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
COMBINED_PANEL_WIDTH
,
Screen
.
height
*
0.5f
,
0
)
),
0.6f
Vector3
targetPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
COMBINED_PANEL_WIDTH
,
Screen
.
height
*
0.5f
,
0
)
);
// 使用常量替换硬编码的 460*2
gameObjectDetailedSearch
.
transform
.
DOMove
(
targetPos
,
0.6f
);
reShowBar
(
0
,
MAIN_SEARCH_PANEL_WIDTH
+
DETAILED_SEARCH_PANEL_WIDTH
);
}
else
{
gameObjectDetailedSearch
.
GetComponent
<
UITexture
>().
height
=
Screen
.
height
;
// 使用常量替换硬编码的 575f
iTween
.
MoveTo
(
gameObjectDetailedSearch
,
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
COMBINED_PANEL_WIDTH
,
Screen
.
height
*
1.5f
,
0
)
),
0.6f
Vector3
targetPos
=
Program
.
camera_main_2d
.
ScreenToWorldPoint
(
new
Vector3
(
Screen
.
width
-
COMBINED_PANEL_WIDTH
,
Screen
.
height
*
1.5f
,
0
)
);
// 使用常量替换硬编码的 230
gameObjectDetailedSearch
.
transform
.
DOMove
(
targetPos
,
0.6f
);
reShowBar
(
0
,
CAMERA_MARGIN_RIGHT_NORMAL
);
}
}
...
...
@@ -2058,7 +2044,7 @@ public class DeckManager : ServantWithCardDescription
r
.
gameObject
.
transform
.
position
=
new
Vector3
(
0
,
5
,
0
);
r
.
gameObject
.
transform
.
eulerAngles
=
new
Vector3
(
90
,
0
,
0
);
r
.
gameObject
.
transform
.
localScale
=
new
Vector3
(
0
,
0
,
0
);
iTween
.
ScaleTo
(
r
.
gameObject
,
new
Vector3
(
3
,
4
,
1
),
0.4f
);
r
.
gameObject
.
transform
.
DOScale
(
new
Vector3
(
3
,
4
,
1
),
0.4f
);
r
.
gameObject
.
SetActive
(
true
);
return
r
;
}
...
...
Assets/old/Ocgcore/animation_scripts/screenFader.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
public
class
screenFader
:
MonoBehaviour
{
...
...
@@ -30,19 +31,18 @@ public class screenFader : MonoBehaviour
Vector3
to
=
Program
.
camera_game_main
.
ScreenToWorldPoint
(
screen_point
);
deltaTimeCloseUp
+=
Time
.
deltaTime
;
if
(
deltaTimeCloseUp
>
time
)
{
deltaTimeCloseUp
=
time
;
}
gameObject
.
transform
.
position
=
new
Vector3
(
iTween
.
easeOutQuad
(
from
.
x
,
to
.
x
,
deltaTimeCloseUp
/
time
),
iTween
.
easeOutQuad
(
from
.
y
,
to
.
y
,
deltaTimeCloseUp
/
time
),
iTween
.
easeOutQuad
(
from
.
z
,
to
.
z
,
deltaTimeCloseUp
/
time
)
);
float
progress
=
(
time
>
0
)
?
Mathf
.
Clamp01
(
deltaTimeCloseUp
/
time
)
:
1f
;
// 分别计算 x, y, z 各个轴上的缓动值
float
newX
=
DOVirtual
.
EasedValue
(
from
.
x
,
to
.
x
,
progress
,
Ease
.
OutQuad
);
float
newY
=
DOVirtual
.
EasedValue
(
from
.
y
,
to
.
y
,
progress
,
Ease
.
OutQuad
);
float
newZ
=
DOVirtual
.
EasedValue
(
from
.
z
,
to
.
z
,
progress
,
Ease
.
OutQuad
);
gameObject
.
transform
.
position
=
new
Vector3
(
newX
,
newY
,
newZ
);
}
}
Assets/old/Ocgcore/numbers/number_loader.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
System.Collections.Generic
;
public
class
number_loader
:
MonoBehaviour
{
using
System.Collections.Generic
;
using
DG.Tweening
;
// 1. 引入 DOTween 命名空间
using
UnityEngine
;
// 类名保持不变
public
class
number_loader
:
MonoBehaviour
{
public
Sprite
[]
sps
=
new
Sprite
[
60
];
public
GameObject
mod
;
// Use this for initialization
void
Start
()
{
}
List
<
GameObject
>
obj_nums
=
new
List
<
GameObject
>();
Color
ccc
=
Color
.
white
;
int
n
=
-
1
;
public
void
set_number
(
int
number
,
int
color
)
private
List
<
GameObject
>
obj_nums
=
new
List
<
GameObject
>();
private
int
n
=
-
1
;
private
int
_currentColorIndex
=
-
1
;
public
void
set_number
(
int
number
,
int
color
)
{
if
(
n
!=
number
)
if
(
n
==
number
&&
_currentColorIndex
==
color
)
{
return
;
}
n
=
number
;
_currentColorIndex
=
color
;
foreach
(
GameObject
digitObject
in
obj_nums
)
{
GameObject
objToDestroy
=
digitObject
;
objToDestroy
.
transform
.
DOScale
(
Vector3
.
zero
,
0.6f
)
.
SetEase
(
Ease
.
InBack
)
.
OnComplete
(()
=>
{
if
(
objToDestroy
!=
null
)
Destroy
(
objToDestroy
);
});
}
obj_nums
.
Clear
();
if
(
number
<
0
)
{
n
=
number
;
string
number_strig
=
number
.
ToString
();
for
(
int
i
=
0
;
i
<
obj_nums
.
Count
;
i
++)
return
;
}
string
number_strig
=
number
.
ToString
();
for
(
int
i
=
0
;
i
<
number_strig
.
Length
;
i
++)
{
if
(!
int
.
TryParse
(
number_strig
[
i
].
ToString
(),
out
int
digitValue
))
continue
;
int
spriteIndex
=
color
*
10
+
digitValue
;
if
(
mod
==
null
)
{
iTween
.
ScaleTo
(
obj_nums
[
i
],
Vector3
.
zero
,
0.6f
);
Destroy
(
obj_nums
[
i
],
0.6f
);
Debug
.
LogError
(
"预设体 'mod' 未在 Inspector 中指定!"
,
this
);
return
;
// 关键资源缺失,终止执行
}
obj_nums
.
Clear
();
if
(
number
>
-
1
)
if
(
spriteIndex
>=
sps
.
Length
||
sps
[
spriteIndex
]
==
null
)
{
for
(
int
i
=
0
;
i
<
number_strig
.
Length
;
i
++)
{
if
(
color
*
10
+
int
.
Parse
(
number_strig
[
i
].
ToString
())
<
60
)
{
Sprite
sprite
=
sps
[
color
*
10
+
int
.
Parse
(
number_strig
[
i
].
ToString
())];
GameObject
obj
=
(
GameObject
)
MonoBehaviour
.
Instantiate
(
mod
,
Vector3
.
zero
,
Quaternion
.
identity
);
obj
.
transform
.
SetParent
(
gameObject
.
transform
,
false
);
obj
.
GetComponent
<
SpriteRenderer
>().
sprite
=
sprite
;
obj
.
transform
.
localPosition
=
new
Vector3
(-(
float
)
number_strig
.
Length
/
2f
+
0.5f
+
i
,
0
,
0
);
obj
.
transform
.
localScale
=
Vector3
.
zero
;
iTween
.
ScaleTo
(
obj
,
new
Vector3
(
1
,
1
,
1
),
0.6f
);
obj_nums
.
Add
(
obj
);
}
}
Debug
.
LogWarning
(
$"精灵索引 '
{
spriteIndex
}
' 超出范围或对应的精灵为空。"
,
this
);
continue
;
// 跳过这个无效的数字位
}
set_color
(
ccc
);
}
}
public
void
set_color
(
Color
c
)
{
ccc
=
c
;
//var sps=GetComponentsInChildren<SpriteRenderer>();
//for (int i = 0; i < sps.Length;i++ )
//{
// Color aaa = c;
// aaa.a = 0.8f;
// sps[i].color = aaa;
//}
GameObject
obj
=
(
GameObject
)
Instantiate
(
mod
,
transform
);
obj
.
transform
.
localPosition
=
new
Vector3
(-(
float
)
number_strig
.
Length
/
2f
+
0.5f
+
i
,
0
,
0
);
var
spriteRenderer
=
obj
.
GetComponent
<
SpriteRenderer
>();
if
(
spriteRenderer
!=
null
)
{
spriteRenderer
.
sprite
=
sps
[
spriteIndex
];
}
else
{
Debug
.
LogError
(
"预设体 'mod' 上缺少 SpriteRenderer 组件!"
,
this
);
Destroy
(
obj
);
continue
;
}
obj
.
transform
.
localScale
=
Vector3
.
zero
;
obj
.
transform
.
DOScale
(
Vector3
.
one
,
0.6f
)
.
SetEase
(
Ease
.
OutBack
);
obj_nums
.
Add
(
obj
);
}
}
// Update is called once per frame
void
Update
()
{
}
}
Assets/old/UiverseAssests/art_plugin/FT_Pulse_volume01/ocgcore/fade_died.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
public
class
fade_died
:
MonoBehaviour
{
public
float
time
=
3
;
public
Vector3
scale
=
new
Vector3
(
1
,
1
,
1
);
// Use this for initialization
void
Start
()
{
// 初始缩放设为0
gameObject
.
transform
.
localScale
=
Vector3
.
zero
;
iTween
.
ScaleTo
(
gameObject
,
scale
,
0.6f
);
iTween
.
ScaleTo
(
gameObject
,
iTween
.
Hash
(
"delay"
,
time
,
"x"
,
0
,
"y"
,
0
,
"z"
,
0
,
"time"
,
0.6f
));
Destroy
(
gameObject
,
time
+
0.6f
);
// 2. 创建一个 DOTween 序列来管理整个动画生命周期
Sequence
mySequence
=
DOTween
.
Sequence
();
// 3. 将动画按顺序添加到序列中
mySequence
.
Append
(
transform
.
DOScale
(
scale
,
0.6f
))
// 第一步:放大出现
.
AppendInterval
(
time
)
// 第二步:等待'time'秒
.
Append
(
transform
.
DOScale
(
Vector3
.
zero
,
0.6f
))
// 第三步:缩小消失
.
OnComplete
(()
=>
// 第四步:动画序列完成后执行
{
Destroy
(
gameObject
);
// 安全地销毁对象
});
}
// Update is called once per frame
...
...
Assets/old/UiverseAssests/art_plugin/attack_sign/sorder.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
System
;
using
System
;
using
DG.Tweening
;
using
UnityEngine
;
public
class
sorder
:
MonoBehaviour
{
int
time
;
public
class
sorder
:
MonoBehaviour
{
int
time
;
// Use this for initialization
void
Start
()
{
time
=
Program
.
TimePassed
();
iTween
.
ScaleTo
(
gameObject
,
new
Vector3
(
3
,
3
,
3
),
1
);
void
Start
()
{
time
=
Program
.
TimePassed
();
transform
.
DOScale
(
3f
,
1f
);
}
// Update is called once per frame
void
Update
()
{
int
delta_time
=
Program
.
TimePassed
()
-
time
;
void
Update
()
{
int
delta_time
=
Program
.
TimePassed
()
-
time
;
//gameObject.transform.Rotate((new Vector3(0, 0, 1)) * Time.deltaTime * 50);
gameObject
.
transform
.
localPosition
=
new
Vector3
(
gameObject
.
transform
.
localPosition
.
x
,
gameObject
.
transform
.
localPosition
.
y
,
gameObject
.
transform
.
localPosition
.
z
+
(
float
)(
gameObject
.
transform
.
localPosition
=
new
Vector3
(
gameObject
.
transform
.
localPosition
.
x
,
gameObject
.
transform
.
localPosition
.
y
,
gameObject
.
transform
.
localPosition
.
z
+
(
float
)(
Math
.
Sin
((
float
)
delta_time
/
150f
)
/
40f
Math
.
Sin
((
float
)
delta_time
/
150f
)
/
40f
));
));
}
}
Assets/old/UiverseAssests/art_plugin/coin/coiner.cs
View file @
77b93c7e
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
using
System
;
public
class
coiner
:
MonoBehaviour
{
int
time
;
// Use this for initialization
void
Start
()
{
gameObject
.
transform
.
localScale
=
Vector3
.
zero
;
gameObject
.
transform
.
eulerAngles
=
new
Vector3
(
60
,
0
,
0
);
time
=
Program
.
TimePassed
();
}
public
void
coin_app
()
{
iTween
.
ScaleTo
(
gameObject
,
new
Vector3
(
10
,
10
,
8.743f
),
1f
);
}
public
void
dice_app
()
{
iTween
.
ScaleTo
(
gameObject
,
new
Vector3
(
0.2f
,
0.2f
,
0.2f
),
1f
);
}
public
void
disapp
()
{
iTween
.
ScaleTo
(
gameObject
,
new
Vector3
(
0
,
0
,
0
),
1f
);
}
public
void
tocoin
(
bool
up
)
{
if
(
up
)
{
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(
60
,
0
,
0
)
+
(
new
Vector3
(
360
,
0
,
0
))
*
15
,
3f
);
}
else
{
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(
240
,
0
,
0
)
+
(
new
Vector3
(
360
,
0
,
0
))
*
15
,
3f
);
}
}
public
void
todice
(
int
num
)
{
switch
(
num
)
{
case
1
:
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(-
60
,
180
,
180
)
+
(
new
Vector3
(
360
,
360
,
360
))
*
15
,
3f
);
break
;
case
2
:
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(
40
,
180
,
180
)
+
(
new
Vector3
(
360
,
360
,
360
))
*
15
,
3f
);
break
;
case
3
:
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(-
30
,
0
,
-
90
)
+
(
new
Vector3
(
360
,
360
,
360
))
*
15
,
3f
);
break
;
case
4
:
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(-
30
,
0
,
90
)
+
(
new
Vector3
(
360
,
360
,
360
))
*
15
,
3f
);
break
;
case
5
:
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(-
30
,
0
,
0
)
+
(
new
Vector3
(
360
,
360
,
360
))
*
15
,
3f
);
break
;
case
6
:
iTween
.
RotateTo
(
gameObject
,
new
Vector3
(
60
,
0
,
0
)
+
(
new
Vector3
(
360
,
360
,
360
))
*
15
,
3f
);
break
;
}
}
// Update is called once per frame
void
Update
()
{
if
(
Program
.
TimePassed
()-
time
>
4000
){
time
=
Program
.
TimePassed
();
Destroy
(
gameObject
,
3000
);
iTween
.
ScaleTo
(
gameObject
,
Vector3
.
zero
,
1f
);
}
}
public
class
coiner
:
MonoBehaviour
{
private
int
time
;
private
const
float
fastDuration
=
1.5f
;
void
Start
()
{
transform
.
localScale
=
Vector3
.
zero
;
transform
.
eulerAngles
=
new
Vector3
(
60
,
0
,
0
);
time
=
Program
.
TimePassed
();
}
public
void
coin_app
()
{
transform
.
DOScale
(
new
Vector3
(
10
,
10
,
8.743f
),
1f
);
}
public
void
dice_app
()
{
transform
.
DOScale
(
new
Vector3
(
0.2f
,
0.2f
,
0.2f
),
1f
);
}
public
void
disapp
()
{
transform
.
DOScale
(
Vector3
.
zero
,
1f
);
}
public
void
tocoin
(
bool
up
)
{
if
(
up
)
{
transform
.
DORotate
(
new
Vector3
(
60
,
0
,
0
)
+
new
Vector3
(
360
,
0
,
0
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
}
else
{
transform
.
DORotate
(
new
Vector3
(
240
,
0
,
0
)
+
new
Vector3
(
360
,
0
,
0
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
}
}
public
void
todice
(
int
num
)
{
switch
(
num
)
{
case
1
:
transform
.
DORotate
(
new
Vector3
(-
60
,
180
,
180
)
+
new
Vector3
(
360
,
360
,
360
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
break
;
case
2
:
transform
.
DORotate
(
new
Vector3
(
40
,
180
,
180
)
+
new
Vector3
(
360
,
360
,
360
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
break
;
case
3
:
transform
.
DORotate
(
new
Vector3
(-
30
,
0
,
-
90
)
+
new
Vector3
(
360
,
360
,
360
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
break
;
case
4
:
transform
.
DORotate
(
new
Vector3
(-
30
,
0
,
90
)
+
new
Vector3
(
360
,
360
,
360
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
break
;
case
5
:
transform
.
DORotate
(
new
Vector3
(-
30
,
0
,
0
)
+
new
Vector3
(
360
,
360
,
360
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
break
;
case
6
:
transform
.
DORotate
(
new
Vector3
(
60
,
0
,
0
)
+
new
Vector3
(
360
,
360
,
360
)
*
15
,
fastDuration
,
RotateMode
.
FastBeyond360
);
break
;
}
}
void
Update
()
{
if
(
Program
.
TimePassed
()
-
time
>
4000
)
{
time
=
Program
.
TimePassed
();
transform
.
DOScale
(
Vector3
.
zero
,
1f
);
Destroy
(
gameObject
,
3f
);
}
}
}
Assets/old/UiverseAssests/art_plugin/thunder/RAYOS/Sources/LightningBolt.cs
View file @
77b93c7e
...
...
@@ -18,18 +18,18 @@ public class LightningBolt : MonoBehaviour
Perlin
noise
;
float
oneOverZigs
;
private
ParticleSystem
ps
;
private
Particle
[]
particles
;
//
private ParticleSystem ps;
//
private Particle[] particles;
void
Start
()
{
oneOverZigs
=
1f
/
(
float
)
zigs
;
ps
=
GetComponent
<
ParticleSystem
>();
particles
=
new
Particle
[
zigs
];
var
em
=
ps
.
emission
;
em
.
enabled
=
false
;
ps
.
Emit
(
zigs
);
ps
.
GetParticles
(
particles
);
//
ps = GetComponent<ParticleSystem>();
//
particles = new Particle[zigs];
//
var em = ps.emission;
//
em.enabled = false;
//
ps.Emit(zigs);
//
ps.GetParticles(particles);
}
void
Update
()
...
...
@@ -41,27 +41,27 @@ public class LightningBolt : MonoBehaviour
float
timey
=
Time
.
time
*
speed
*
1.21688f
;
float
timez
=
Time
.
time
*
speed
*
2.5564f
;
for
(
int
i
=
0
;
i
<
particles
.
Length
;
i
++)
{
Vector3
position
=
Vector3
.
Lerp
(
transform
.
position
,
target
.
position
,
oneOverZigs
*
(
float
)
i
);
Vector3
offset
=
new
Vector3
(
noise
.
Noise
(
timex
+
position
.
x
,
timex
+
position
.
y
,
timex
+
position
.
z
),
noise
.
Noise
(
timey
+
position
.
x
,
timey
+
position
.
y
,
timey
+
position
.
z
),
noise
.
Noise
(
timez
+
position
.
x
,
timez
+
position
.
y
,
timez
+
position
.
z
));
position
+=
(
offset
*
scale
*
((
float
)
i
*
oneOverZigs
));
//
for (int i = 0; i < particles.Length; i++)
//
{
//
Vector3 position = Vector3.Lerp(transform.position, target.position, oneOverZigs * (float)i);
//
Vector3 offset = new Vector3(noise.Noise(timex + position.x, timex + position.y, timex + position.z),
//
noise.Noise(timey + position.x, timey + position.y, timey + position.z),
//
noise.Noise(timez + position.x, timez + position.y, timez + position.z));
//
position += (offset * scale * ((float)i * oneOverZigs));
particles
[
i
].
position
=
position
;
particles
[
i
].
startColor
=
Color
.
white
;
//particles[i].energy = 1f;
}
//
particles[i].position = position;
//
particles[i].startColor = Color.white;
//
//particles[i].energy = 1f;
//
}
ps
.
SetParticles
(
particles
);
//
ps.SetParticles(particles);
if
(
ps
.
particleCount
>=
2
)
{
if
(
startLight
)
startLight
.
transform
.
position
=
particles
[
0
].
position
;
if
(
endLight
)
endLight
.
transform
.
position
=
particles
[
particles
.
Length
-
1
].
position
;
}
//
if (ps.particleCount >= 2)
//
{
//
if (startLight)
//
startLight.transform.position = particles[0].position;
//
if (endLight)
//
endLight.transform.position = particles[particles.Length - 1].position;
//
}
}
}
\ No newline at end of file
Assets/old/UiverseAssests/itween.meta
deleted
100644 → 0
View file @
07ad0480
fileFormatVersion: 2
guid: e778ea66df9cae740a9957b2cadd6b72
folderAsset: yes
timeCreated: 1469182548
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/old/UiverseAssests/itween/iTween.cs
deleted
100644 → 0
View file @
07ad0480
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Assets/old/UiverseAssests/itween/iTween.cs.meta
deleted
100644 → 0
View file @
07ad0480
fileFormatVersion: 2
guid: 092d0bff4e926854aa2558f53e14ee34
timeCreated: 1469174736
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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