Skip to content

Commit

Permalink
Beta (beta beta) Push
Browse files Browse the repository at this point in the history
For sake of play testing
  • Loading branch information
aps16104 committed Apr 21, 2020
1 parent d8a7b16 commit 7e89c92
Show file tree
Hide file tree
Showing 21 changed files with 172 additions and 132 deletions.
9 changes: 9 additions & 0 deletions Platformer/Assets/Scripts/Level 1/Player_Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ void TakeDamage(int damage)
{
currentHealth -= damage; //take damage
healthbar.SetHealth(currentHealth); //modify health bar
if (currentHealth < 0)
{
Time.timeScale = 0f;
}
}


Expand All @@ -90,6 +94,11 @@ void OnTriggerEnter2D(Collider2D other) //Pickups
healthbar.SetHealth(currentHealth); //Full HealthBar
}

if (other.gameObject.CompareTag("Enemy"))
{
TakeDamage(20);
}

//Ninja star is in the weapon script (easier that way for some reason )
}

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

void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
if (Input.GetKeyDown(KeyCode.Q))
{
Shoot();
}
Expand Down
Loading

0 comments on commit 7e89c92

Please sign in to comment.