public override void TakeDamage(int damage) { health--; if (health <= 0) { if (gunType == GunsConstants.BossGunType()) { GameManager.instance.AddBonusPoints(); GameManager.instance.FinishGame(); } else { Die(); GameManager.instance.AddScore(); } } }
private void LoadGunController() { gunController = carriedGun.GetComponent <GunController>(); if (gunType == GunsConstants.SubmachinegunGunType()) { health = 2; gunController.MediumEnemyGun(); } else if (gunType == GunsConstants.MachinegunGunType()) { health = 3; gunController.SuperEnemyGun(); } else if (gunType == GunsConstants.BossGunType()) { health = 6; gunController.SuperEnemyGun(); } else { health = 1; gunController.BasicEnemyGun(); } }
public void SpawnGun(int gunType, Vector3 position) { int type = gunType == GunsConstants.BossGunType() ? GunsConstants.MachinegunGunType() : gunType; Instantiate(guns[type], position, Quaternion.Euler(new Vector3(0, 90, 0))); }