Skip to content

Commit

Permalink
Level Building!!
Browse files Browse the repository at this point in the history
Started to build level!
  • Loading branch information
aps16104 committed Apr 22, 2020
1 parent 7e89c92 commit d67c297
Show file tree
Hide file tree
Showing 407 changed files with 56,179 additions and 319 deletions.
7 changes: 5 additions & 2 deletions Platformer/Assets/Scripts/Level 1/Bullet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ private void OnTriggerEnter2D(Collider2D other)
gameObject.SetActive(false);
//Point System Eventually
}
if (other.gameObject.CompareTag("Box") || other.gameObject.CompareTag("Bouncer"))
if (other.gameObject.CompareTag("Wall"))
{
gameObject.SetActive(false);
//Point System Eventually
}
if (other.gameObject.CompareTag("Box"))
{
other.gameObject.SetActive(false);
}


Expand Down
17 changes: 8 additions & 9 deletions Platformer/Assets/Scripts/Level 1/Player_Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[RequireComponent(typeof(Controller2D))]
public class Player_Controller : MonoBehaviour
{

Controller2D controller; //controller

float moveSpeed = 10; //How Fast He moves
Expand All @@ -18,10 +17,10 @@ public class Player_Controller : MonoBehaviour
float velocityXSmoothing;

//Jumping
public float jumpHeight = 4;
public float timeToJumpApex = .4f;
float accelerationTimeAirborne = .2f;
float accelerationTimeGrounded = .1f;
public float jumpHeight = 4; //height
public float timeToJumpApex = .4f; //time to get there
float accelerationTimeAirborne = .2f; //acceleration time
float accelerationTimeGrounded = .05f; //time to ground


public int currentHealth; //health
Expand Down Expand Up @@ -70,10 +69,10 @@ void TakeDamage(int damage)
{
currentHealth -= damage; //take damage
healthbar.SetHealth(currentHealth); //modify health bar
if (currentHealth < 0)
{
Time.timeScale = 0f;
}
if (currentHealth < 1)
{
Time.timeScale = 0f;
}
}


Expand Down
8 changes: 4 additions & 4 deletions Platformer/Assets/Scripts/Level 1/Weapon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class Weapon : MonoBehaviour
{
public Transform firePoint; //where player is shooting from
public GameObject bulletPrefab;
public int shots = 5;
public int shots;

void Update()
{
Expand All @@ -31,11 +31,11 @@ void Shoot()

void OnTriggerEnter2D(Collider2D other) //Pickups
{
if (other.gameObject.CompareTag("NinjaStar")) //If you got the key
if (other.gameObject.CompareTag("NinjaStar")) //If you got the star
{
other.gameObject.SetActive(false); //Star Dissapears
shots = shots + 1;
shots = shots + 1; //increase amount of shots

}
}
}
}
8 changes: 8 additions & 0 deletions Platformer/Assets/World Build/Castle.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Platformer/Assets/World Build/Castle/Tileset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d67c297

Please sign in to comment.