Beispiel #1
0
    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);
        }
    }
Beispiel #2
0
    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();
    }