Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tetra-tower
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Oenos
tetra-tower
Commits
cc22d91d
Commit
cc22d91d
authored
Feb 20, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
화살이 벽에 박힘
parent
50afa1b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
bow_arrow.prefab
Assets/Resources/Prefabs/Projectiles/bow_arrow.prefab
+4
-1
AttackProperty.cs
Assets/Scripts/Characters/AttackProperty.cs
+18
-5
No files found.
Assets/Resources/Prefabs/Projectiles/bow_arrow.prefab
View file @
cc22d91d
...
...
@@ -114,7 +114,10 @@ MonoBehaviour:
m_Bits
:
65536
vanishLayer
:
serializedVersion
:
2
m_Bits
:
65792
m_Bits
:
65536
stopLayer
:
serializedVersion
:
2
m_Bits
:
256
attackCombo
:
---
!u!114
&114988624070961888
MonoBehaviour
:
...
...
Assets/Scripts/Characters/AttackProperty.cs
View file @
cc22d91d
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
AttackProperty
:
MonoBehaviour
{
public
class
AttackProperty
:
MonoBehaviour
{
public
float
damage
=
0
;
public
float
knockBackMultiplier
=
1f
;
public
float
[]
debuffTime
=
new
float
[(
int
)
EnemyDebuffCase
.
END_POINTER
];
...
...
@@ -11,6 +11,7 @@ public class AttackProperty : MonoBehaviour{
InventoryManager
inventoryManager
;
public
LayerMask
enemyLayer
;
public
LayerMask
vanishLayer
;
public
LayerMask
stopLayer
;
public
string
attackCombo
;
private
void
Awake
()
...
...
@@ -54,9 +55,21 @@ public class AttackProperty : MonoBehaviour{
effectManager
.
StartEffect
(
0
,
tmpBounds
,
collision
.
bounds
);
}
if
(
projectileType
==
1
&&
(
vanishLayer
==
(
vanishLayer
|
1
<<
collision
.
gameObject
.
layer
)))
if
(
projectileType
==
1
&&
(
vanishLayer
==
(
vanishLayer
|
1
<<
collision
.
gameObject
.
layer
)))
{
Destroy
(
gameObject
);
}
if
(
projectileType
==
1
&&
(
stopLayer
==
(
stopLayer
|
1
<<
collision
.
gameObject
.
layer
)))
{
GetComponent
<
Rigidbody2D
>().
velocity
=
Vector2
.
zero
;
GetComponent
<
Collider2D
>().
enabled
=
false
;
StartCoroutine
(
WaitVanish
(
10f
));
}
}
IEnumerator
WaitVanish
(
float
time
)
{
yield
return
new
WaitForSeconds
(
time
);
Destroy
(
gameObject
);
}
}
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