public static void Instantiate(Vector2 location, Quaternion orientation, float force, BulletMode mode, int damage = 0) { var bullet = Instantiate <GameObject>(prefab).GetComponent <BulletController>(); bullet.transform.position = location; bullet.transform.rotation = orientation; bullet.mode = mode; bullet.damage = damage; bullet.Push(force); }
public void WeaponManager() { if (unlockedLevel == 1) { bulletMode = BulletMode.FIRE; } if (unlockedLevel == 2) { bulletMode = BulletMode.ICE; } }
void BulletModeChanger() { if (Input.GetKeyDown(KeyCode.E)) { audioSource.PlayOneShot(bulletmodechangeSound); if (bulletMode == BulletMode.EXPLOSION) { bulletMode = BulletMode.FIRE; } else if (bulletMode == BulletMode.FIRE) { bulletMode = BulletMode.ICE; } else if (bulletMode == BulletMode.ICE) { bulletMode = BulletMode.EXPLOSION; } } }