コード例 #1
0
ファイル: Shove.cs プロジェクト: zCoLtX45z/Capstone_PPP
    private void RPC_CollidePlayer(GameObject player, Vector3 Direction)
    {
        Shove shove = player.GetComponent <Shove>();

        if (shove.ShieldStrength / (ShieldStrength + 0.1f) < 0.8f && ShieldStrength > 0.4f)
        {
            BallHandling bh = player.GetComponent <BallHandling>();
            bh.DropBall();
            shove.LaunchPlayer(MaxShoveForce, Direction);
        }
        else
        {
            shove.LaunchPlayer(MaxShoveForce * 0.5f, Direction);
            LaunchPlayer(MaxShoveForce * 0.5f, Direction);
        }
    }
コード例 #2
0
ファイル: Shove.cs プロジェクト: zCoLtX45z/Capstone_PPP
    private void RPC_ShovePlayer(int player, Vector3 Direction)
    {
        // Debug.Log("RpcShovePlayer Called");
        Shove shove = PhotonView.Find(player).GetComponent <Shove>();

        shove.LaunchPlayer(MaxShoveForce, Direction);
        BallHandling bh = PhotonView.Find(player).GetComponent <BallHandling>();

        bh.DropBall();
    }