Skip to content

Instantly share code, notes, and snippets.

public class Blocks : MonoBehaviour {
public float thrust;
public Rigidbody rbB;
public GameObject myPrefab;
public Material Mat;
public Material[] randomMaterials;
public Transform dropPoint;
float x;
float z;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
public class Countdown : MonoBehaviour
{
public GameObject Canvas;
public GameObject Panel;
public GameObject SecretPanel;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Blocks : MonoBehaviour {
public float thrust;
public Rigidbody rbB;
public GameObject myPrefab;
public Material Mat;
public Material[] randomMaterials;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ball : MonoBehaviour
{
public Countdown count;
public GameObject myPrefab;
public float thrust;
public Rigidbody rb;
float timeLeft = 30.0f;
void Update()
{
timeLeft -= Time.deltaTime;
if(timeLeft < 0)
{
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Volume : MonoBehaviour
{
public Slider volumeSlider;
public AudioSource volumeAudio;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;
public class Countdown : MonoBehaviour
{
public GameObject ball;
public GameObject Canvas;
public GameObject Panel;
void Update()
{
if (rb.velocity.magnitude < roll)
{
rb.velocity = rb.velocity.normalized * roll;
}
}
x = Random.Range(0, 360);
Instantiate(myPrefab, new Vector3(0, 3f, 0), Quaternion.Euler(0, x, 0));
public IEnumerator StartCountdown(int countdownValue = 100)
{
currentTime = countdownValue;
while (currentTime > 0)
{
yield return new WaitForSeconds(1.0f);
currentTime--;
audio1.pitch = audio1.pitch + 0.0003f;
}