Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SteelBall
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
SteelBall
Commits
c6d19620
Commit
c6d19620
authored
Jan 25, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本优化
parent
9346c493
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
68 deletions
+68
-68
BattleCtrl.cs
SteelBall/Assets/0A2_Scripts/Battle/BattleCtrl.cs
+4
-4
CubeChild.prefab
SteelBall/Assets/0A3_Prefabs/CubeChild.prefab
+64
-64
No files found.
SteelBall/Assets/0A2_Scripts/Battle/BattleCtrl.cs
View file @
c6d19620
...
@@ -193,11 +193,11 @@ public class BattleCtrl : MonoBehaviour
...
@@ -193,11 +193,11 @@ public class BattleCtrl : MonoBehaviour
{
{
varGo
.
transform
.
SetParent
(
parent
,
false
);
varGo
.
transform
.
SetParent
(
parent
,
false
);
varGo
.
transform
.
localPosition
=
Vector3
.
zero
;
varGo
.
transform
.
localPosition
=
Vector3
.
zero
;
for
(
int
i
=
0
;
i
<
varGo
.
transform
.
childCount
;
i
++)
//
for (int i = 0; i < varGo.transform.childCount; i++)
{
//
{
varGo
.
transform
.
GetChild
(
i
).
GetComponent
<
Rigidbody
>().
mass
=
0.1f
;
//
varGo.transform.GetChild(i).GetComponent<Rigidbody>().mass = 0.1f;
//varGo.transform.GetChild(i).GetComponent<Rigidbody>().AddForce(Vector3.down * 20000000.0f, ForceMode.Force);
//varGo.transform.GetChild(i).GetComponent<Rigidbody>().AddForce(Vector3.down * 20000000.0f, ForceMode.Force);
}
//
}
varGo
.
SetActive
(
true
);
varGo
.
SetActive
(
true
);
}
}
return
varGo
;
return
varGo
;
...
...
SteelBall/Assets/0A3_Prefabs/CubeChild.prefab
View file @
c6d19620
This diff is collapsed.
Click to expand it.
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