コード例 #1
0
    public void Launch()
    {
        GameObject  projectileObject = Instantiate(projectilePrefab, rigidbody2d.position + Vector2.up * 0.5f, Quaternion.identity);
        Projectiles projectile       = projectileObject.GetComponent <Projectiles>();

        projectile.Launch(lookDirection, 300);

        playerAnimator.SetTrigger("Launch");
    }