File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Dolphin Space Hunter/Assets/_Scripts Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ void Start()
35
35
StartCoroutine ( reloadAction ( ) ) ;
36
36
}
37
37
38
- // Update is called once per frame
38
+
39
39
void Update ( )
40
40
{
41
41
if ( Input . touchCount == 1 && Input . GetTouch ( 0 ) . phase == TouchPhase . Began && currentAmmunition < maxAmmunition ) {
42
- if ( transform . localPosition . x <= colorBarRanges [ 0 ] || transform . localPosition . x >= colorBarRanges [ 3 ] ) {
42
+ if ( transform . localPosition . x <= colorBarRanges [ 0 ] || transform . localPosition . x >= colorBarRanges [ 3 ] ) {
43
43
currentAmmunition += ( maxAmmunition / 10 ) ; //Red reload => +10% of ammo
44
44
} else if ( transform . localPosition . x <= colorBarRanges [ 1 ] || transform . localPosition . x >= colorBarRanges [ 2 ] ) {
45
- currentAmmunition += ( maxAmmunition / 4 ) ; //Yellow reload => +25 % of ammo
45
+ currentAmmunition += ( maxAmmunition / 5 ) ; //Yellow reload => +20 % of ammo
46
46
} else {
47
47
currentAmmunition += ( maxAmmunition / 2 ) ; //Green reload => +50% of ammo
48
48
}
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ private void shoot()
48
48
GameObject projectileShot = Instantiate ( projectile ,
49
49
shootingPoint . transform . position ,
50
50
Quaternion . LookRotation ( attackVector ) ) ;
51
- projectileShot . GetComponent < Rigidbody > ( ) . velocity = projectileShot . transform . forward * projectile . GetComponent < ProjectileScript > ( ) . projectileSpeed ;
51
+ projectileShot . GetComponent < Rigidbody > ( ) . velocity = projectileShot . transform . forward *
52
+ projectile . GetComponent < ProjectileScript > ( ) . projectileSpeed ;
52
53
}
53
54
54
55
private Vector3 calculateSpread ( )
You can’t perform that action at this time.
0 commit comments