Example #1
0
    public BaseProjectile CreateProjectile(ProjectileType type, bool _isEnemy, int _damage, Vector3 _startPos, BaseObject _attacker, Vector3 _endPos, BaseObject _target)
    {
        BaseProjectile projectile = PrefabsManager.SpawnProjectile(type);

        projectile.Init(type, _isEnemy, _damage);
        projectile.InitPosition(_startPos, _endPos);
        projectile.InitObjects(_attacker, _target);

        projectileList.Add(projectile);
        return(projectile);
    }