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
xujr
BoomMaster
Commits
443bc7d7
Commit
443bc7d7
authored
Jan 22, 2021
by
wanqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本优化
parent
80d276f5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
4 deletions
+49
-4
.suo
BoomMaster/.vs/BoomMaster/v16/.suo
+0
-0
Assembly-CSharp.csproj
BoomMaster/Assembly-CSharp.csproj
+1
-0
DemoScenes.unity
BoomMaster/Assets/#A1_Scenes/DemoScenes.unity
+17
-0
BombView.cs
BoomMaster/Assets/#A2_Scripts/Battle/View/BombView.cs
+2
-4
CacheManager.cs
BoomMaster/Assets/#A2_Scripts/Pool/CacheManager.cs
+18
-0
CacheManager.cs.meta
BoomMaster/Assets/#A2_Scripts/Pool/CacheManager.cs.meta
+11
-0
No files found.
BoomMaster/.vs/BoomMaster/v16/.suo
View file @
443bc7d7
No preview for this file type
BoomMaster/Assembly-CSharp.csproj
View file @
443bc7d7
...
...
@@ -103,6 +103,7 @@
<Compile
Include=
"Assets\#A2_Scripts\Manager\PassLevelChecker.cs"
/>
<Compile
Include=
"Assets\#A2_Scripts\Manager\SurfacePoint.cs"
/>
<Compile
Include=
"Assets\#A2_Scripts\PlayerPrefs\LocalRecord.cs"
/>
<Compile
Include=
"Assets\#A2_Scripts\Pool\CacheManager.cs"
/>
<Compile
Include=
"Assets\#A2_Scripts\Pool\Pool.cs"
/>
<Compile
Include=
"Assets\#A2_Scripts\Pool\PoolManager.cs"
/>
<Compile
Include=
"Assets\#A2_Scripts\Projector\SetProjectorToShader.cs"
/>
...
...
BoomMaster/Assets/#A1_Scenes/DemoScenes.unity
View file @
443bc7d7
...
...
@@ -290,6 +290,7 @@ GameObject:
-
component
:
{
fileID
:
1872965181
}
-
component
:
{
fileID
:
1872965183
}
-
component
:
{
fileID
:
1872965182
}
-
component
:
{
fileID
:
1872965184
}
m_Layer
:
0
m_Name
:
GameServices
m_TagString
:
Untagged
...
...
@@ -336,6 +337,22 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
ff376a18ea419e546ba78667f1b5c6b3
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
---
!u!114
&1872965184
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1872965180
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
edb0d13b66926534795d037f8ffc70e4
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_bombEffectObj
:
{
fileID
:
1700217648693119091
,
guid
:
c8e49c3b7567ba44c9434bbb6049f364
,
type
:
3
}
m_rayfireBombObj
:
{
fileID
:
7079061562166580387
,
guid
:
6494bd2f9be30d54ab414db21e0d1beb
,
type
:
3
}
---
!u!114
&6598198701804661606
stripped
MonoBehaviour
:
m_CorrespondingSourceObject
:
{
fileID
:
6064464677632144694
,
guid
:
919382978f5e2684ba83e6daf6491458
,
...
...
BoomMaster/Assets/#A2_Scripts/Battle/View/BombView.cs
View file @
443bc7d7
...
...
@@ -6,8 +6,6 @@ using RayFire;
public
class
BombView
:
MonoBehaviour
{
public
GameObject
m_bombParticleObj
;
//炸弹粒子
public
GameObject
m_bombEffectObj
;
//炸弹特效
public
RayfireBomb
m_rayfireBomb
;
//炸弹预设
private
RayfireBomb
m_curBomb
;
//当前的炸弹
private
GameObject
m_curBombEffect
;
//当前炸弹特效
...
...
@@ -28,7 +26,7 @@ public class BombView : MonoBehaviour
//开始炸
public
void
StartBomb
()
{
m_curBombEffect
=
PoolManager
.
Instance
.
GetObjectFromPool
(
m_
bombEffectObj
);
m_curBombEffect
=
PoolManager
.
Instance
.
GetObjectFromPool
(
CacheManager
.
Instance
.
bombEffectObj
);
m_curBombEffect
.
transform
.
position
=
m_curBomb
.
transform
.
position
;
m_curBomb
?.
Explode
(
0
);
m_curBomb
.
gameObject
.
SetActive
(
false
);
...
...
@@ -72,7 +70,7 @@ public class BombView : MonoBehaviour
{
if
(
hit
.
collider
.
tag
==
"Target"
&&
m_bCanBePlace
)
{
GameObject
go
=
PoolManager
.
Instance
.
GetObjectFromPool
(
m_rayfireBomb
.
gameObject
);
GameObject
go
=
PoolManager
.
Instance
.
GetObjectFromPool
(
CacheManager
.
Instance
.
rayfireBombObj
);
go
.
transform
.
position
=
hit
.
point
;
SetBomb
(
go
.
GetComponent
<
RayfireBomb
>());
BattleCtrl
.
instance
.
battleUI
.
SetBomb
();
...
...
BoomMaster/Assets/#A2_Scripts/Pool/CacheManager.cs
0 → 100644
View file @
443bc7d7
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
CacheManager
:
MonoBehaviour
{
[
SerializeField
]
private
GameObject
m_bombEffectObj
;
//炸弹特效
[
SerializeField
]
private
GameObject
m_rayfireBombObj
;
//炸弹预设
public
GameObject
bombEffectObj
=>
m_bombEffectObj
;
public
GameObject
rayfireBombObj
=>
m_rayfireBombObj
;
public
static
CacheManager
Instance
=
null
;
void
Awake
()
{
Instance
=
this
;
}
}
BoomMaster/Assets/#A2_Scripts/Pool/CacheManager.cs.meta
0 → 100644
View file @
443bc7d7
fileFormatVersion: 2
guid: edb0d13b66926534795d037f8ffc70e4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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