Exemplo n.º 1
0
    public void FireBullet(Vector2 direction)
    {
        GameObject bullet = (GameObject)Instantiate(PlayerBullet);

        bullet.transform.position = transform.position;

        BulletPhysics bulletPhysics = bullet.GetComponent <BulletPhysics>();

        bulletPhysics.playerSpeed = stats.currentSpeed;
        bulletPhysics.SetDirection(direction);
    }