void Start() { powerup_meter = GameObject.FindObjectOfType <PowerupMeter>(); movement_vector_scaler = INITIAL_MAGNITUDE_SCALER; wcl = GameObject.FindObjectOfType <WallController>(); photon_view = GetComponent <PhotonView>(); breakshot = GameObject.FindObjectOfType <Breakshot>(); audio_source = GetComponent <AudioSource>(); audio_source.clip = balls_bounce; }
public void InitializeBreakshot() { Breakshot preexisting = GameObject.FindObjectOfType <Breakshot>(); if (preexisting) { Destroy(preexisting); } if (PhotonNetwork.connected && PhotonNetwork.isMasterClient) { GameObject g = PhotonNetwork.Instantiate(breakshot_prefab.name, new Vector3(0, 0, 0), Quaternion.identity, 0) as GameObject; g.GetComponent <Breakshot>().IsPracticeArena = PhotonNetwork.playerList.Length < 2; } else { GameObject g = Instantiate(breakshot_prefab, new Vector3(0, 0, 0), Quaternion.identity) as GameObject; g.GetComponent <Breakshot>().IsPracticeArena = true; } }
void Trigger() { breakshot = GameObject.FindObjectOfType <Breakshot>(); //breakshot.Trigger(); breakshot.RSGHasCompleted(); }