Skip to content

Commit

Permalink
solve score problems
Browse files Browse the repository at this point in the history
  • Loading branch information
vandalo committed Oct 2, 2018
1 parent 083155b commit 27596ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ShowPT/Assets/Scripts/ElectricShot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ private void OnTriggerEnter(Collider other)
{
projectilesList.Add(Instantiate(lightToEnemy, transform.position, Quaternion.identity, gameObject.transform));
positionList.Add(other.gameObject.transform.position);
ScoreController.weaponHit(Inventory.WEAPON_TYPE.SHOTGUN);

other.gameObject.GetComponent<Enemy>().getHit(damage);
other.gameObject.GetComponent<Enemy>().setStatusParalyzed();
Expand All @@ -42,6 +43,7 @@ private void OnTriggerEnter(Collider other)
{
projectilesList.Add(Instantiate(lightToEnemy, transform.position, Quaternion.identity, gameObject.transform));
positionList.Add(other.gameObject.transform.position);
ScoreController.weaponHit(Inventory.WEAPON_TYPE.SHOTGUN);

bool armActive;
other.gameObject.GetComponent<BossArmController>().getHit(damage, out armActive);
Expand All @@ -50,6 +52,7 @@ private void OnTriggerEnter(Collider other)
{
Vector4 dataToPass = new Vector4(transform.position.x, transform.position.y, transform.position.z, damage);
other.gameObject.SendMessage("shotBehavior", dataToPass);
ScoreController.weaponHit(Inventory.WEAPON_TYPE.SHOTGUN);
}
}
}
4 changes: 2 additions & 2 deletions ShowPT/Assets/Scripts/ScoreController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ void Update ()

totalScoreLabel.text = totalScoreInt.ToString();

/* if (Input.GetKey(KeyCode.Z))
if (Input.GetKey(KeyCode.Z))
{
totalScoreInt += 500;
}*/
}
}

public static void weaponUsed(Inventory.WEAPON_TYPE weaponType)
Expand Down

0 comments on commit 27596ac

Please sign in to comment.