Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
3
3D Fruit
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanqing
3D Fruit
Commits
873b9c3c
Commit
873b9c3c
authored
Jun 11, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改脚本
parent
c86dec3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
FruitView.cs
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
+22
-4
No files found.
3D Fruit/Assets/#A2_Scripts/Battle/View/FruitView.cs
View file @
873b9c3c
...
...
@@ -222,7 +222,7 @@ public class FruitView : MonoBehaviour
}
if
(
varGo
)
{
Rigidbody
[]
varRigid
=
varGo
.
GetComponentsInChildren
<
Rigidbody
>();
Rigidbody
[]
varRigid
=
varGo
.
GetComponentsInChildren
<
Rigidbody
>(
true
);
for
(
int
i
=
0
;
i
<
varRigid
.
Length
;
i
++)
{
varPosLst
.
Add
(
varRigid
[
i
].
transform
.
localPosition
);
...
...
@@ -252,7 +252,7 @@ public class FruitView : MonoBehaviour
}
if
(
varGo
)
{
Rigidbody
[]
varRigid
=
varGo
.
GetComponentsInChildren
<
Rigidbody
>();
Rigidbody
[]
varRigid
=
varGo
.
GetComponentsInChildren
<
Rigidbody
>(
true
);
for
(
int
i
=
0
;
i
<
varRigid
.
Length
;
i
++)
{
varPosLst
.
Add
(
varRigid
[
i
].
transform
.
localPosition
);
...
...
@@ -286,9 +286,10 @@ public class FruitView : MonoBehaviour
if
(
m_smallBallPosDic
.
TryGetValue
(
m_smallBallLst
[
i
].
GetInstanceID
(),
out
varPosLst
)
&&
m_smallBallSizeDic
.
TryGetValue
(
m_smallBallLst
[
i
].
GetInstanceID
(),
out
varSizeLst
))
{
Rigidbody
[]
varRigid
=
m_smallBallLst
[
i
].
GetComponentsInChildren
<
Rigidbody
>();
Rigidbody
[]
varRigid
=
m_smallBallLst
[
i
].
GetComponentsInChildren
<
Rigidbody
>(
true
);
for
(
int
m
=
0
;
m
<
varRigid
.
Length
;
m
++)
{
varRigid
[
m
].
gameObject
.
SetActive
(
true
);
varRigid
[
m
].
transform
.
localPosition
=
varPosLst
[
m
];
varRigid
[
m
].
transform
.
localRotation
=
Quaternion
.
identity
;
varRigid
[
m
].
transform
.
localScale
=
varSizeLst
[
m
];
...
...
@@ -1334,6 +1335,22 @@ public class FruitView : MonoBehaviour
//装饰阶段3停止
void
OnStopAction
()
{
//掉落的不显示
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelThreeIndex
||
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelFiveIndex
)
{
for
(
int
i
=
0
;
i
<
m_smallBallLst
.
Count
;
i
++)
{
Rigidbody
[]
varRigid
=
m_smallBallLst
[
i
].
GetComponentsInChildren
<
Rigidbody
>(
true
);
for
(
int
m
=
0
;
m
<
varRigid
.
Length
;
m
++)
{
if
(
varRigid
[
m
].
velocity
.
y
<
-
10.0f
)
{
varRigid
[
m
].
gameObject
.
SetActive
(
false
);
}
}
}
}
if
(
m_cheeseView
)
{
m_cheeseView
.
StopStage3
();
...
...
@@ -1385,7 +1402,8 @@ public class FruitView : MonoBehaviour
if
(
m_cheeseView
)
{
m_cheeseView
.
transform
.
SetParent
(
parent
);
m_cheeseView
.
transform
.
DOLocalMove
(
m_rightNodePos
,
0.02f
);
//m_cheeseView.transform.DOLocalMove(m_rightNodePos, 0.02f);
m_cheeseView
.
transform
.
localPosition
=
m_rightNodePos
;
}
}
//删除装饰品
...
...
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