Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WidowmakerSimulator
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
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
15박보승
WidowmakerSimulator
Commits
722d5b28
Commit
722d5b28
authored
Sep 26, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
적과 적 공격 간단히 구현
parent
6aba62ef
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5028 additions
and
13 deletions
+5028
-13
BloodEffect.prefab
Grapplers/Assets/Prefabs/BloodEffect.prefab
+4755
-0
BloodEffect.prefab.meta
Grapplers/Assets/Prefabs/BloodEffect.prefab.meta
+7
-0
SampleScene.unity
Grapplers/Assets/Scenes/SampleScene.unity
+230
-2
Enemy.cs
Grapplers/Assets/Scripts/Enemy.cs
+35
-10
PlayerController.cs
Grapplers/Assets/Scripts/PlayerController.cs
+1
-1
No files found.
Grapplers/Assets/Prefabs/BloodEffect.prefab
0 → 100644
View file @
722d5b28
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Grapplers/Assets/Prefabs/BloodEffect.prefab.meta
0 → 100644
View file @
722d5b28
fileFormatVersion: 2
guid: 59619ab33246ea34496792e427cf9d6e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scenes/SampleScene.unity
View file @
722d5b28
...
...
@@ -451,6 +451,75 @@ Transform:
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
13
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1001
&167354114
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
1219641835
}
m_Modifications
:
-
target
:
{
fileID
:
4933374738297728470
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_Name
value
:
BloodEffect
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
-0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
-90
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
---
!u!1
&245057446
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1196,6 +1265,8 @@ GameObject:
-
component
:
{
fileID
:
850429688
}
-
component
:
{
fileID
:
850429687
}
-
component
:
{
fileID
:
850429686
}
-
component
:
{
fileID
:
850429690
}
-
component
:
{
fileID
:
850429691
}
m_Layer
:
10
m_Name
:
Cylinder
m_TagString
:
Untagged
...
...
@@ -1273,10 +1344,41 @@ Transform:
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-0.01939517
,
y
:
-4.39812
,
z
:
15.06
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
1345154481
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
17
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&850429690
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
850429685
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
d71b4c543a96dc645a771f6d62a28989
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
health
:
100
bloodEffect
:
{
fileID
:
1345154483
}
---
!u!54
&850429691
Rigidbody
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
850429685
}
serializedVersion
:
2
m_Mass
:
1
m_Drag
:
0
m_AngularDrag
:
0.05
m_UseGravity
:
0
m_IsKinematic
:
0
m_Interpolate
:
0
m_Constraints
:
0
m_CollisionDetection
:
0
---
!u!1
&887314838
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1695,6 +1797,8 @@ GameObject:
-
component
:
{
fileID
:
1219641834
}
-
component
:
{
fileID
:
1219641833
}
-
component
:
{
fileID
:
1219641832
}
-
component
:
{
fileID
:
1219641836
}
-
component
:
{
fileID
:
1219641837
}
m_Layer
:
10
m_Name
:
Cylinder (1)
m_TagString
:
Untagged
...
...
@@ -1772,10 +1876,53 @@ Transform:
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
-0.01939517
,
y
:
-1.48
,
z
:
15.06
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
1443389649
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
18
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1219641836
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1219641831
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
d71b4c543a96dc645a771f6d62a28989
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
health
:
100
bloodEffect
:
{
fileID
:
1443389647
}
---
!u!54
&1219641837
Rigidbody
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1219641831
}
serializedVersion
:
2
m_Mass
:
1
m_Drag
:
0
m_AngularDrag
:
0.05
m_UseGravity
:
0
m_IsKinematic
:
0
m_Interpolate
:
0
m_Constraints
:
0
m_CollisionDetection
:
0
---
!u!4
&1345154481
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
4933374739104284774
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!198
&1345154483
stripped
ParticleSystem
:
m_CorrespondingSourceObject
:
{
fileID
:
4933374738297728469
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
4933374739104284774
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1353089528
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1951,6 +2098,18 @@ Transform:
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
16
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!198
&1443389647
stripped
ParticleSystem
:
m_CorrespondingSourceObject
:
{
fileID
:
4933374738297728469
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
167354114
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!4
&1443389649
stripped
Transform
:
m_CorrespondingSourceObject
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
m_PrefabInstance
:
{
fileID
:
167354114
}
m_PrefabAsset
:
{
fileID
:
0
}
---
!u!1
&1838386149
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -2469,3 +2628,72 @@ Transform:
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
9
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1001
&4933374739104284774
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
850429689
}
m_Modifications
:
-
target
:
{
fileID
:
4933374738297728470
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_Name
value
:
BloodEffect
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
-90
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
4933374738297728471
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
59619ab33246ea34496792e427cf9d6e
,
type
:
3
}
Grapplers/Assets/Scripts/Enemy.cs
View file @
722d5b28
...
...
@@ -4,15 +4,40 @@ using UnityEngine;
public
class
Enemy
:
MonoBehaviour
{
// Start is called before the first frame update
void
Start
()
{
}
[
SerializeField
]
private
int
health
;
// Update is called once per frame
void
Update
()
{
}
private
MeshRenderer
meshRenderer
;
[
SerializeField
]
private
ParticleSystem
bloodEffect
;
private
void
Start
()
{
meshRenderer
=
GetComponent
<
MeshRenderer
>();
}
public
void
GetDamaged
(
int
dmg
)
{
health
-=
dmg
;
StartCoroutine
(
DamageRoutine
());
if
(
health
<=
0
)
{
Dead
();
}
}
private
void
Dead
()
{
Debug
.
Log
(
gameObject
+
" : DEAD!"
);
GetComponent
<
Rigidbody
>().
useGravity
=
false
;
GetComponent
<
Collider
>().
enabled
=
false
;
Destroy
(
gameObject
,
5
);
}
private
IEnumerator
DamageRoutine
()
{
bloodEffect
?.
Play
();
yield
return
null
;
}
}
Grapplers/Assets/Scripts/PlayerController.cs
View file @
722d5b28
...
...
@@ -76,7 +76,7 @@ public class PlayerController : MonoBehaviour
{
foreach
(
var
enemyHit
in
enemyHits
)
{
Debug
.
Log
(
enemyHit
.
collider
.
gameObject
);
enemyHit
.
collider
.
GetComponent
<
Enemy
>()?.
GetDamaged
(
1
);
}
}
...
...
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