コード例 #1
0
ファイル: GonzalezScript.cs プロジェクト: cefong/JuanWick
    void Launch()
    {
        GameObject bulletObject = Instantiate(bulletPrefab, rigidbody.position, Quaternion.identity);

        GonzalezBullet bulletCopy = bulletObject.GetComponent <GonzalezBullet>();

        bulletCopy.Launch(lookDir, 300f);

        animator.SetTrigger("Launch");
    }
コード例 #2
0
ファイル: OpeningCinematic.cs プロジェクト: cefong/JuanWick
    void shoot(Vector2 shooter, Vector2 target)
    {
        Vector2    direction    = target - shooter;
        GameObject bulletObject = Instantiate(bulletPrefab, shooter, Quaternion.identity);

        GonzalezBullet bulletCopy = bulletObject.GetComponent <GonzalezBullet>();

        bulletCopy.Launch(direction, 300f);

        //animator.SetTrigger("Launch");
    }