// Use this for initialization void Start () { if (val == null) val = GetComponent<GunSharedValues> (); player = GameObject.FindGameObjectWithTag ("Player").transform; //ShootRoutine (); }
// Use this for initialization void Start() { if (val == null) { val = GetComponent <GunSharedValues> (); } if (val == null) { val = GetComponentInParent <GunSharedValues> (); } if (val == null) { val = GetComponentInChildren <GunSharedValues> (); } }
// Use this for initialization void Start() { if (val == null) { val = GetComponent <GunSharedValues> (); } if (val == null) { val = GetComponentInParent <GunSharedValues> (); } if (val == null) { val = GetComponentInChildren <GunSharedValues> (); } //MuzzleEffect.SetupPool(); myLine = GetComponent <LineRenderer> (); }
void Start() { if (val == null) { val = GetComponent <GunSharedValues> (); } switch (PlayerPrefs.GetInt("Diff")) { case 0: damageMultiplier = 2f; ammoMultiplier = 2f; break; case 3: damageMultiplier = 0.75f; break; case 4: damageMultiplier = 1.5f; ammoMultiplier = 2f; fireRateMultiplier = 1.5f; break; default: damageMultiplier = 1f; break; } if (myGunCont != null) { Debug.LogError("there should only be one gun!"); } myGunCont = this; anim = GetComponent <Animator> (); }