Skip to content

Commit

Permalink
Secret Levels
Browse files Browse the repository at this point in the history
Secret levels, colliders fixed, speed increased
  • Loading branch information
aps16104 committed Apr 14, 2020
1 parent 91d863d commit 1dce490
Show file tree
Hide file tree
Showing 3 changed files with 6,109 additions and 1,470 deletions.
17 changes: 15 additions & 2 deletions Platformer/Assets/Scripts/Player_Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class Player_Controller : MonoBehaviour

public int jumps;
int maxjumps = 2;
float jumpforce = 8.75f;
float jumpforce = 7.75f;
bool grounded = true;

void Start()
Expand Down Expand Up @@ -54,4 +54,17 @@ void OnCollisionEnter2D(Collision2D collide)
}
}

}
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.CompareTag("Key"))
{
other.gameObject.SetActive(false);
}

if (other.gameObject.CompareTag("Cash"))
{
other.gameObject.SetActive(false);
}
}

}
Loading

0 comments on commit 1dce490

Please sign in to comment.