public override void Shoot(Transform spawnPoint) { GameObject bullet = WeaponsDatabase.GetBulletPrefab(InstantiatedAmmoPrefabId); GameObject bulletInstance = Object.Instantiate( bullet, spawnPoint.position, bullet.transform.rotation, BulletsContainer.ContainerTransform); bulletInstance.transform.up = spawnPoint.up; }
public override void Shoot(Transform spawnPoint) { GameObject bullet = WeaponsDatabase.GetBulletPrefab(InstantiatedAmmoPrefabId); for (int i = 0; i < Count; ++i) { GameObject bulletInstance = Object.Instantiate( bullet, spawnPoint.position, bullet.transform.rotation, BulletsContainer.ContainerTransform); bulletInstance.transform.up = Quaternion.Euler(0f, 0f, i * Delta - Angle * 0.5f) * spawnPoint.up; } }
private void Awake() { Instance = this; Deserialize(); }