コード例 #1
0
ファイル: Snake.cs プロジェクト: akil03/bx
    public void FireFreeze()
    {
        GameObject go;

        if (PhotonNetwork.inRoom)
        {
            int val = 0;
            val = (AccountDetails.instance.playerData.freeze);
            go  = PhotonNetwork.Instantiate("Particles/" + FreezeParticle.name, transform.position, transform.rotation, 0, new object[] { val });
        }
        else
        {
            go = Instantiate(FreezeParticle);
            go.transform.position = transform.position;
            ProjectileScript projectile = go.GetComponent <ProjectileScript>();
            projectile.level = AccountDetails.instance.playerData.freeze;
            if (isBot)
            {
                projectile.Launch(InGameGUI.instance.userSnake);
            }
            else
            {
                projectile.Launch(InGameGUI.instance.opponentSnake);
            }
        }
    }
コード例 #2
0
    private void LaunchProjectile()
    {
        ProjectileScript ps = latestProjectile.GetComponent <ProjectileScript>();

        Vector3 launchVector = GetLaunchVector();

        ps.Launch(launchVector, GetCurve(launchVector));
        Invoke("SpawnProjectile", projectileCooldown);
        canLaunch = false;

        gameManager.ProjectileShot();
    }