Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FastMail
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
FastMail
Commits
a19c55c9
Commit
a19c55c9
authored
Dec 24, 2020
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
气球关卡优化
parent
07b35d82
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
16 deletions
+9
-16
.suo
FastMail/.vs/FastMail/v16/.suo
+0
-0
FifthLevelTrigger.cs
...il/Assets/0A2_Scripts/Battle/Trigger/FifthLevelTrigger.cs
+5
-12
TargetView.cs
FastMail/Assets/0A2_Scripts/Battle/View/TargetView.cs
+4
-4
No files found.
FastMail/.vs/FastMail/v16/.suo
View file @
a19c55c9
No preview for this file type
FastMail/Assets/0A2_Scripts/Battle/Trigger/FifthLevelTrigger.cs
View file @
a19c55c9
...
@@ -8,20 +8,17 @@ public class FifthLevelTrigger : MonoBehaviour
...
@@ -8,20 +8,17 @@ public class FifthLevelTrigger : MonoBehaviour
//public Transform m_topTrans;
//public Transform m_topTrans;
//private Rigidbody[] m_rigidBody;
//private Rigidbody[] m_rigidBody;
//private bool m_bControl = true;
//private bool m_bControl = true;
public
Transform
m_ropeTrans
;
public
Transform
m_mousePosTrans
;
public
Transform
m_mousePosTrans
;
public
GameObject
m_ropeObj
;
public
float
m_speed
=
1.0f
;
public
float
m_speed
=
1.0f
;
private
bool
m_bEnterGround
=
true
;
private
bool
m_bEnterGround
=
true
;
private
bool
m_bEnterSuccessTarget
=
false
;
private
bool
m_bEnterSuccessTarget
=
false
;
private
Rigidbody
m_
M
ouseRigidBody
;
private
Rigidbody
m_
m
ouseRigidBody
;
private
Vector3
m_DefaultPos
=
new
Vector3
(
2.18f
,
1.61f
,-
1.13f
);
private
Vector3
m_DefaultPos
=
new
Vector3
(
2.18f
,
1.61f
,-
1.13f
);
private
Vector3
m_dirPos
=
new
Vector3
(
1.19f
,
-
0.0815f
,
-
2.11f
);
private
Vector3
m_dirPos
=
new
Vector3
(
1.19f
,
0
,
-
2.11f
);
private
void
Start
()
private
void
Start
()
{
{
m_MouseRigidBody
=
m_mousePosTrans
.
gameObject
.
GetComponent
<
Rigidbody
>();
m_mouseRigidBody
=
m_mousePosTrans
.
gameObject
.
GetComponent
<
Rigidbody
>();
//m_DefaultPos = m_mousePosTrans.localPosition;
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
chainRopeView
.
onBalloonEnterTarget
+=
onBalloonEnterTarget
;
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
chainRopeView
.
onBalloonEnterTarget
+=
onBalloonEnterTarget
;
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
chainRopeView
.
onBalloonEnterGround
+=
onBalloonEnterGround
;
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
chainRopeView
.
onBalloonEnterGround
+=
onBalloonEnterGround
;
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
chainRopeView
.
onBalloonEnterSuccessTarget
+=
onBalloonEnterSuccessTarget
;
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
chainRopeView
.
onBalloonEnterSuccessTarget
+=
onBalloonEnterSuccessTarget
;
...
@@ -38,10 +35,6 @@ public class FifthLevelTrigger : MonoBehaviour
...
@@ -38,10 +35,6 @@ public class FifthLevelTrigger : MonoBehaviour
void
onBalloonEnterSuccessTarget
()
void
onBalloonEnterSuccessTarget
()
{
{
m_bEnterSuccessTarget
=
true
;
m_bEnterSuccessTarget
=
true
;
GameServices
.
timerServices
.
Push
(
this
,
3
,
delegate
{
});
}
}
// Update is called once per frame
// Update is called once per frame
void
Update
()
void
Update
()
...
@@ -61,12 +54,12 @@ public class FifthLevelTrigger : MonoBehaviour
...
@@ -61,12 +54,12 @@ public class FifthLevelTrigger : MonoBehaviour
if
(
m_bEnterSuccessTarget
)
if
(
m_bEnterSuccessTarget
)
{
{
m_bEnterSuccessTarget
=
false
;
m_bEnterSuccessTarget
=
false
;
m_
M
ouseRigidBody
.
isKinematic
=
true
;
m_
m
ouseRigidBody
.
isKinematic
=
true
;
m_mousePosTrans
.
localPosition
=
m_DefaultPos
;
m_mousePosTrans
.
localPosition
=
m_DefaultPos
;
}
}
else
else
{
{
if
(
m_
M
ouseRigidBody
.
isKinematic
)
if
(
m_
m
ouseRigidBody
.
isKinematic
)
{
{
//transform.Translate(Vector3.up * Time.deltaTime * m_speed, Space.World);
//transform.Translate(Vector3.up * Time.deltaTime * m_speed, Space.World);
transform
.
localPosition
=
Vector3
.
Lerp
(
transform
.
localPosition
,
m_dirPos
,
0.03f
);
transform
.
localPosition
=
Vector3
.
Lerp
(
transform
.
localPosition
,
m_dirPos
,
0.03f
);
...
...
FastMail/Assets/0A2_Scripts/Battle/View/TargetView.cs
View file @
a19c55c9
...
@@ -165,10 +165,10 @@ public class TargetView : MonoBehaviour
...
@@ -165,10 +165,10 @@ public class TargetView : MonoBehaviour
public
void
SetColliderSuccessTarget
()
public
void
SetColliderSuccessTarget
()
{
{
// 特殊处理,第五关气球特殊处理
// 特殊处理,第五关气球特殊处理
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelFiveIndex
)
//
if (BattleCtrl.instance.levelManager.CurLevelIndex == LevelEnum.levelFiveIndex)
{
//
{
return
;
//
return;
}
//
}
if
(
m_rigidBody
)
if
(
m_rigidBody
)
{
{
m_rigidBody
.
isKinematic
=
true
;
m_rigidBody
.
isKinematic
=
true
;
...
...
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