void Start () { player = GameObject.FindGameObjectWithTag("Player"); weap = player.GetComponent<weaponMaster>(); // Get Master Script for ammo info totalBullets = weap.getGlockAmmo(); sounds = GetComponents<AudioSource>(); reload = sounds[0]; shoot = sounds[1]; //Phil added this for current ammo changer if(PlayerPrefs.HasKey("curglock")){ clipCurrent = PlayerPrefs.GetInt("curglock"); } //new posLock = new Vector3 (0.2400008f, -0.323f, 0.4980001f); }
void Start () { player = GameObject.FindGameObjectWithTag("Player"); weap = player.GetComponent<weaponMaster>(); // Get Master Script for ammo info totalBullets = weap.getAkAmmo(); sounds = GetComponents<AudioSource>(); reload = sounds[0]; shoot = sounds[1]; //phil add this for current ammo count if(PlayerPrefs.HasKey("curak")){ clipCurrent = PlayerPrefs.GetInt("curak"); } if(PlayerPrefs.HasKey("totalak")){ totalBullets = PlayerPrefs.GetInt("totalak"); } posLock = new Vector3 (0.05100221f, -0.8060001f, 0.604f); }
void Start () { player = GameObject.FindGameObjectWithTag("Player"); weap = player.GetComponent<weaponMaster>(); // Get Master Script for ammo info totalBullets = weap.getShotgunAmmo(); sounds = GetComponents<AudioSource>(); reload = sounds[0]; shoot = sounds[1]; //phil add this for current ammo count if(PlayerPrefs.HasKey("curshells")){ clipCurrent = PlayerPrefs.GetInt("curshells"); } if(PlayerPrefs.HasKey("totalshells")){ totalBullets = PlayerPrefs.GetInt("totalshells"); } //this.gameObject.transform.localPosition = posLock; posLock = new Vector3 (0.09000088f, -0.22f, 0.3699999f); }
void Start () { player = GameObject.FindGameObjectWithTag("Player"); weap = player.GetComponent<weaponMaster>(); explode = Resources.Load("alienexplode", typeof(GameObject)) as GameObject; if(weap.checkWeapon() == 1) { bullet.velocity = transform.forward * glockBulletSpeed; } else if(weap.checkWeapon() == 2) { bullet.velocity = transform.forward * shotgunBulletSpeed; } else if(weap.checkWeapon() == 3) { bullet.velocity = transform.forward * akBulletSpeed; } else if(weap.checkWeapon() == 4) { bullet.velocity = transform.forward * alienBulletSpeed; } }