non-vr lobby, version fix

This commit is contained in:
joonasp
2022-06-29 14:45:17 +03:00
parent 5774be9822
commit 04baadfad1
1774 changed files with 573069 additions and 1533 deletions

View File

@@ -4,9 +4,10 @@ using System.Runtime.InteropServices;
using Breakout;
using Unity.Mathematics;
using UnityEngine;
using Photon.Pun;
using Random = UnityEngine.Random;
public class BreakoutManager : MonoBehaviour
public class BreakoutManager : MonoBehaviourPunCallbacks
{
public GameObject defaultBreakablePrefab;
public GameObject extraBallBreakablePrefab;
@@ -71,7 +72,8 @@ public class BreakoutManager : MonoBehaviour
private void SpawnBall()
{
Instantiate(ballPrefab, startBallSpawnPoint.transform.position, Quaternion.identity, null);
PhotonNetwork.Instantiate("Ball_Network", startBallSpawnPoint.transform.position, Quaternion.identity);
//Instantiate(ballPrefab, startBallSpawnPoint.transform.position, Quaternion.identity, null);
_ballCount += 1;
}
@@ -95,11 +97,13 @@ public class BreakoutManager : MonoBehaviour
if (Random.value <= extraBallBreakableChance)
{
box = Instantiate(extraBallBreakablePrefab, point.position, Quaternion.identity, null);
box = PhotonNetwork.Instantiate("Breakable Cube Extra Ball_Network", point.position, Quaternion.identity);
//box = Instantiate(extraBallBreakablePrefab, point.position, Quaternion.identity, null);
}
else
{
box = Instantiate(defaultBreakablePrefab, point.position, Quaternion.identity, null);
box = PhotonNetwork.Instantiate("Breakable Cube_Network", point.position, Quaternion.identity);
//box = Instantiate(defaultBreakablePrefab, point.position, Quaternion.identity, null);
}
var cube = box.GetComponent<BreakableCube>();