Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BoomMaster
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
BoomMaster
Commits
21712683
Commit
21712683
authored
Mar 08, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
14ffc6c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
15 deletions
+60
-15
PropSelectUI.cs
BoomMaster/Assets/#A2_Scripts/Battle/UI/PropSelectUI.cs
+4
-0
BombView.cs
BoomMaster/Assets/#A2_Scripts/Battle/View/BombView.cs
+41
-3
BattleUI.prefab
BoomMaster/Assets/#A3_Prefabs/BattleUI.prefab
+1
-1
RayfireBlade.cs
...ts/#E1_Plugins/RayFire/Scripts/Components/RayfireBlade.cs
+14
-11
No files found.
BoomMaster/Assets/#A2_Scripts/Battle/UI/PropSelectUI.cs
View file @
21712683
...
...
@@ -77,6 +77,10 @@ public class PropSelectUI : MonoBehaviour
//m_bIsBuyTwo = false;
//m_bIsBuyThree = false;
m_bIsBuy
=
false
;
GameServices
.
timerServices
.
Push
(
this
,
0.5f
,
delegate
{
BattleCtrl
.
instance
.
levelManager
.
curLevel
.
bombView
.
CreateProp3Model
();
});
}
public
void
SetState
(
bool
value
)
{
...
...
BoomMaster/Assets/#A2_Scripts/Battle/View/BombView.cs
View file @
21712683
...
...
@@ -52,6 +52,9 @@ public class BombView : MonoBehaviour
private
float
m_curCutOffNum
=
0
;
//当前切割碎块
private
bool
m_bFinishCut
=
true
;
//完成切割
private
bool
m_bIsSelectPropFinish
=
false
;
//是否选完道具
private
RayfireBlade
m_rayFireBlade
;
private
Transform
m_childCutTrans
;
private
bool
m_bDelayFinishCut
=
true
;
private
Vector3
[]
m_levelOnekniftDefaultPos
=
new
[]
{
new
Vector3
(
10.62f
,
7.55f
,
-
2.5f
),
new
Vector3
(
10.62f
,
4.92f
,
1.78f
)
,
new
Vector3
(
10.62f
,
3.52f
,
-
1.66f
),
new
Vector3
(
10.62f
,
1.89f
,
1.78f
)};
private
Quaternion
[]
m_levelOnekniftDefaultRotate
=
new
[]
{
Quaternion
.
Euler
(
45
,
0
,
80
),
Quaternion
.
Euler
(
135
,
0
,
90
)
...
...
@@ -74,6 +77,7 @@ public class BombView : MonoBehaviour
{
m_totalChildNum
=
m_rootTrans
.
childCount
-
1
;
m_propStartPos
=
m_propPosParent
.
GetComponentsInChildren
<
Transform
>();
m_childCutTrans
=
m_cutOffObj
.
transform
.
GetChild
(
0
);
}
private
void
Start
()
{
...
...
@@ -150,6 +154,8 @@ public class BombView : MonoBehaviour
m_curPropModelObj
.
transform
.
position
=
m_propStartPos
[
4
].
position
;
m_curPropModelObj
.
transform
.
rotation
=
Quaternion
.
identity
;
SetNormalState
(
false
);
m_rayFireBlade
=
m_curPropModelObj
.
transform
.
Find
(
"Props4/Props4/Blade_Target"
).
GetComponent
<
RayfireBlade
>();
m_rayFireBlade
.
SetTarget
(
m_childCutTrans
.
gameObject
);
Invoke
(
"InvokeCreateProp"
,
0.1f
);
}
void
InvokeCreateProp
()
...
...
@@ -420,7 +426,7 @@ public class BombView : MonoBehaviour
{
return
;
}
if
(
m_bFinishCut
)
if
(
m_bFinishCut
&&
m_bDelayFinishCut
)
{
if
(
Input
.
GetMouseButtonDown
(
0
))
{
...
...
@@ -459,19 +465,51 @@ public class BombView : MonoBehaviour
{
m_lineIndex
=
0
;
m_bMouseUpEnd
=
false
;
m_bDelayFinishCut
=
false
;
m_pathPos
.
Clear
();
m_curPropModelObj
.
transform
.
position
=
m_firstBombPos
;
m_curPropModelObj
.
transform
.
rotation
=
m_kniftDefaultRotate
[
m_mouseUpIndex
-
1
];
}
}
//画完线开始切割
if
(
m_lineIndex
==
0
&&
m_mouseUpIndex
>
0
&&
m_curPropModelObj
)
if
(
m_lineIndex
==
0
&&
m_mouseUpIndex
>
0
&&
m_curPropModelObj
&&
!
m_bFinishCut
&&
!
m_bDelayFinishCut
)
{
m_curPropModelObj
.
transform
.
position
=
Vector3
.
Lerp
(
m_curPropModelObj
.
transform
.
position
,
m_secondBombPos
,
0.2f
);
if
(
Vector3
.
SqrMagnitude
(
m_curPropModelObj
.
transform
.
position
-
m_secondBombPos
)
<=
1.0
f
)
if
(
Vector3
.
SqrMagnitude
(
m_curPropModelObj
.
transform
.
position
-
m_secondBombPos
)
<=
0.5
f
)
{
lineRenderer
.
positionCount
=
0
;
m_bFinishCut
=
true
;
m_rayFireBlade
.
SliceTarget
();
GameServices
.
timerServices
.
Push
(
this
,
2.0f
,
delegate
{
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelOneIndex
)
{
if
(
m_mouseUpIndex
==
1
)
{
m_childCutTrans
=
m_cutOffObj
.
transform
.
Find
(
"column_root/column_fr_0"
);
}
else
if
(
m_mouseUpIndex
==
2
)
{
m_childCutTrans
=
m_cutOffObj
.
transform
.
Find
(
"column_root/column_fr_0_root/column_fr_0_fr_0"
);
}
}
else
if
(
BattleCtrl
.
instance
.
levelManager
.
CurLevelIndex
==
LevelEnum
.
levelTwoIndex
)
{
if
(
m_mouseUpIndex
==
1
)
{
m_childCutTrans
=
m_cutOffObj
.
transform
.
Find
(
"people_root/people_fr_0"
);
}
else
if
(
m_mouseUpIndex
==
2
)
{
m_childCutTrans
=
m_cutOffObj
.
transform
.
Find
(
"people_root/people_fr_0_root/people_fr_0_fr_0"
);
}
}
if
(
m_childCutTrans
)
{
m_bDelayFinishCut
=
true
;
m_rayFireBlade
.
SetTarget
(
m_childCutTrans
.
gameObject
);
}
});
}
}
//if (Input.GetMouseButtonDown(0))
...
...
BoomMaster/Assets/#A3_Prefabs/BattleUI.prefab
View file @
21712683
...
...
@@ -13336,7 +13336,7 @@ Animator:
m_GameObject
:
{
fileID
:
6064464677660112694
}
m_Enabled
:
1
m_Avatar
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
9100000
,
guid
:
bb389cc2efde9ef4ba6b88a34ad44400
,
type
:
2
}
m_CullingMode
:
0
m_UpdateMode
:
0
m_ApplyRootMotion
:
0
...
...
BoomMaster/Assets/#E1_Plugins/RayFire/Scripts/Components/RayfireBlade.cs
View file @
21712683
...
...
@@ -74,19 +74,19 @@ namespace RayFire
void
DefineComponents
()
{
transForm
=
GetComponent
<
Transform
>();
// Check collider
colLider
=
GetComponent
<
Collider
>();
//colLider = GetComponent<Collider>();
//No collider. Add own
//if (colLider == null)
// colLider = gameObject.AddComponent<MeshCollider>();
// No collider. Add own
if
(
colLider
==
null
)
colLider
=
gameObject
.
AddComponent
<
MeshCollider
>();
//
if
(
colLider
is
MeshCollider
)
((
MeshCollider
)
colLider
).
convex
=
true
;
//if (colLider is MeshCollider)
// ((MeshCollider)colLider).convex = true;
colLider
.
isTrigger
=
true
;
//
colLider.isTrigger = true;
}
/// /////////////////////////////////////////////////////////
...
...
@@ -196,7 +196,10 @@ namespace RayFire
/// /////////////////////////////////////////////////////////
/// Slicing
/// /////////////////////////////////////////////////////////
public
void
SetTarget
(
GameObject
obj
)
{
target
=
obj
;
}
// Slice target
public
void
SliceTarget
()
{
...
...
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