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
1f9e632d
Commit
1f9e632d
authored
Feb 07, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
아이템이랑 머지하고 포탈 작동 이제 아이템의 작동 방식을 따름
parent
3b2b7a60
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
MapManager.prefab
Assets/Prefabs/MapManager.prefab
+0
-2
Portal.prefab
Assets/Prefabs/TetrisMap/Portal.prefab
+1
-1
PlayerController.cs
Assets/Scripts/Characters/PlayerController.cs
+1
-1
Portal.cs
Assets/Scripts/TetrisMap/Portal.cs
+7
-5
No files found.
Assets/Prefabs/MapManager.prefab
View file @
1f9e632d
...
...
@@ -170,8 +170,6 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
adab373df646d5f4fb794a3b6ffdf2d7
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
map
:
{
fileID
:
0
}
roomInGame
:
{
fileID
:
0
}
allTiles
:
-
{
fileID
:
11400000
,
guid
:
cad5b727dcc80234584fe4c3d4bac3ac
,
type
:
2
}
-
{
fileID
:
11400000
,
guid
:
648b887233c145948994a645b8a15292
,
type
:
2
}
...
...
Assets/Prefabs/TetrisMap/Portal.prefab
View file @
1f9e632d
...
...
@@ -65,7 +65,7 @@ BoxCollider2D:
adaptiveTiling
:
0
m_AutoTiling
:
0
serializedVersion
:
2
m_Size
:
{
x
:
1
,
y
:
2.
5
}
m_Size
:
{
x
:
3.2
,
y
:
2.3
5
}
m_EdgeRadius
:
0
---
!u!114
&114406776515389056
MonoBehaviour
:
...
...
Assets/Scripts/Characters/PlayerController.cs
View file @
1f9e632d
...
...
@@ -238,7 +238,7 @@ public class PlayerController : MonoBehaviour
bool
GetItemRay
()
{
RaycastHit2D
hit1
=
Physics2D
.
Raycast
(
transform
.
position
,
Vector2
.
down
,
rayDistance
,
itemLayer
);
Debug
.
DrawRay
(
transform
.
position
,
rayDistance
*
Vector2
.
down
,
Color
.
white
);
Debug
.
DrawRay
(
transform
.
position
,
rayDistance
*
Vector2
.
down
,
Color
.
red
);
if
(
hit1
.
collider
!=
null
)
{
IPlayerInteraction
temp
=
hit1
.
collider
.
GetComponent
<
IPlayerInteraction
>();
...
...
Assets/Scripts/TetrisMap/Portal.cs
View file @
1f9e632d
...
...
@@ -2,14 +2,16 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
Portal
:
MonoBehaviour
{
public
class
Portal
:
MonoBehaviour
,
IPlayerInteraction
{
p
rivate
void
OnTriggerStay2D
(
Collider2D
collision
)
p
ublic
void
Apply
(
)
{
if
(
collision
.
tag
.
Equals
(
"Player"
)
&&
Input
.
GetButtonDown
(
"Interaction"
))
{
if
(
GameManager
.
gameState
==
GameState
.
Ingame
)
StartCoroutine
(
GameObject
.
FindGameObjectWithTag
(
"MainCamera"
).
GetComponent
<
CameraController
>().
ChangeScene
(
GameState
.
Portal
));
}
}
public
void
HighlightSwitch
(
bool
enabled
)
{
}
// Use this for initialization
...
...
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