Skip to content

Commit

Permalink
Dont delete portal on drop
Browse files Browse the repository at this point in the history
  • Loading branch information
markellus committed Jan 27, 2019
1 parent 9e56674 commit ad73309
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Prefabs/Tiles/Portal.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_SortingOrder: 3
m_Sprite: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
Expand Down
4 changes: 4 additions & 0 deletions Assets/Scripts/TileLogic/Portal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public class Portal : MonoBehaviour

void Update()
{
if(transform.parent != null)
{
transform.parent = null;
}
Renderer.sprite = IsExit ? ExitAnimation.GetNext() : EntryAnimation.GetNext();
transform.Rotate(0, 0, 100.0f * Time.deltaTime);
}
Expand Down

0 comments on commit ad73309

Please sign in to comment.