private void CheckBullet() { currentGun = gunController.GetGun1(); texts_Bullet[0].text = currentGun.MaxBulletCount.ToString(); texts_Bullet[1].text = currentGun.carryBulletCount.ToString(); texts_Bullet[2].text = currentGun.currentBulletCount.ToString(); }
void itemImgSetter(int val, string imgPath) { switch (val) { case 0: Gun1.Load(imgPath); break; case 1: Gun2.Load(imgPath); break; case 2: Gun3.Load(imgPath); break; case 3: Head.Load(imgPath); break; case 4: Arms.Load(imgPath); break; case 5: Chest.Load(imgPath); break; case 6: Legs.Load(imgPath); break; case 7: ClassArmour.Load(imgPath); break; case 8: Ghost.Load(imgPath); break; case 9: Sparrow.Load(imgPath); break; case 10: Ship.Load(imgPath); break; case 11: SubClass.Load(imgPath); break; case 13: Embelm.Load(imgPath); break; } }
public void GunChange(Gun1 _gun) { if (WeaponManager.currentWeapon != null) { WeaponManager.currentWeapon.gameObject.SetActive(false); currentGun1 = _gun; WeaponManager.currentWeapon = currentGun1.GetComponent <Transform>(); WeaponManager.currentWeaponAni = currentGun1.ani; currentGun1.transform.localPosition = Vector3.zero; currentGun1.gameObject.SetActive(true); isActive = true; } }
private void Start() { m_gun = FindObjectOfType <Gun1>(); }