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
af70e9f8
Commit
af70e9f8
authored
Jan 21, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 플레이어가 방 문을 지나칠 때 문이 완전히 닫히기 전까지는 아주 잠깐동안 못움직임
parent
9b987038
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
78 deletions
+12
-78
DoorInGameDownClose.anim
Assets/Animation/Door/Down/DoorInGameDownClose.anim
+0
-18
DoorInGameLeftClose.anim
Assets/Animation/Door/Left/DoorInGameLeftClose.anim
+0
-18
DoorInGameRightClose.anim
Assets/Animation/Door/Right/DoorInGameRightClose.anim
+0
-18
DoorInGameUpClose.anim
Assets/Animation/Door/Up/DoorInGameUpClose.anim
+0
-18
PlayerController.cs
Assets/Scripts/Characters/PlayerController.cs
+1
-1
Door.cs
Assets/Scripts/TetrisMap/Door.cs
+3
-2
MapManager.cs
Assets/Scripts/TetrisMap/MapManager.cs
+6
-2
Room.cs
Assets/Scripts/TetrisMap/Room.cs
+2
-1
No files found.
Assets/Animation/Door/Down/DoorInGameDownClose.anim
View file @
af70e9f8
...
...
@@ -21,15 +21,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
@@ -116,15 +107,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
Assets/Animation/Door/Left/DoorInGameLeftClose.anim
View file @
af70e9f8
...
...
@@ -21,15 +21,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
@@ -116,15 +107,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
Assets/Animation/Door/Right/DoorInGameRightClose.anim
View file @
af70e9f8
...
...
@@ -21,15 +21,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
@@ -116,15 +107,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
Assets/Animation/Door/Up/DoorInGameUpClose.anim
View file @
af70e9f8
...
...
@@ -21,15 +21,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
@@ -116,15 +107,6 @@ AnimationClip:
m_Curve
:
-
serializedVersion
:
3
time
:
0
value
:
0
inSlope
:
Infinity
outSlope
:
Infinity
tangentMode
:
103
weightedMode
:
0
inWeight
:
0
outWeight
:
0
-
serializedVersion
:
3
time
:
0.3
value
:
1
inSlope
:
Infinity
outSlope
:
Infinity
...
...
Assets/Scripts/Characters/PlayerController.cs
View file @
af70e9f8
...
...
@@ -80,7 +80,7 @@ public class PlayerController : MonoBehaviour
{
isGrounded
=
IsGrounded
();
if
(
GameManager
.
gameState
==
GameState
.
Ingame
)
if
(
GameManager
.
gameState
==
GameState
.
Ingame
&&
MapManager
.
isDoorClosing
!=
true
)
{
anim
.
SetBool
(
"rope"
,
isInRope
);
anim
.
SetBool
(
"run"
,
isDashing
);
...
...
Assets/Scripts/TetrisMap/Door.cs
View file @
af70e9f8
...
...
@@ -35,7 +35,7 @@ public class Door : MonoBehaviour {
enteredPosition
=
2
;
break
;
case
1
:
if
(
collision
.
transform
.
position
.
x
<
GetComponent
<
PolygonCollider2D
>().
transform
.
position
.
x
)
if
(
collision
.
transform
.
position
.
x
<
GetComponent
<
PolygonCollider2D
>().
transform
.
position
.
x
+
0.6f
)
return
;
enteredPosition
=
3
;
break
;
...
...
@@ -50,9 +50,10 @@ public class Door : MonoBehaviour {
enteredPosition
=
1
;
break
;
}
MapManager
.
isDoorClosing
=
true
;
MapManager
mapManager
=
GameObject
.
Find
(
"MapManager"
).
GetComponent
<
MapManager
>();
Room
room
=
MapManager
.
currentRoom
;
StartCoroutine
(
mapManager
.
GetComponent
<
MapManager
>().
RoomFadeOut
(
room
));
StartCoroutine
(
mapManager
.
RoomFadeOut
(
room
));
if
(
room
.
specialRoomType
==
RoomType
.
Normal
)
room
.
GetComponent
<
SpriteRenderer
>().
sprite
=
mapManager
.
roomsSpritesDistributed
[
room
.
stage
][(
int
)
RoomSpriteType
.
Normal1
+
room
.
roomConcept
];
else
...
...
Assets/Scripts/TetrisMap/MapManager.cs
View file @
af70e9f8
...
...
@@ -4,6 +4,8 @@ using UnityEngine;
public
class
MapManager
:
MonoBehaviour
{
public
static
bool
isDoorClosing
=
false
;
/*
* variables
* */
...
...
@@ -280,13 +282,14 @@ public class MapManager : MonoBehaviour {
int
doorCloseCounter
=
0
;
int
roomDestroyCounter
=
0
;
int
row
=
leftPress
.
row
;
float
collapseRate
=
0
;
while
(
Time
.
time
-
initialCollapseTime
<
collapseTime
)
{
yield
return
new
WaitForSeconds
(
0.01f
);
float
collapseRate
=
(
Time
.
time
-
initialCollapseTime
)
/
collapseTime
;
collapseRate
=
(
Time
.
time
-
initialCollapseTime
)
/
collapseTime
;
leftPress
.
transform
.
localScale
=
new
Vector3
(
collapseRate
*
20
,
1
,
1
);
rightPress
.
transform
.
localScale
=
new
Vector3
(-
collapseRate
*
20
,
1
,
1
);
if
(
collapseRate
-
doorCloseCounter
*
0.2f
>
(
float
)
1
/
12
)
if
(
collapseRate
-
doorCloseCounter
*
0.2f
>
(
float
)
1
/
12
)
{
mapGrid
[
doorCloseCounter
,
row
].
CloseDoor
(
"Up"
,
false
);
mapGrid
[
doorCloseCounter
,
row
].
CloseDoor
(
"Down"
,
false
);
...
...
@@ -793,6 +796,7 @@ public class MapManager : MonoBehaviour {
room
.
leftTetrisDoor
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color
(
1
,
1
,
1
,
0
);
room
.
rightTetrisDoor
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color
(
1
,
1
,
1
,
0
);
room
.
fog
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color
(
1
,
1
,
1
,
0
);
isDoorClosing
=
false
;
}
/// <summary>
/// Make room fade out.
...
...
Assets/Scripts/TetrisMap/Room.cs
View file @
af70e9f8
...
...
@@ -285,8 +285,9 @@ public class Room : MonoBehaviour
fog
=
Instantiate
(
GameObject
.
Find
(
"MapManager"
).
GetComponent
<
MapManager
>().
clearedFog
,
fogPosition
,
Quaternion
.
identity
,
transform
);
fog
.
GetComponent
<
SpriteRenderer
>().
color
=
new
Color
(
1
,
1
,
1
,
0
);
isRoomCleared
=
true
;
if
(
specialRoomType
==
RoomType
.
Boss
)
MapManager
.
currentStage
+=
1
;
}
//Need to make extra works.
}
}
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