Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ColdShot
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박보승
ColdShot
Commits
ff9eca1b
Commit
ff9eca1b
authored
Feb 01, 2020
by
15박보승
Committed by
18류지석
Feb 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementing Skill
parent
18049a31
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
366 additions
and
4 deletions
+366
-4
Bouncy.physicsMaterial2D
Assets/Materials/Bouncy.physicsMaterial2D
+11
-0
Bouncy.physicsMaterial2D.meta
Assets/Materials/Bouncy.physicsMaterial2D.meta
+8
-0
Skills.meta
Assets/Resources/Skills.meta
+8
-0
HeadShot.asset
Assets/Resources/Skills/HeadShot.asset
+17
-0
HeadShot.asset.meta
Assets/Resources/Skills/HeadShot.asset.meta
+8
-0
Weapons.meta
Assets/Resources/Weapons.meta
+8
-0
DummyAssaultRifle.asset
Assets/Resources/Weapons/DummyAssaultRifle.asset
+0
-0
DummyAssaultRifle.asset.meta
Assets/Resources/Weapons/DummyAssaultRifle.asset.meta
+0
-0
Ingame.unity
Assets/Scenes/Ingame.unity
+124
-4
AssetMakerWindow.cs
Assets/Scripts/Editors/AssetMakerWindow.cs
+30
-0
AssetMakerWindow.cs.meta
Assets/Scripts/Editors/AssetMakerWindow.cs.meta
+11
-0
Skills.meta
Assets/Scripts/Skills.meta
+8
-0
BouncingShot.cs
Assets/Scripts/Skills/BouncingShot.cs
+33
-0
BouncingShot.cs.meta
Assets/Scripts/Skills/BouncingShot.cs.meta
+11
-0
HeadShot.cs
Assets/Scripts/Skills/HeadShot.cs
+46
-0
HeadShot.cs.meta
Assets/Scripts/Skills/HeadShot.cs.meta
+11
-0
Skill.cs
Assets/Scripts/Skills/Skill.cs
+21
-0
Skill.cs.meta
Assets/Scripts/Skills/Skill.cs.meta
+11
-0
No files found.
Assets/Materials/Bouncy.physicsMaterial2D
0 → 100644
View file @
ff9eca1b
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!62
&6200000
PhysicsMaterial2D
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
Bouncy
friction
:
0
bounciness
:
1
Assets/Materials/Bouncy.physicsMaterial2D.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 1f5f97b1baf18c64a86029d1f553df09
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Resources/Skills.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 7a2f212b4e93f294b96066b80c0be31f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Resources/Skills/HeadShot.asset
0 → 100644
View file @
ff9eca1b
%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
:
1cfb2ac990cea404494c0e55af055d62
,
type
:
3
}
m_Name
:
HeadShot
m_EditorClassIdentifier
:
tier
:
0
index
:
0
damageTimes
:
2
Assets/Resources/Skills/HeadShot.asset.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: c823f57c592b38545b36a0724e14cb08
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Resources/Weapons.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 4f6a0d094ecafbb459bf50481fa68a5c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Resources/DummyAssaultRifle.asset
→
Assets/Resources/
Weapons/
DummyAssaultRifle.asset
View file @
ff9eca1b
File moved
Assets/Resources/DummyAssaultRifle.asset.meta
→
Assets/Resources/
Weapons/
DummyAssaultRifle.asset.meta
View file @
ff9eca1b
File moved
Assets/Scenes/Ingame.unity
View file @
ff9eca1b
...
@@ -153,8 +153,8 @@ MonoBehaviour:
...
@@ -153,8 +153,8 @@ MonoBehaviour:
bounds
:
bounds
:
m_Center
:
{
x
:
1.5
,
y
:
1.5
,
z
:
0
}
m_Center
:
{
x
:
1.5
,
y
:
1.5
,
z
:
0
}
m_Extent
:
{
x
:
15
,
y
:
15
,
z
:
0
}
m_Extent
:
{
x
:
15
,
y
:
15
,
z
:
0
}
pointInterval
:
0.
2
pointInterval
:
0.
1
agentRadius
:
0.
1
agentRadius
:
0.
2
blockMask
:
blockMask
:
serializedVersion
:
2
serializedVersion
:
2
m_Bits
:
256
m_Bits
:
256
...
@@ -12165,6 +12165,126 @@ Tilemap:
...
@@ -12165,6 +12165,126 @@ Tilemap:
e31
:
0
e31
:
0
e32
:
0
e32
:
0
e33
:
1
e33
:
1
---
!u!1
&1602137684
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1602137687
}
-
component
:
{
fileID
:
1602137686
}
-
component
:
{
fileID
:
1602137685
}
-
component
:
{
fileID
:
1602137688
}
m_Layer
:
11
m_Name
:
BouncyBullet
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!50
&1602137685
Rigidbody2D
:
serializedVersion
:
4
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1602137684
}
m_BodyType
:
0
m_Simulated
:
1
m_UseFullKinematicContacts
:
0
m_UseAutoMass
:
0
m_Mass
:
1
m_LinearDrag
:
0
m_AngularDrag
:
0.05
m_GravityScale
:
0
m_Material
:
{
fileID
:
6200000
,
guid
:
1f5f97b1baf18c64a86029d1f553df09
,
type
:
2
}
m_Interpolate
:
0
m_SleepingMode
:
1
m_CollisionDetection
:
0
m_Constraints
:
0
---
!u!212
&1602137686
SpriteRenderer
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1602137684
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RayTracingMode
:
0
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_Materials
:
-
{
fileID
:
2100000
,
guid
:
a97c105638bdf8b4a8650670310a4cd3
,
type
:
2
}
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
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
10913
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
1
m_Size
:
{
x
:
0.5
,
y
:
0.5
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
---
!u!4
&1602137687
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1602137684
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
1.8514463
,
y
:
6.8509436
,
z
:
-24.999321
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
12
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!58
&1602137688
CircleCollider2D
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1602137684
}
m_Enabled
:
1
m_Density
:
1
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_UsedByEffector
:
0
m_UsedByComposite
:
0
m_Offset
:
{
x
:
0
,
y
:
0
}
serializedVersion
:
2
m_Radius
:
0.25
---
!u!1
&1622131597
---
!u!1
&1622131597
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
@@ -17828,7 +17948,7 @@ Transform:
...
@@ -17828,7 +17948,7 @@ Transform:
m_GameObject
:
{
fileID
:
1690205889
}
m_GameObject
:
{
fileID
:
1690205889
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0.091
,
y
:
0.189
,
z
:
0
}
m_LocalPosition
:
{
x
:
0.091
,
y
:
0.189
,
z
:
0
}
m_LocalScale
:
{
x
:
0.
1
,
y
:
0.5
,
z
:
0.5
}
m_LocalScale
:
{
x
:
0.
05
,
y
:
0.2
,
z
:
0.5
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
2053488665
}
m_Father
:
{
fileID
:
2053488665
}
m_RootOrder
:
1
m_RootOrder
:
1
...
@@ -18033,7 +18153,7 @@ ParticleSystem:
...
@@ -18033,7 +18153,7 @@ ParticleSystem:
startSpeed
:
startSpeed
:
serializedVersion
:
2
serializedVersion
:
2
minMaxState
:
0
minMaxState
:
0
scalar
:
5
0
scalar
:
10
0
minScalar
:
5
minScalar
:
5
maxCurve
:
maxCurve
:
serializedVersion
:
2
serializedVersion
:
2
...
...
Assets/Scripts/Editors/AssetMakerWindow.cs
0 → 100644
View file @
ff9eca1b
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEditor
;
#if UNITY_EDITOR
public
class
AssetMakerWindow
:
EditorWindow
{
private
MonoScript
script
;
private
Skill
skill
;
[
MenuItem
(
"Tools/AssetMaker"
)]
static
void
Init
()
{
AssetMakerWindow
window
=
(
AssetMakerWindow
)
GetWindow
(
typeof
(
AssetMakerWindow
));
window
.
Show
();
}
private
void
OnGUI
()
{
skill
=
EditorGUILayout
.
ObjectField
(
skill
,
typeof
(
MonoScript
),
false
)
as
Skill
;
if
(
GUILayout
.
Button
(
"Make!"
))
{
if
(!
skill
)
return
;
AssetDatabase
.
CreateAsset
(
skill
,
skill
.
GetType
().
Name
+
".asset"
);
}
}
}
#
endif
\ No newline at end of file
Assets/Scripts/Editors/AssetMakerWindow.cs.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 8e4ef1f599b09b948977195404d9a7a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Skills.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 4eaf7ec70a7bfd642919df9249ec3d63
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Skills/BouncingShot.cs
0 → 100644
View file @
ff9eca1b
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
BouncingShot
:
Skill
{
public
GameObject
bouncyBulletPrefab
;
public
int
bounceCount
=
3
;
private
LineRenderer
bounceLineRenderer
;
public
override
void
Aiming
()
{
bounceLineRenderer
=
character
.
gameObject
.
AddComponent
<
LineRenderer
>();
}
private
IEnumerator
AimingRoutine
()
{
while
(
true
)
{
if
(
Input
.
GetMouseButtonDown
(
0
))
{
break
;
}
yield
return
null
;
}
}
public
override
void
Use
()
{
}
}
Assets/Scripts/Skills/BouncingShot.cs.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: aa7119aa008f0af44b6e807acdd75503
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Skills/HeadShot.cs
0 → 100644
View file @
ff9eca1b
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEditor
;
public
class
HeadShot
:
Skill
{
public
float
damageTimes
;
private
Collider2D
target
;
#if UNITY_EDITOR
[
MenuItem
(
"Skiils/HeadShot"
)]
static
void
CreateAsset
()
{
HeadShot
skill
=
CreateInstance
<
HeadShot
>();
AssetDatabase
.
CreateAsset
(
skill
,
"Assets/"
+
skill
.
GetType
().
Name
+
".asset"
);
}
#endif
public
override
void
Aiming
()
{
throw
new
System
.
NotImplementedException
();
}
private
IEnumerator
AimingRoutine
()
{
while
(
true
)
{
if
(
Input
.
GetMouseButtonDown
(
0
))
{
Use
();
break
;
}
Vector3
mouseWorldPosition
=
Camera
.
main
.
ScreenToWorldPoint
(
Input
.
mousePosition
);
target
=
Physics2D
.
OverlapPoint
(
mouseWorldPosition
,
LayerMask
.
NameToLayer
(
"Enemy"
));
yield
return
null
;
}
}
public
override
void
Use
()
{
if
(!
target
)
return
;
target
.
GetComponent
<
Enemy
>().
Health
-=
Mathf
.
CeilToInt
(
weaponBehaviour
.
weapon
.
damage
*
damageTimes
);
}
}
Assets/Scripts/Skills/HeadShot.cs.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 1cfb2ac990cea404494c0e55af055d62
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/Skills/Skill.cs
0 → 100644
View file @
ff9eca1b
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
abstract
class
Skill
:
ScriptableObject
{
protected
PlayableCharacter
character
;
protected
WeaponBehaviour
weaponBehaviour
;
public
int
tier
;
public
int
index
;
public
virtual
void
Init
(
PlayableCharacter
character
)
{
this
.
character
=
character
;
this
.
weaponBehaviour
=
character
.
GetComponent
<
WeaponBehaviour
>();
}
public
abstract
void
Aiming
();
public
abstract
void
Use
();
}
Assets/Scripts/Skills/Skill.cs.meta
0 → 100644
View file @
ff9eca1b
fileFormatVersion: 2
guid: 2e23529e98694fc4a93baffdf06b53ec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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