Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Pickups : MonoBehaviour {
- public int StrMult = 5;
- public int SpeedMult = 3;
- public int DmgMult = 10;
- public List<Weapon> BulletE;
- Weapon LeftBullet;
- Weapon RightBullet;
- public ImpactExplosion OSA;
- public PlayerControl PC;
- // Use this for initialization
- void Start()
- {
- RightBullet = BulletE[0];
- LeftBullet = BulletE[1];
- }
- void OnTriggerEnter(Collider collider)
- {
- if (collider.gameObject.name == "Pickup_Speed")
- {
- PC.Base_Speed = PC.Base_Speed * SpeedMult;
- collider.gameObject.SetActive(false);
- }
- if (collider.gameObject.name == "Pickup_Dmg")
- {
- LeftBullet.Dmg = LeftBullet.Dmg * DmgMult;
- RightBullet.Dmg = RightBullet.Dmg * DmgMult;
- collider.gameObject.SetActive(false);
- }
- if (collider.gameObject.name == "Pickup_Str")
- {
- OSA.Strength = OSA.Strength * StrMult;
- collider.gameObject.SetActive(false);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment