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
5cf146b9
Commit
5cf146b9
authored
Oct 13, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
게임 클리어/게임 오버/스파이크 구현 + 스킬 소리 버그 디버그
parent
23700f24
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
313 additions
and
7 deletions
+313
-7
Destination.prefab
Grapplers/Assets/Prefabs/Destination.prefab
+107
-0
Destination.prefab.meta
Grapplers/Assets/Prefabs/Destination.prefab.meta
+7
-0
Spike.prefab
Grapplers/Assets/Prefabs/Spike.prefab
+107
-0
Spike.prefab.meta
Grapplers/Assets/Prefabs/Spike.prefab.meta
+7
-0
Destination.cs
Grapplers/Assets/Scripts/Destination.cs
+14
-0
Destination.cs.meta
Grapplers/Assets/Scripts/Destination.cs.meta
+11
-0
GameManager.cs
Grapplers/Assets/Scripts/GameManager.cs
+25
-0
PlayerController.cs
Grapplers/Assets/Scripts/PlayerController.cs
+2
-0
Spike.cs
Grapplers/Assets/Scripts/Spike.cs
+14
-0
Spike.cs.meta
Grapplers/Assets/Scripts/Spike.cs.meta
+11
-0
WeaponBehaviour.cs
Grapplers/Assets/Scripts/WeaponBehaviour.cs
+8
-7
No files found.
Grapplers/Assets/Prefabs/Destination.prefab
0 → 100644
View file @
5cf146b9
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1
&7386042570589735985
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
7318546470173040099
}
-
component
:
{
fileID
:
2831629449019255975
}
-
component
:
{
fileID
:
6069366083396026986
}
-
component
:
{
fileID
:
4364833759171634380
}
-
component
:
{
fileID
:
1619024851106919088
}
m_Layer
:
0
m_Name
:
Destination
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&7318546470173040099
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7386042570589735985
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0.9179742
,
y
:
-2.154938
,
z
:
-2.2592232
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!33
&2831629449019255975
MeshFilter
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7386042570589735985
}
m_Mesh
:
{
fileID
:
10202
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
---
!u!23
&6069366083396026986
MeshRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7386042570589735985
}
m_Enabled
:
1
m_CastShadows
:
1
m_ReceiveShadows
:
1
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
10303
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_ReceiveGI
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
1
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!65
&4364833759171634380
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7386042570589735985
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&1619024851106919088
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7386042570589735985
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
8225955bc035af94fbe9dc842e9fcb14
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
Grapplers/Assets/Prefabs/Destination.prefab.meta
0 → 100644
View file @
5cf146b9
fileFormatVersion: 2
guid: 66283085b8f859848a9ff29aa3a25f85
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Prefabs/Spike.prefab
0 → 100644
View file @
5cf146b9
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1
&8513098832299098376
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
8513098832299098375
}
-
component
:
{
fileID
:
8513098832299098372
}
-
component
:
{
fileID
:
8513098832299098373
}
-
component
:
{
fileID
:
8513098832299098378
}
-
component
:
{
fileID
:
8513098832299098379
}
m_Layer
:
0
m_Name
:
Spike
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&8513098832299098375
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8513098832299098376
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
-8.49
,
z
:
-4.02
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
2.5986
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!33
&8513098832299098372
MeshFilter
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8513098832299098376
}
m_Mesh
:
{
fileID
:
10202
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
---
!u!23
&8513098832299098373
MeshRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8513098832299098376
}
m_Enabled
:
1
m_CastShadows
:
1
m_ReceiveShadows
:
1
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
10303
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_StaticBatchInfo
:
firstSubMesh
:
0
subMeshCount
:
0
m_StaticBatchRoot
:
{
fileID
:
0
}
m_ProbeAnchor
:
{
fileID
:
0
}
m_LightProbeVolumeOverride
:
{
fileID
:
0
}
m_ScaleInLightmap
:
1
m_ReceiveGI
:
1
m_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
1
m_SelectedEditorRenderState
:
3
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!65
&8513098832299098378
BoxCollider
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8513098832299098376
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
1
m_Enabled
:
1
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&8513098832299098379
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8513098832299098376
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
43ce0e1e9023792439f8750c16f19142
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
Grapplers/Assets/Prefabs/Spike.prefab.meta
0 → 100644
View file @
5cf146b9
fileFormatVersion: 2
guid: 89efa167b2aa0c142b4e7291a348826c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scripts/Destination.cs
0 → 100644
View file @
5cf146b9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Destination
:
MonoBehaviour
{
private
void
OnCollisionEnter
(
Collision
collision
)
{
if
(
collision
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Player"
))
{
GameManager
.
inst
.
GameClear
();
}
}
}
Grapplers/Assets/Scripts/Destination.cs.meta
0 → 100644
View file @
5cf146b9
fileFormatVersion: 2
guid: 8225955bc035af94fbe9dc842e9fcb14
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scripts/GameManager.cs
View file @
5cf146b9
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.SceneManagement
;
public
class
GameManager
:
SingletonBehaviour
<
GameManager
>
public
class
GameManager
:
SingletonBehaviour
<
GameManager
>
{
{
...
@@ -19,4 +20,28 @@ public class GameManager : SingletonBehaviour<GameManager>
...
@@ -19,4 +20,28 @@ public class GameManager : SingletonBehaviour<GameManager>
}
}
public
Action
<
float
>
OnMaxHeightChanged
;
public
Action
<
float
>
OnMaxHeightChanged
;
public
void
GameOver
()
{
Debug
.
Log
(
"Game Over!"
);
IngameUIManager
.
inst
.
gameObject
.
SetActive
(
false
);
StartCoroutine
(
GameOverRoutine
());
}
private
IEnumerator
GameOverRoutine
()
{
yield
return
new
WaitForSeconds
(
5
);
SceneManager
.
LoadScene
(
"Ingame"
,
LoadSceneMode
.
Single
);
}
public
void
GameClear
()
{
StartCoroutine
(
GameClearRoutine
());
}
private
IEnumerator
GameClearRoutine
()
{
yield
return
new
WaitForSeconds
(
5
);
SceneManager
.
LoadScene
(
"Main"
,
LoadSceneMode
.
Single
);
}
}
}
Grapplers/Assets/Scripts/PlayerController.cs
View file @
5cf146b9
...
@@ -43,6 +43,8 @@ public class PlayerController : MonoBehaviour
...
@@ -43,6 +43,8 @@ public class PlayerController : MonoBehaviour
{
{
_health
=
value
;
_health
=
value
;
IngameUIManager
.
inst
.
UpdatePlayerHealthUI
(
MaxHealth
,
_health
);
IngameUIManager
.
inst
.
UpdatePlayerHealthUI
(
MaxHealth
,
_health
);
if
(
_health
<=
0
)
GameManager
.
inst
.
GameOver
();
}
}
}
}
...
...
Grapplers/Assets/Scripts/Spike.cs
0 → 100644
View file @
5cf146b9
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Spike
:
MonoBehaviour
{
private
void
OnTriggerEnter
(
Collider
other
)
{
if
(
other
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Player"
))
{
other
.
transform
.
GetComponent
<
PlayerController
>().
GetDamaged
(
10
);
}
}
}
Grapplers/Assets/Scripts/Spike.cs.meta
0 → 100644
View file @
5cf146b9
fileFormatVersion: 2
guid: 43ce0e1e9023792439f8750c16f19142
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scripts/WeaponBehaviour.cs
View file @
5cf146b9
...
@@ -59,8 +59,8 @@ public class WeaponBehaviour : MonoBehaviour
...
@@ -59,8 +59,8 @@ public class WeaponBehaviour : MonoBehaviour
}
}
if
(
Input
.
GetKeyDown
(
KeyCode
.
LeftShift
))
if
(
Input
.
GetKeyDown
(
KeyCode
.
LeftShift
))
{
{
weapon
.
UseSkill
();
if
(
weapon
.
UseSkill
())
weaponAudioRRs
[
weaponIndex
].
Play
();
weaponAudioRRs
[
weaponIndex
].
Play
();
}
}
}
}
...
@@ -75,7 +75,7 @@ public class WeaponBehaviour : MonoBehaviour
...
@@ -75,7 +75,7 @@ public class WeaponBehaviour : MonoBehaviour
public
interface
IWeapon
public
interface
IWeapon
{
{
bool
UseWeapon
(
Enemy
[]
hitEnemies
);
bool
UseWeapon
(
Enemy
[]
hitEnemies
);
void
UseSkill
();
bool
UseSkill
();
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
);
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
);
void
UpdateWeapon
();
void
UpdateWeapon
();
}
}
...
@@ -137,9 +137,9 @@ public class Gun : IWeapon
...
@@ -137,9 +137,9 @@ public class Gun : IWeapon
return
hitEnemies
.
ToArray
();
return
hitEnemies
.
ToArray
();
}
}
public
void
UseSkill
()
public
bool
UseSkill
()
{
{
return
false
;
}
}
public
void
UpdateWeapon
()
public
void
UpdateWeapon
()
...
@@ -205,12 +205,13 @@ public class Knife : IWeapon
...
@@ -205,12 +205,13 @@ public class Knife : IWeapon
return
hitEnemies
.
ToArray
();
return
hitEnemies
.
ToArray
();
}
}
public
void
UseSkill
()
public
bool
UseSkill
()
{
{
if
(
skillTimer
>
0
)
if
(
skillTimer
>
0
)
return
;
return
false
;
GameManager
.
inst
.
StartCoroutine
(
SkillRoutine
());
GameManager
.
inst
.
StartCoroutine
(
SkillRoutine
());
skillTimer
=
skillTimeInterval
;
skillTimer
=
skillTimeInterval
;
return
true
;
}
}
public
void
UpdateWeapon
()
public
void
UpdateWeapon
()
...
...
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