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
99efbff4
Commit
99efbff4
authored
Oct 13, 2019
by
natonato
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'BS' into ulongcha
parents
2efcc077
1e1153e7
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
9982 additions
and
7987 deletions
+9982
-7987
bullet_impact_body_thump_02.wav.meta
...ers/Assets/Audio/SFX/bullet_impact_body_thump_02.wav.meta
+1
-1
bullet_impact_concrete_brick_01.wav.meta
...Assets/Audio/SFX/bullet_impact_concrete_brick_01.wav.meta
+1
-1
bullet_impact_metal_heavy_08.wav.meta
...rs/Assets/Audio/SFX/bullet_impact_metal_heavy_08.wav.meta
+1
-1
dagger_rr_1.wav.meta
Grapplers/Assets/Audio/SFX/dagger_rr_1.wav.meta
+1
-1
dagger_rr_2.wav.meta
Grapplers/Assets/Audio/SFX/dagger_rr_2.wav.meta
+1
-1
dagger_rr_3.wav.meta
Grapplers/Assets/Audio/SFX/dagger_rr_3.wav.meta
+1
-1
gun.wav.meta
Grapplers/Assets/Audio/SFX/gun.wav.meta
+1
-1
Player.physicMaterial
Grapplers/Assets/Materials/Player.physicMaterial
+14
-0
Player.physicMaterial.meta
Grapplers/Assets/Materials/Player.physicMaterial.meta
+8
-0
Player.prefab
Grapplers/Assets/Prefabs/Player.prefab
+6568
-0
Player.prefab.meta
Grapplers/Assets/Prefabs/Player.prefab.meta
+7
-0
StartTimeline.playable
Grapplers/Assets/Prefabs/StartTimeline.playable
+521
-0
StartTimeline.playable.meta
Grapplers/Assets/Prefabs/StartTimeline.playable.meta
+8
-0
ReadySignal.signal
Grapplers/Assets/ReadySignal.signal
+14
-0
ReadySignal.signal.meta
Grapplers/Assets/ReadySignal.signal.meta
+8
-0
Ingame.unity
Grapplers/Assets/Scenes/Ingame.unity
+2687
-7940
Mapwork.unity
Grapplers/Assets/Scenes/Mapwork.unity
+1
-0
Main Camera Profile.asset
.../Assets/Scenes/Mapwork_Profiles/Main Camera Profile.asset
+30
-1
CameraController.cs
Grapplers/Assets/Scripts/CameraController.cs
+2
-0
IngameUIManager.cs
Grapplers/Assets/Scripts/IngameUIManager.cs
+10
-0
PlayerController.cs
Grapplers/Assets/Scripts/PlayerController.cs
+45
-20
WeaponBehaviour.cs
Grapplers/Assets/Scripts/WeaponBehaviour.cs
+29
-18
StartSignal.signal
Grapplers/Assets/StartSignal.signal
+14
-0
StartSignal.signal.meta
Grapplers/Assets/StartSignal.signal.meta
+8
-0
TagManager.asset
Grapplers/ProjectSettings/TagManager.asset
+1
-1
No files found.
Grapplers/Assets/Audio/SFX/bullet_impact_body_thump_02.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
4a53b7140d8804d48902cc8b4126bfcb
guid:
f987a037ba06e484c8db4d5ae010f697
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Audio/SFX/bullet_impact_concrete_brick_01.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
a187624ea6c57db43ac585ca043dade4
guid:
c221eaf8dc711ad4993c76f0d2e8552e
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Audio/SFX/bullet_impact_metal_heavy_08.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
f02bab0c28ab1334b8e764bf2769b295
guid:
7496b23b2d19dda4d9a81492bae5ab6d
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Audio/SFX/dagger_rr_1.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
24d63e760facb6b48ba2956444fca90e
guid:
57e4a7d0d1a3e834caa7600ebe6832bc
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Audio/SFX/dagger_rr_2.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
11fcf8cb69c44d747b865748207ce233
guid:
a38e743645d4cfd46a7ab3c137a738fa
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Audio/SFX/dagger_rr_3.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
64410a7adb1f1464a905cc4d6f1687c3
guid:
41741eca352ec594d92c5b669c6ab279
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Audio/SFX/gun.wav.meta
View file @
99efbff4
fileFormatVersion: 2
fileFormatVersion: 2
guid:
c188195679b510c47a16390d501f813c
guid:
3def6dd83cd1bfa44be7b17626eced69
AudioImporter:
AudioImporter:
externalObjects: {}
externalObjects: {}
serializedVersion: 6
serializedVersion: 6
...
...
Grapplers/Assets/Materials/Player.physicMaterial
0 → 100644
View file @
99efbff4
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!134
&13400000
PhysicMaterial
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
Player
dynamicFriction
:
1
staticFriction
:
1
bounciness
:
0
frictionCombine
:
0
bounceCombine
:
0
Grapplers/Assets/Materials/Player.physicMaterial.meta
0 → 100644
View file @
99efbff4
fileFormatVersion: 2
guid: f529349e6ff9028458dcf46cb375eb07
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Prefabs/Player.prefab
0 → 100644
View file @
99efbff4
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Prefabs/Player.prefab.meta
0 → 100644
View file @
99efbff4
fileFormatVersion: 2
guid: d06de160369998643b438095a9d8244e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Prefabs/StartTimeline.playable
0 → 100644
View file @
99efbff4
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Prefabs/StartTimeline.playable.meta
0 → 100644
View file @
99efbff4
fileFormatVersion: 2
guid: 65c30e43583fa9d49956b1775a871385
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/ReadySignal.signal
0 → 100644
View file @
99efbff4
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!114
&11400000
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
0
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
d6fa2d92fc1b3f34da284357edf89c3b
,
type
:
3
}
m_Name
:
ReadySignal
m_EditorClassIdentifier
:
Grapplers/Assets/ReadySignal.signal.meta
0 → 100644
View file @
99efbff4
fileFormatVersion: 2
guid: 0242a934515cff642a78ec15209a3ba5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scenes/Ingame.unity
View file @
99efbff4
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Scenes/Mapwork.unity
View file @
99efbff4
...
@@ -17883,6 +17883,7 @@ MonoBehaviour:
...
@@ -17883,6 +17883,7 @@ MonoBehaviour:
comboText
:
{
fileID
:
1582354879
}
comboText
:
{
fileID
:
1582354879
}
damageText
:
{
fileID
:
968624425
}
damageText
:
{
fileID
:
968624425
}
OutOfMapWarningUI
:
{
fileID
:
204903075
}
OutOfMapWarningUI
:
{
fileID
:
204903075
}
distanceText
:
{
fileID
:
0
}
---
!u!114
&1741517729
---
!u!114
&1741517729
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Grapplers/Assets/Scenes/Mapwork_Profiles/Main Camera Profile.asset
View file @
99efbff4
...
@@ -18,7 +18,7 @@ MonoBehaviour:
...
@@ -18,7 +18,7 @@ MonoBehaviour:
value
:
1
value
:
1
intensity
:
intensity
:
overrideState
:
1
overrideState
:
1
value
:
1
7.69
value
:
1
0
threshold
:
threshold
:
overrideState
:
0
overrideState
:
0
value
:
1
value
:
1
...
@@ -1380,6 +1380,34 @@ MonoBehaviour:
...
@@ -1380,6 +1380,34 @@ MonoBehaviour:
sampleCount
:
sampleCount
:
overrideState
:
1
overrideState
:
1
value
:
5
value
:
5
---
!u!114
&-7653435643296087632
MonoBehaviour
:
m_ObjectHideFlags
:
3
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
0
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
556797029e73b2347956b6579e77e05b
,
type
:
3
}
m_Name
:
DepthOfField
m_EditorClassIdentifier
:
active
:
1
enabled
:
overrideState
:
1
value
:
1
focusDistance
:
overrideState
:
1
value
:
5
aperture
:
overrideState
:
1
value
:
7.6
focalLength
:
overrideState
:
1
value
:
67
kernelSize
:
overrideState
:
1
value
:
0
---
!u!114
&11400000
---
!u!114
&11400000
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -1397,6 +1425,7 @@ MonoBehaviour:
...
@@ -1397,6 +1425,7 @@ MonoBehaviour:
-
{
fileID
:
-7753695407939056566
}
-
{
fileID
:
-7753695407939056566
}
-
{
fileID
:
-8621508592174753373
}
-
{
fileID
:
-8621508592174753373
}
-
{
fileID
:
4882075946469032659
}
-
{
fileID
:
4882075946469032659
}
-
{
fileID
:
-7653435643296087632
}
---
!u!114
&4882075946469032659
---
!u!114
&4882075946469032659
MonoBehaviour
:
MonoBehaviour
:
m_ObjectHideFlags
:
3
m_ObjectHideFlags
:
3
...
...
Grapplers/Assets/Scripts/CameraController.cs
View file @
99efbff4
...
@@ -26,6 +26,8 @@ public class CameraController : MonoBehaviour
...
@@ -26,6 +26,8 @@ public class CameraController : MonoBehaviour
private
void
Start
()
private
void
Start
()
{
{
cam
=
GetComponent
<
Camera
>();
cam
=
GetComponent
<
Camera
>();
currentX
=
0
;
currentY
=
0
;
}
}
private
void
Update
()
private
void
Update
()
...
...
Grapplers/Assets/Scripts/IngameUIManager.cs
View file @
99efbff4
...
@@ -39,6 +39,8 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
...
@@ -39,6 +39,8 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
[
SerializeField
]
[
SerializeField
]
private
Text
OutOfMapWarningUI
;
private
Text
OutOfMapWarningUI
;
[
SerializeField
]
private
Text
distanceText
;
public
void
UpdateTargetLockedUIs
(
Vector3
[]
pos
)
public
void
UpdateTargetLockedUIs
(
Vector3
[]
pos
)
{
{
...
@@ -151,4 +153,12 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
...
@@ -151,4 +153,12 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
else
else
OutOfMapWarningUI
.
text
=
string
.
Format
(
"{0:F1}"
,
remainTime
);
OutOfMapWarningUI
.
text
=
string
.
Format
(
"{0:F1}"
,
remainTime
);
}
}
public
void
UpdateDistanceUI
(
float
distance
)
{
if
(
distance
<
0
)
distanceText
.
text
=
""
;
else
distanceText
.
text
=
string
.
Format
(
"{0:F1}"
,
distance
)
+
"m"
;
;
}
}
}
Grapplers/Assets/Scripts/PlayerController.cs
View file @
99efbff4
...
@@ -2,33 +2,33 @@
...
@@ -2,33 +2,33 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
[
RequireComponent
(
typeof
(
CharacterController
))]
public
class
PlayerController
:
MonoBehaviour
public
class
PlayerController
:
MonoBehaviour
{
{
public
float
distance
=
10.0f
;
public
float
distance
=
10.0f
;
float
velocityY
=
0.0f
;
float
velocityY
=
0.0f
;
const
float
gravity
=
9.8f
;
const
float
gravity
=
9.8f
;
public
HookBehaviour
hook
;
public
HookBehaviour
hook
;
private
Rigidbody
rb
;
private
Rigidbody
rb
;
private
CapsuleCollider
col
;
private
CapsuleCollider
col
;
private
DistanceJoint3D
joint
;
private
DistanceJoint3D
joint
;
private
bool
isWired
;
private
bool
isWired
;
private
float
movement
;
private
Animator
animator
;
private
float
movement
;
private
Animator
animator
;
[
SerializeField
]
[
SerializeField
]
private
Transform
groundChecker
;
private
Transform
groundChecker
;
public
LayerMask
groundMask
;
public
LayerMask
groundMask
;
private
bool
IsGrounded
private
bool
IsGrounded
{
{
get
{
get
{
return
Physics
.
OverlapSphere
(
groundChecker
.
position
,
0.2f
,
groundMask
).
Length
>
0
;
RaycastHit
hit
;
return
Physics
.
SphereCast
(
transform
.
position
,
col
.
radius
/
2
,
Vector3
.
down
,
out
hit
,
col
.
bounds
.
extents
.
y
+
0.5f
,
groundMask
);
}
}
}
}
...
@@ -55,9 +55,10 @@ public class PlayerController : MonoBehaviour
...
@@ -55,9 +55,10 @@ public class PlayerController : MonoBehaviour
Gizmos
.
color
=
Color
.
red
;
Gizmos
.
color
=
Color
.
red
;
Gizmos
.
DrawLine
(
transform
.
position
,
Camera
.
main
.
transform
.
forward
.
normalized
*
200
);
Gizmos
.
DrawLine
(
transform
.
position
,
Camera
.
main
.
transform
.
forward
.
normalized
*
200
);
col
=
GetComponent
<
CapsuleCollider
>();
if
(
IsGrounded
)
if
(
IsGrounded
)
Gizmos
.
color
=
Color
.
green
;
Gizmos
.
color
=
Color
.
green
;
Gizmos
.
DrawSphere
(
groundChecker
.
position
,
0.1f
);
Gizmos
.
DrawSphere
(
transform
.
position
+
Vector3
.
down
*
(
col
.
bounds
.
extents
.
y
+
0.05f
)
,
0.1f
);
}
}
#endif
#endif
...
@@ -71,9 +72,6 @@ public class PlayerController : MonoBehaviour
...
@@ -71,9 +72,6 @@ public class PlayerController : MonoBehaviour
movement
=
0.0f
;
movement
=
0.0f
;
animator
=
GetComponentInChildren
<
Animator
>();
animator
=
GetComponentInChildren
<
Animator
>();
//col.enabled = !IsGrounded;
//cc.enabled = IsGrounded;
MaxHealth
=
Health
=
100
;
MaxHealth
=
Health
=
100
;
}
}
private
void
Update
()
private
void
Update
()
...
@@ -83,7 +81,15 @@ public class PlayerController : MonoBehaviour
...
@@ -83,7 +81,15 @@ public class PlayerController : MonoBehaviour
Animate
(
vertical
,
horizontal
);
Animate
(
vertical
,
horizontal
);
if
(
Input
.
GetMouseButtonDown
(
1
))
RaycastHit
hit
;
if
(!
hook
.
gameObject
.
activeSelf
&&
Physics
.
Raycast
(
transform
.
position
,
Camera
.
main
.
transform
.
forward
,
out
hit
,
700
))
{
IngameUIManager
.
inst
.
UpdateDistanceUI
(
Vector3
.
Distance
(
transform
.
position
,
hit
.
point
));
}
else
IngameUIManager
.
inst
.
UpdateDistanceUI
(-
1
);
if
(
Input
.
GetMouseButtonDown
(
1
))
{
{
if
(!
hook
.
gameObject
.
activeSelf
)
if
(!
hook
.
gameObject
.
activeSelf
)
{
{
...
@@ -95,16 +101,21 @@ public class PlayerController : MonoBehaviour
...
@@ -95,16 +101,21 @@ public class PlayerController : MonoBehaviour
if
(
IsGrounded
)
if
(
IsGrounded
)
{
{
rb
.
velocity
=
(
horizontal
*
transform
.
right
+
vertical
*
transform
.
forward
).
normalized
*
10.0f
;
//rb.velocity = Vector3.zero;
transform
.
position
+=
(
horizontal
*
transform
.
right
+
vertical
*
transform
.
forward
).
normalized
*
10.0f
*
Time
.
deltaTime
;
//rb.velocity = (horizontal * transform.right + vertical * transform.forward).normalized * 10.0f;
if
(
Input
.
GetButtonDown
(
"Jump"
))
if
(
Input
.
GetButtonDown
(
"Jump"
))
rb
.
velocity
+=
new
Vector3
(
0
,
5
-
rb
.
velocity
.
y
,
0
);
{
rb
.
velocity
=
(
horizontal
*
transform
.
right
+
vertical
*
transform
.
forward
).
normalized
*
5.0f
;
rb
.
velocity
+=
new
Vector3
(
0
,
10
-
rb
.
velocity
.
y
,
0
);
}
}
}
else
else
{
{
if
(
joint
.
enabled
)
if
(
joint
.
enabled
)
joint
.
moveDelta
=
(
horizontal
*
transform
.
right
+
vertical
*
transform
.
forward
).
normalized
*
30.0f
;
joint
.
moveDelta
=
(
horizontal
*
transform
.
right
+
vertical
*
transform
.
forward
).
normalized
*
30.0f
;
else
else
rb
.
AddForce
(
horizontal
*
Camera
.
main
.
transform
.
right
+
vertical
*
Camera
.
main
.
transform
.
forwar
d
*
10.0f
);
rb
.
AddForce
(
(
horizontal
*
transform
.
right
+
vertical
*
transform
.
forward
).
normalize
d
*
10.0f
);
}
}
if
(
MapManager
.
inst
.
IsOutOfMapBounds
(
transform
.
position
))
if
(
MapManager
.
inst
.
IsOutOfMapBounds
(
transform
.
position
))
...
@@ -128,6 +139,20 @@ public class PlayerController : MonoBehaviour
...
@@ -128,6 +139,20 @@ public class PlayerController : MonoBehaviour
}
}
}
}
private
void
FixedUpdate
()
{
/*
if (IsGrounded)
{
RaycastHit hit;
Debug.Log(Physics.Raycast(transform.position, Vector3.down, out hit, groundMask));
Debug.Log(Physics.gravity + " * " + hit.normal + " = " + Vector3.Dot(Physics.gravity, hit.normal));
//Debug.Log(Physics.gravity + Physics.gravity * Vector3.Dot(Physics.gravity, hit.normal));
rb.AddForce(Physics.gravity + Physics.gravity * Vector3.Dot(Physics.gravity, hit.normal));
}
*/
}
private
void
FireHook
()
private
void
FireHook
()
{
{
joint
.
enabled
=
false
;
joint
.
enabled
=
false
;
...
...
Grapplers/Assets/Scripts/WeaponBehaviour.cs
View file @
99efbff4
...
@@ -24,19 +24,34 @@ public class WeaponBehaviour : MonoBehaviour
...
@@ -24,19 +24,34 @@ public class WeaponBehaviour : MonoBehaviour
private
ParticleSystem
knifeEffect
;
private
ParticleSystem
knifeEffect
;
[
SerializeField
]
[
SerializeField
]
private
LayerMask
enemyMask
,
blockMask
;
private
LayerMask
enemyMask
,
blockMask
;
private
IWeapon
weapon
;
private
IWeapon
weapon
{
get
{
return
weaponList
[
weaponIndex
];
}
}
private
List
<
IWeapon
>
weaponList
=
new
List
<
IWeapon
>();
private
int
weaponIndex
=
0
;
[
SerializeField
]
private
List
<
RoundRobin
>
weaponAudioRRs
=
new
List
<
RoundRobin
>();
private
void
Start
()
private
void
Start
()
{
{
weapon
=
new
Gun
(
gunDamage
,
gunRange
,
bulletEffect
);
IngameUIManager
.
inst
.
UpdateWeaponTypeUI
(
WeaponType
.
GUN
);
IngameUIManager
.
inst
.
UpdateWeaponTypeUI
(
WeaponType
.
GUN
);
weaponList
.
Add
(
new
Gun
(
gunDamage
,
gunRange
,
bulletEffect
));
weaponList
.
Add
(
new
Knife
(
knifeDamage
,
knifeRange
,
bulletEffect
,
transform
));
}
}
private
void
Update
()
private
void
Update
()
{
{
weapon
.
UpdateWeapon
();
foreach
(
var
weapon
in
weaponList
)
{
weapon
.
UpdateWeapon
();
}
Enemy
[]
hitEnemies
=
weapon
.
WeaponLockOn
(
enemyMask
,
blockMask
);
Enemy
[]
hitEnemies
=
weapon
.
WeaponLockOn
(
enemyMask
,
blockMask
);
weapon
.
UseWeapon
(
hitEnemies
);
if
(
weapon
.
UseWeapon
(
hitEnemies
))
{
weaponAudioRRs
[
weaponIndex
].
Play
();
}
if
(
Input
.
GetKeyDown
(
KeyCode
.
Tab
))
if
(
Input
.
GetKeyDown
(
KeyCode
.
Tab
))
{
{
...
@@ -50,23 +65,15 @@ public class WeaponBehaviour : MonoBehaviour
...
@@ -50,23 +65,15 @@ public class WeaponBehaviour : MonoBehaviour
private
void
SwapWeapon
()
private
void
SwapWeapon
()
{
{
if
(
weapon
.
GetType
()
==
typeof
(
Gun
))
weaponIndex
=
(
weaponIndex
+
1
)
%
2
;
{
IngameUIManager
.
inst
.
UpdateWeaponTypeUI
((
WeaponType
)
weaponIndex
);
weapon
=
new
Knife
(
knifeDamage
,
knifeRange
,
bulletEffect
,
transform
);
IngameUIManager
.
inst
.
UpdateWeaponTypeUI
(
WeaponType
.
KNIFE
);
}
else
{
weapon
=
new
Gun
(
gunDamage
,
gunRange
,
bulletEffect
);
IngameUIManager
.
inst
.
UpdateWeaponTypeUI
(
WeaponType
.
GUN
);
}
}
}
}
}
public
interface
IWeapon
public
interface
IWeapon
{
{
void
UseWeapon
(
Enemy
[]
hitEnemies
);
bool
UseWeapon
(
Enemy
[]
hitEnemies
);
void
UseSkill
();
void
UseSkill
();
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
);
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
);
void
UpdateWeapon
();
void
UpdateWeapon
();
...
@@ -89,10 +96,10 @@ public class Gun : IWeapon
...
@@ -89,10 +96,10 @@ public class Gun : IWeapon
this
.
effect
=
effect
;
this
.
effect
=
effect
;
}
}
public
void
UseWeapon
(
Enemy
[]
hitEnemies
)
public
bool
UseWeapon
(
Enemy
[]
hitEnemies
)
{
{
if
(
timer
>
0
)
if
(
timer
>
0
)
return
;
return
false
;
if
(
Input
.
GetMouseButton
(
0
))
if
(
Input
.
GetMouseButton
(
0
))
{
{
effect
.
transform
.
rotation
=
Camera
.
main
.
transform
.
rotation
;
effect
.
transform
.
rotation
=
Camera
.
main
.
transform
.
rotation
;
...
@@ -103,7 +110,9 @@ public class Gun : IWeapon
...
@@ -103,7 +110,9 @@ public class Gun : IWeapon
IngameUIManager
.
inst
.
UpdateComboUI
(
weaponDamage
);
IngameUIManager
.
inst
.
UpdateComboUI
(
weaponDamage
);
}
}
timer
=
gunShotInterval
;
timer
=
gunShotInterval
;
return
true
;
}
}
return
false
;
}
}
public
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
)
public
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
)
...
@@ -156,7 +165,7 @@ public class Knife : IWeapon
...
@@ -156,7 +165,7 @@ public class Knife : IWeapon
this
.
player
=
player
;
this
.
player
=
player
;
}
}
public
void
UseWeapon
(
Enemy
[]
hitEnemies
)
public
bool
UseWeapon
(
Enemy
[]
hitEnemies
)
{
{
if
(
Input
.
GetMouseButtonDown
(
0
))
if
(
Input
.
GetMouseButtonDown
(
0
))
{
{
...
@@ -169,7 +178,9 @@ public class Knife : IWeapon
...
@@ -169,7 +178,9 @@ public class Knife : IWeapon
if
(
enemy
.
IsDead
)
if
(
enemy
.
IsDead
)
skillTimer
=
0
;
skillTimer
=
0
;
}
}
return
true
;
}
}
return
false
;
}
}
public
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
)
public
Enemy
[]
WeaponLockOn
(
LayerMask
enemyMask
,
LayerMask
blockMask
)
...
...
Grapplers/Assets/StartSignal.signal
0 → 100644
View file @
99efbff4
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!114
&11400000
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
0
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
d6fa2d92fc1b3f34da284357edf89c3b
,
type
:
3
}
m_Name
:
StartSignal
m_EditorClassIdentifier
:
Grapplers/Assets/StartSignal.signal.meta
0 → 100644
View file @
99efbff4
fileFormatVersion: 2
guid: 38706e2356d0dca40a5866d8d9df87a2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Grapplers/ProjectSettings/TagManager.asset
View file @
99efbff4
...
@@ -18,7 +18,7 @@ TagManager:
...
@@ -18,7 +18,7 @@ TagManager:
-
PlayerPassable
-
PlayerPassable
-
Enemy
-
Enemy
-
Terrain
-
Terrain
-
-
PostProcessing
-
-
-
-
-
-
...
...
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