Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Storage
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
Storage
Commits
411c978d
Commit
411c978d
authored
Mar 17, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
00860c5f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
StorageView.cs
Storage/Assets/#A2_Scripts/Battle/View/StorageView.cs
+12
-5
Level2.prefab
Storage/Assets/Res/Levels/Level2.prefab
+1
-0
ProjectSettings.asset
Storage/ProjectSettings/ProjectSettings.asset
+2
-2
No files found.
Storage/Assets/#A2_Scripts/Battle/View/StorageView.cs
View file @
411c978d
...
...
@@ -8,6 +8,7 @@ public class StorageView : MonoBehaviour
private
MeshCollider
[]
m_targetTrans
;
//所有目标
public
BoxCollider
m_triggerBox
;
public
Material
m_redMat
;
//红色材质球
public
GameObject
m_planeObj
;
//地板
private
MeshCollider
m_curTargetTrans
;
//当前抓的目标
public
MeshCollider
curTargetTrans
=>
m_curTargetTrans
;
private
Vector3
m_offset
;
//偏移值
...
...
@@ -39,6 +40,7 @@ public class StorageView : MonoBehaviour
private
bool
m_bControlCollisionBox
=
true
;
private
int
m_insideBoxNum
=
0
;
private
Animator
m_animator
;
private
bool
m_bResult
=
true
;
// Start is called before the first frame update
void
Start
()
{
...
...
@@ -192,6 +194,8 @@ public class StorageView : MonoBehaviour
}
else
{
m_bResult
=
false
;
m_planeObj
.
SetActive
(
false
);
m_animator
.
Play
(
"失败"
);
}
}
...
...
@@ -280,6 +284,8 @@ public class StorageView : MonoBehaviour
//m_camera.transform.position = Vector3.Lerp(m_camera.transform.position, m_cameraTargetPos, 0.2f);
//m_camera.transform.rotation = Quaternion.Lerp(m_camera.transform.rotation, m_cameraTargetRotate, 0.2f);
}
if
(
m_bResult
)
{
for
(
int
i
=
0
;
i
<
m_targetTrans
.
Length
;
i
++)
{
Vector3
varPos
=
m_targetTrans
[
i
].
transform
.
position
;
...
...
@@ -289,6 +295,7 @@ public class StorageView : MonoBehaviour
}
m_targetTrans
[
i
].
transform
.
position
=
varPos
;
}
}
//UpdateExitBox();
}
//设置父节点
...
...
Storage/Assets/Res/Levels/Level2.prefab
View file @
411c978d
...
...
@@ -420,6 +420,7 @@ MonoBehaviour:
m_targetParentTrans
:
{
fileID
:
357993861636149788
}
m_triggerBox
:
{
fileID
:
4071438363008510359
}
m_redMat
:
{
fileID
:
2100000
,
guid
:
3a9c306a971cce143bc26043250f12a1
,
type
:
2
}
m_planeObj
:
{
fileID
:
1125055352834747768
}
---
!u!65
&4728596101341234241
BoxCollider
:
m_ObjectHideFlags
:
0
...
...
Storage/ProjectSettings/ProjectSettings.asset
View file @
411c978d
...
...
@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources
:
0
accelerometerFrequency
:
60
companyName
:
Dyspace
productName
:
TruckJourney
productName
:
Storage
defaultCursor
:
{
fileID
:
0
}
cursorHotspot
:
{
x
:
0
,
y
:
0
}
m_SplashScreenBackgroundColor
:
{
r
:
0.13725491
,
g
:
0.12156863
,
b
:
0.1254902
,
a
:
1
}
...
...
@@ -163,7 +163,7 @@ PlayerSettings:
androidSupportedAspectRatio
:
1
androidMaxAspectRatio
:
2.1
applicationIdentifier
:
Android
:
com.Dyspace.
TruckJourney
Android
:
com.Dyspace.
Storage
buildNumber
:
{}
AndroidBundleVersionCode
:
1
AndroidMinSdkVersion
:
19
...
...
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