Example #1
0
        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;
        }
Example #2
0
        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;
            }
        }
Example #3
0
 private void Awake()
 {
     Instance = this;
     Deserialize();
 }