Example #1
0
    private void Fire()
    {
        current_time = current_time - attack_speed;
        ProjectileBehavior bullet = GameObject.Instantiate(projectile_template);

        bullet.transform.position = tower_turret.transform.position;
        bullet.Init(projectile, target.transform, damage);
    }
Example #2
0
    private void Fire()
    {
        current_time = current_time - attack_speed;
        ProjectileBehavior bullet = GameObject.Instantiate(projectile);

        bullet.transform.position = new Vector3(turret.position.x, turret.position.y, 0f);
        bullet.Init(null, target.transform, damage);
    }