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
f6675e3d
Commit
f6675e3d
authored
Oct 11, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
콤보 UI 추가
parent
5a2d49ca
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22183 additions
and
955 deletions
+22183
-955
AirplaneEnemy.prefab
Grapplers/Assets/Prefabs/AirplaneEnemy.prefab
+1
-1
Sniper.prefab
Grapplers/Assets/Prefabs/Sniper.prefab
+2
-2
Ingame.unity
Grapplers/Assets/Scenes/Ingame.unity
+20907
-0
Ingame.unity.meta
Grapplers/Assets/Scenes/Ingame.unity.meta
+7
-0
Mapwork.unity
Grapplers/Assets/Scenes/Mapwork.unity
+1234
-942
SampleScene.unity
Grapplers/Assets/Scenes/SampleScene.unity
+1
-1
AirplaneEnemy.cs
Grapplers/Assets/Scripts/Enemy/AirplaneEnemy.cs
+7
-0
Missile.cs
Grapplers/Assets/Scripts/Enemy/Missile.cs
+6
-0
HookBehaviour.cs
Grapplers/Assets/Scripts/HookBehaviour.cs
+3
-1
IngameUIManager.cs
Grapplers/Assets/Scripts/IngameUIManager.cs
+11
-4
PlayerController.cs
Grapplers/Assets/Scripts/PlayerController.cs
+2
-2
WeaponBehaviour.cs
Grapplers/Assets/Scripts/WeaponBehaviour.cs
+2
-2
No files found.
Grapplers/Assets/Prefabs/AirplaneEnemy.prefab
View file @
f6675e3d
...
@@ -110,7 +110,7 @@ Rigidbody:
...
@@ -110,7 +110,7 @@ Rigidbody:
m_UseGravity
:
0
m_UseGravity
:
0
m_IsKinematic
:
0
m_IsKinematic
:
0
m_Interpolate
:
0
m_Interpolate
:
0
m_Constraints
:
0
m_Constraints
:
112
m_CollisionDetection
:
0
m_CollisionDetection
:
0
---
!u!114
&808483076966640904
---
!u!114
&808483076966640904
MonoBehaviour
:
MonoBehaviour
:
...
...
Grapplers/Assets/Prefabs/Sniper.prefab
View file @
f6675e3d
...
@@ -111,7 +111,7 @@ Rigidbody:
...
@@ -111,7 +111,7 @@ Rigidbody:
m_UseGravity
:
1
m_UseGravity
:
1
m_IsKinematic
:
0
m_IsKinematic
:
0
m_Interpolate
:
0
m_Interpolate
:
0
m_Constraints
:
0
m_Constraints
:
112
m_CollisionDetection
:
0
m_CollisionDetection
:
0
---
!u!120
&1585691613636896513
---
!u!120
&1585691613636896513
LineRenderer
:
LineRenderer
:
...
@@ -224,7 +224,7 @@ MonoBehaviour:
...
@@ -224,7 +224,7 @@ MonoBehaviour:
maxHealth
:
10
maxHealth
:
10
curHealth
:
0
curHealth
:
0
attackDamage
:
20
attackDamage
:
20
detectRange
:
6
0
detectRange
:
20
0
moveSpeed
:
0
moveSpeed
:
0
playerMask
:
playerMask
:
serializedVersion
:
2
serializedVersion
:
2
...
...
Grapplers/Assets/Scenes/Ingame.unity
0 → 100644
View file @
f6675e3d
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Scenes/Ingame.unity.meta
0 → 100644
View file @
f6675e3d
fileFormatVersion: 2
guid: 5970430cbb702c44ea45c747247db6ab
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Grapplers/Assets/Scenes/Mapwork.unity
View file @
f6675e3d
This diff is collapsed.
Click to expand it.
Grapplers/Assets/Scenes/SampleScene.unity
View file @
f6675e3d
...
@@ -734,7 +734,7 @@ MonoBehaviour:
...
@@ -734,7 +734,7 @@ MonoBehaviour:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
mapBound
:
mapBound
:
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_Center
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_Extent
:
{
x
:
2000
,
y
:
1000
,
z
:
20
00
}
m_Extent
:
{
x
:
500
,
y
:
500
,
z
:
5
00
}
---
!u!1
&245057446
---
!u!1
&245057446
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Grapplers/Assets/Scripts/Enemy/AirplaneEnemy.cs
View file @
f6675e3d
...
@@ -19,6 +19,13 @@ public class AirplaneEnemy : Enemy
...
@@ -19,6 +19,13 @@ public class AirplaneEnemy : Enemy
};
};
detected
.
StateUpdate
+=
ShotProjectile
;
detected
.
StateUpdate
+=
ShotProjectile
;
detected
.
StateUpdate
+=
delegate
{
if
(!
DetectPlayer
())
{
stateMachine
.
Transtion
(
"idle"
);
}
};
State
[]
states
=
{
idle
,
detected
,
attack
};
State
[]
states
=
{
idle
,
detected
,
attack
};
stateMachine
.
AddNewStates
(
states
);
stateMachine
.
AddNewStates
(
states
);
...
...
Grapplers/Assets/Scripts/Enemy/Missile.cs
View file @
f6675e3d
...
@@ -4,6 +4,12 @@ using UnityEngine;
...
@@ -4,6 +4,12 @@ using UnityEngine;
public
class
Missile
:
Enemy
public
class
Missile
:
Enemy
{
{
protected
override
void
Start
()
{
base
.
Start
();
Destroy
(
gameObject
,
20
);
}
protected
override
void
InitializeStateMachine
()
protected
override
void
InitializeStateMachine
()
{
{
State
idle
=
new
State
(
"idle"
);
State
idle
=
new
State
(
"idle"
);
...
...
Grapplers/Assets/Scripts/HookBehaviour.cs
View file @
f6675e3d
...
@@ -8,6 +8,8 @@ public class HookBehaviour : MonoBehaviour
...
@@ -8,6 +8,8 @@ public class HookBehaviour : MonoBehaviour
private
LineRenderer
lr
;
private
LineRenderer
lr
;
[
SerializeField
]
[
SerializeField
]
private
Transform
player
;
private
Transform
player
;
[
SerializeField
]
private
Transform
hookOrigin
;
[
SerializeField
]
[
SerializeField
]
private
Rigidbody
rb
;
private
Rigidbody
rb
;
...
@@ -31,7 +33,7 @@ public class HookBehaviour : MonoBehaviour
...
@@ -31,7 +33,7 @@ public class HookBehaviour : MonoBehaviour
private
void
Update
()
private
void
Update
()
{
{
lr
.
SetPosition
(
0
,
transform
.
position
);
lr
.
SetPosition
(
0
,
transform
.
position
);
lr
.
SetPosition
(
1
,
player
.
position
);
lr
.
SetPosition
(
1
,
hookOrigin
.
position
);
}
}
private
void
FixedUpdate
()
private
void
FixedUpdate
()
...
...
Grapplers/Assets/Scripts/IngameUIManager.cs
View file @
f6675e3d
...
@@ -127,19 +127,26 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
...
@@ -127,19 +127,26 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
comboUI
.
SetActive
(
true
);
comboUI
.
SetActive
(
true
);
comboText
.
text
=
(
int
.
Parse
(
comboText
.
text
.
Split
(
' '
)[
0
])
+
1
).
ToString
()
+
" Combo!"
;
comboText
.
text
=
(
int
.
Parse
(
comboText
.
text
.
Split
(
' '
)[
0
])
+
1
).
ToString
()
+
" Combo!"
;
damageText
.
text
=
(
int
.
Parse
(
damageText
.
text
)
+
damage
).
ToString
();
damageText
.
text
=
(
int
.
Parse
(
damageText
.
text
)
+
damage
).
ToString
();
disableComboRoutine
=
StartCoroutine
(
Disable
UI
(
comboUI
,
5
));
disableComboRoutine
=
StartCoroutine
(
Disable
ComboUI
(
5
));
}
}
private
IEnumerator
DisableUI
(
GameObject
ui
,
float
sec
)
private
void
ResetComboUI
()
{
comboText
.
text
=
"0 Combo!"
;
damageText
.
text
=
"0"
;
}
private
IEnumerator
DisableComboUI
(
float
sec
)
{
{
yield
return
new
WaitForSeconds
(
sec
);
yield
return
new
WaitForSeconds
(
sec
);
ui
.
SetActive
(
false
);
ResetComboUI
();
comboUI
.
SetActive
(
false
);
}
}
public
void
UpdateOutOfMapWarningUI
(
float
remainTime
)
public
void
UpdateOutOfMapWarningUI
(
float
remainTime
)
{
{
if
(
remainTime
>=
10
)
if
(
remainTime
>=
10
||
remainTime
<=
0
)
OutOfMapWarningUI
.
text
=
""
;
OutOfMapWarningUI
.
text
=
""
;
else
else
OutOfMapWarningUI
.
text
=
string
.
Format
(
"{0:F1}"
,
remainTime
);
OutOfMapWarningUI
.
text
=
string
.
Format
(
"{0:F1}"
,
remainTime
);
...
...
Grapplers/Assets/Scripts/PlayerController.cs
View file @
f6675e3d
...
@@ -28,7 +28,7 @@ public class PlayerController : MonoBehaviour
...
@@ -28,7 +28,7 @@ public class PlayerController : MonoBehaviour
private
bool
IsGrounded
private
bool
IsGrounded
{
{
get
{
get
{
return
Physics
.
OverlapSphere
(
groundChecker
.
position
,
0.
0
1f
,
groundMask
).
Length
>
0
;
return
Physics
.
OverlapSphere
(
groundChecker
.
position
,
0.1f
,
groundMask
).
Length
>
0
;
}
}
}
}
...
@@ -55,7 +55,7 @@ public class PlayerController : MonoBehaviour
...
@@ -55,7 +55,7 @@ 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
);
if
(
!
IsGrounded
)
if
(
IsGrounded
)
Gizmos
.
color
=
Color
.
green
;
Gizmos
.
color
=
Color
.
green
;
Gizmos
.
DrawSphere
(
groundChecker
.
position
,
0.1f
);
Gizmos
.
DrawSphere
(
groundChecker
.
position
,
0.1f
);
}
}
...
...
Grapplers/Assets/Scripts/WeaponBehaviour.cs
View file @
f6675e3d
...
@@ -218,14 +218,14 @@ public class Knife : IWeapon
...
@@ -218,14 +218,14 @@ public class Knife : IWeapon
Physics
.
Raycast
(
ray
,
out
hit
,
dashDistance
,
player
.
GetComponent
<
PlayerController
>().
groundMask
);
Physics
.
Raycast
(
ray
,
out
hit
,
dashDistance
,
player
.
GetComponent
<
PlayerController
>().
groundMask
);
Vector3
dest
=
hit
.
collider
!=
null
?
hit
.
point
-
Camera
.
main
.
transform
.
forward
*
0.5f
:
player
.
position
+
Camera
.
main
.
transform
.
forward
*
dashDistance
;
Vector3
dest
=
hit
.
collider
!=
null
?
hit
.
point
-
Camera
.
main
.
transform
.
forward
*
0.5f
:
player
.
position
+
Camera
.
main
.
transform
.
forward
*
dashDistance
;
player
.
GetComponent
<
MeshRenderer
>().
enabled
=
false
;
//
player.GetComponent<MeshRenderer>().enabled = false;
for
(
float
t
=
0
;
t
<
dashTime
;
t
+=
Time
.
fixedDeltaTime
)
for
(
float
t
=
0
;
t
<
dashTime
;
t
+=
Time
.
fixedDeltaTime
)
{
{
player
.
position
=
Vector3
.
Lerp
(
oriPos
,
dest
,
1
-
Mathf
.
Pow
(
1
-
(
t
/
dashTime
),
2
));
player
.
position
=
Vector3
.
Lerp
(
oriPos
,
dest
,
1
-
Mathf
.
Pow
(
1
-
(
t
/
dashTime
),
2
));
yield
return
new
WaitForFixedUpdate
();
yield
return
new
WaitForFixedUpdate
();
}
}
player
.
GetComponent
<
Rigidbody
>().
velocity
=
Vector3
.
zero
;
player
.
GetComponent
<
Rigidbody
>().
velocity
=
Vector3
.
zero
;
player
.
GetComponent
<
MeshRenderer
>().
enabled
=
true
;
//
player.GetComponent<MeshRenderer>().enabled = true;
foreach
(
var
enemyHit
in
Physics
.
SphereCastAll
(
ray
,
3
,
Vector3
.
Distance
(
oriPos
,
dest
),
1
<<
LayerMask
.
NameToLayer
(
"Enemy"
)))
foreach
(
var
enemyHit
in
Physics
.
SphereCastAll
(
ray
,
3
,
Vector3
.
Distance
(
oriPos
,
dest
),
1
<<
LayerMask
.
NameToLayer
(
"Enemy"
)))
{
{
...
...
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