public override IProjectile CreateProjectile(Vector3 origin, Vector3 originForward, EnemyData enemyData)
        {
            BulletProjectile projectile = Instantiate(m_BulletPrefab, origin, Quaternion.LookRotation(originForward, Vector3.up));

            projectile.SetBulletProperties(m_Speed, m_Damage);
            return(projectile);
        }
Beispiel #2
0
        public override IProjectile CreateProjectile(Vector3 origin, Vector3 originForward, EnemyData enemyData)
        {
            BulletProjectile projectile = GameObjectPool.Instantiate(m_BulletPrefab, origin, Quaternion.LookRotation(originForward, Vector3.up));

            projectile.SetAsset(this);
            return(projectile);
        }
        private float m_Damage; //5

        public override IProjectile CreateProjectile(Vector3 origin, Vector3 originForward, EnemyData enemyData)
        {
            BulletProjectile created = Instantiate(m_BulletProjectile, origin, Quaternion.LookRotation(originForward, Vector3.up));

            created.Init(m_Speed, m_Damage);
            return(created);
        }