Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tetra-tower
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Oenos
tetra-tower
Commits
290a18e7
Commit
290a18e7
authored
Feb 26, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
파킨-
parent
0add0e64
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
314 additions
and
4 deletions
+314
-4
Player.prefab
Assets/Prefabs/Characters/Player.prefab
+2
-0
particle.physicsMaterial2D
Assets/Prefabs/Characters/particle.physicsMaterial2D
+10
-0
particle.physicsMaterial2D.meta
Assets/Prefabs/Characters/particle.physicsMaterial2D.meta
+8
-0
particle.prefab
Assets/Prefabs/Characters/particle.prefab
+152
-0
particle.prefab.meta
Assets/Prefabs/Characters/particle.prefab.meta
+8
-0
explosionGlovesAttack2.anim.meta
Assets/Resources/Animations/explosionGlovesAttack2.anim.meta
+1
-1
Player.cs
Assets/Scripts/Characters/Player.cs
+35
-2
particle.png
Assets/Sprites/Player/particle.png
+0
-0
particle.png.meta
Assets/Sprites/Player/particle.png.meta
+97
-0
Physics2DSettings.asset
ProjectSettings/Physics2DSettings.asset
+1
-1
No files found.
Assets/Prefabs/Characters/Player.prefab
View file @
290a18e7
...
...
@@ -433,6 +433,8 @@ MonoBehaviour:
tty
:
0
displayText
:
{
fileID
:
114495744039531298
,
guid
:
457100d9937aef244b98ef4f67a0f218
,
type
:
2
}
particlePrefab
:
{
fileID
:
1120403562358508
,
guid
:
e4d08affb61a63840a9cb9412fbe7b38
,
type
:
2
}
---
!u!212
&212187280661781960
SpriteRenderer
:
m_ObjectHideFlags
:
1
...
...
Assets/Prefabs/Characters/particle.physicsMaterial2D
0 → 100644
View file @
290a18e7
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!62
&6200000
PhysicsMaterial2D
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
0
}
m_Name
:
particle
friction
:
0.4
bounciness
:
0.8
Assets/Prefabs/Characters/particle.physicsMaterial2D.meta
0 → 100644
View file @
290a18e7
fileFormatVersion: 2
guid: 8eb863c9985dc5b41b4c04efa93b6bad
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 6200000
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/Characters/particle.prefab
0 → 100644
View file @
290a18e7
%YAML
1.1
%TAG
!u!
tag:unity3d.com,2011:
---
!u!1001
&100100000
Prefab
:
m_ObjectHideFlags
:
1
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
[]
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
0
}
m_RootGameObject
:
{
fileID
:
1120403562358508
}
m_IsPrefabAsset
:
1
---
!u!1
&1120403562358508
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
4961056649420660
}
-
component
:
{
fileID
:
212525562428622492
}
-
component
:
{
fileID
:
50320821075488510
}
-
component
:
{
fileID
:
60824362284317310
}
m_Layer
:
0
m_Name
:
particle
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!4
&4961056649420660
Transform
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1120403562358508
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0.10124648
,
y
:
-0.1585421
,
z
:
0
}
m_LocalScale
:
{
x
:
1.5
,
y
:
1.5
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!50
&50320821075488510
Rigidbody2D
:
serializedVersion
:
4
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1120403562358508
}
m_BodyType
:
0
m_Simulated
:
1
m_UseFullKinematicContacts
:
0
m_UseAutoMass
:
0
m_Mass
:
1
m_LinearDrag
:
0
m_AngularDrag
:
0.05
m_GravityScale
:
1
m_Material
:
{
fileID
:
6200000
,
guid
:
8eb863c9985dc5b41b4c04efa93b6bad
,
type
:
2
}
m_Interpolate
:
0
m_SleepingMode
:
1
m_CollisionDetection
:
1
m_Constraints
:
0
---
!u!60
&60824362284317310
PolygonCollider2D
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1120403562358508
}
m_Enabled
:
1
m_Density
:
1
m_Material
:
{
fileID
:
6200000
,
guid
:
8eb863c9985dc5b41b4c04efa93b6bad
,
type
:
2
}
m_IsTrigger
:
0
m_UsedByEffector
:
0
m_UsedByComposite
:
0
m_Offset
:
{
x
:
0
,
y
:
0
}
m_SpriteTilingProperty
:
border
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
0
}
pivot
:
{
x
:
0.5
,
y
:
0.5
}
oldSize
:
{
x
:
0.09375
,
y
:
0.09375
}
newSize
:
{
x
:
0.09375
,
y
:
0.09375
}
adaptiveTilingThreshold
:
0.5
drawMode
:
0
adaptiveTiling
:
0
m_AutoTiling
:
0
m_Points
:
m_Paths
:
-
-
{
x
:
0.015850458
,
y
:
0.04676413
}
-
{
x
:
-0.015704429
,
y
:
0.046965715
}
-
{
x
:
-0.01560602
,
y
:
0.031580765
}
-
{
x
:
-0.031261414
,
y
:
0.031526238
}
-
{
x
:
-0.031180996
,
y
:
0.016339913
}
-
{
x
:
-0.04717206
,
y
:
0.016206669
}
-
{
x
:
-0.046856616
,
y
:
-0.01584689
}
-
{
x
:
-0.03135604
,
y
:
-0.015454656
}
-
{
x
:
-0.031499572
,
y
:
-0.03111196
}
-
{
x
:
-0.015743466
,
y
:
-0.031173434
}
-
{
x
:
-0.015640447
,
y
:
-0.046347085
}
-
{
x
:
0.015645683
,
y
:
-0.046696942
}
-
{
x
:
0.015327629
,
y
:
-0.00025501102
}
-
{
x
:
0.04655298
,
y
:
0.0003018938
}
-
{
x
:
0.046568148
,
y
:
0.015638411
}
-
{
x
:
0.031674653
,
y
:
0.01564565
}
-
{
x
:
0.031250402
,
y
:
0.031235235
}
-
{
x
:
0.015960451
,
y
:
0.031578735
}
---
!u!212
&212525562428622492
SpriteRenderer
:
m_ObjectHideFlags
:
1
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInternal
:
{
fileID
:
100100000
}
m_GameObject
:
{
fileID
:
1120403562358508
}
m_Enabled
:
1
m_CastShadows
:
0
m_ReceiveShadows
:
0
m_DynamicOccludee
:
1
m_MotionVectors
:
1
m_LightProbeUsage
:
1
m_ReflectionProbeUsage
:
1
m_RenderingLayerMask
:
4294967295
m_Materials
:
-
{
fileID
:
10754
,
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_PreserveUVs
:
0
m_IgnoreNormalsForChartDetection
:
0
m_ImportantGI
:
0
m_StitchLightmapSeams
:
0
m_SelectedEditorRenderState
:
0
m_MinimumChartSize
:
4
m_AutoUVMaxDistance
:
0.5
m_AutoUVMaxAngle
:
89
m_LightmapParameters
:
{
fileID
:
0
}
m_SortingLayerID
:
-2078941185
m_SortingLayer
:
7
m_SortingOrder
:
0
m_Sprite
:
{
fileID
:
21300000
,
guid
:
eb676d99ecaac0c42b288324bd919674
,
type
:
3
}
m_Color
:
{
r
:
1
,
g
:
1
,
b
:
1
,
a
:
1
}
m_FlipX
:
0
m_FlipY
:
0
m_DrawMode
:
0
m_Size
:
{
x
:
0.09375
,
y
:
0.09375
}
m_AdaptiveModeThreshold
:
0.5
m_SpriteTileMode
:
0
m_WasSpriteAssigned
:
1
m_MaskInteraction
:
0
m_SpriteSortPoint
:
0
Assets/Prefabs/Characters/particle.prefab.meta
0 → 100644
View file @
290a18e7
fileFormatVersion: 2
guid: e4d08affb61a63840a9cb9412fbe7b38
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
Assets/Resources/Animations/explosionGlovesAttack2.anim.meta
View file @
290a18e7
fileFormatVersion: 2
guid:
8577ae016a412764684fcba81af639cb
guid:
f0e3b19ee969d4f429ee9d8430bb4a58
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
...
...
Assets/Scripts/Characters/Player.cs
View file @
290a18e7
...
...
@@ -10,6 +10,10 @@ public class Player : MonoBehaviour {
public
int
ttx
;
public
int
tty
;
public
Text
displayText
;
public
GameObject
particlePrefab
;
GameObject
[]
particles
;
bool
gameover
;
public
IEnumerator
DisplayText
(
string
_text
)
{
...
...
@@ -30,6 +34,15 @@ public class Player : MonoBehaviour {
ttx
=
(
int
)(
transform
.
position
.
x
/
24f
);
tty
=
(
int
)(
transform
.
position
.
y
-
0.9f
/
24f
);
lifeStoneManager
=
LifeStoneManager
.
Instance
;
particles
=
new
GameObject
[
40
];
for
(
int
i
=
0
;
i
<
particles
.
Length
;
i
++)
{
particles
[
i
]
=
Instantiate
(
particlePrefab
,
transform
);
particles
[
i
].
SetActive
(
false
);
}
gameover
=
false
;
}
// Update is called once per frame
...
...
@@ -58,7 +71,27 @@ public class Player : MonoBehaviour {
}
ttx
=
tx
;
tty
=
ty
;
if
(
lifeStoneManager
.
CountType
()
==
0
)
GameManager
.
gameState
=
GameState
.
GameOver
;
if
(!
gameover
&&
lifeStoneManager
.
CountType
()
==
0
)
{
gameover
=
true
;
StartCoroutine
(
GameOverCoroutine
());
}
}
IEnumerator
GameOverCoroutine
()
{
GetComponent
<
Rigidbody2D
>().
bodyType
=
RigidbodyType2D
.
Static
;
GetComponent
<
Collider2D
>().
enabled
=
false
;
GetComponent
<
SpriteRenderer
>().
enabled
=
false
;
foreach
(
GameObject
obj
in
particles
)
{
obj
.
SetActive
(
true
);
obj
.
transform
.
localPosition
=
Vector3
.
zero
;
obj
.
GetComponent
<
Rigidbody2D
>().
velocity
=
Random
.
insideUnitCircle
.
normalized
*
6f
;
}
yield
return
new
WaitForSeconds
(
3f
);
GameManager
.
gameState
=
GameState
.
GameOver
;
}
}
Assets/Sprites/Player/particle.png
0 → 100644
View file @
290a18e7
179 Bytes
Assets/Sprites/Player/particle.png.meta
0 → 100644
View file @
290a18e7
fileFormatVersion: 2
guid: eb676d99ecaac0c42b288324bd919674
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 6
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 64
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5362a76a3c09bc1498232c85cf2329a1
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
ProjectSettings/Physics2DSettings.asset
View file @
290a18e7
...
...
@@ -52,4 +52,4 @@ Physics2DSettings:
m_ColliderAsleepColor
:
{
r
:
0.5686275
,
g
:
0.95686275
,
b
:
0.54509807
,
a
:
0.36078432
}
m_ColliderContactColor
:
{
r
:
1
,
g
:
0
,
b
:
1
,
a
:
0.6862745
}
m_ColliderAABBColor
:
{
r
:
1
,
g
:
1
,
b
:
0
,
a
:
0.2509804
}
m_LayerCollisionMatrix
:
f
f
dffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9ffeffffdffffffffffffffedffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix
:
f
e
dffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9ffeffffdffffffffffffffedffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
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