TO SQUASH: Multiplier label.
This commit is contained in:
@@ -48,6 +48,8 @@ public class Player : MonoBehaviour
|
||||
|
||||
public int bonus = 3100;
|
||||
|
||||
public float speedBonus = 0.25f;
|
||||
|
||||
public Animator gunAnimator;
|
||||
|
||||
public Animator muzzleAnimator;
|
||||
@@ -60,8 +62,6 @@ public class Player : MonoBehaviour
|
||||
|
||||
public int laserCount = 0;
|
||||
|
||||
public float barPower = 0f;
|
||||
|
||||
public GameObject magnetLeft;
|
||||
|
||||
public GameObject magnetRight;
|
||||
@@ -528,6 +528,12 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
|
||||
canFire = true; // Allow firing again after bar hit.
|
||||
|
||||
speedBonus -= 0.05f; // Decrease speed bonus on bar hit.
|
||||
if (speedBonus < 0.0f)
|
||||
{
|
||||
speedBonus = 0.0f; // Clamp to minimum value.
|
||||
}
|
||||
}
|
||||
|
||||
void OnCollisionEnter2D(Collision2D collision)
|
||||
|
||||
Reference in New Issue
Block a user