Example #1
0
 void Start()
 {
     cont = 0;
     ballPrefab = (GameObject)Resources.Load("Prefabs/BrickBall");
     counter = GameObject.Find("Counter").GetComponent<BallSpawnCount>();
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        counter = GameObject.Find("Counter").GetComponent<BallSpawnCount>();

        currentTime = Time.time;

        jumpS = gameObject.AddComponent<AudioSource>();
        jumpS.clip = Resources.Load("Sounds/platform_jump") as AudioClip;

        kickS = gameObject.AddComponent<AudioSource>();
        kickS.clip = Resources.Load("Sounds/platform_kick") as AudioClip;

        blinkS = gameObject.AddComponent<AudioSource>();
        blinkS.clip = Resources.Load("Sounds/Blink") as AudioClip;

        surgeS = gameObject.AddComponent<AudioSource>();
        surgeS.clip = Resources.Load("Sounds/Surge") as AudioClip;

        pieceMove = gameObject.AddComponent<AudioSource>();
        pieceMove.clip = Resources.Load("Sounds/tetris_move") as AudioClip;

        pieceLand = gameObject.AddComponent<AudioSource>();
        pieceLand.clip = Resources.Load("Sounds/tetris_land") as AudioClip;

        lineClear = gameObject.AddComponent<AudioSource>();
        lineClear.clip = Resources.Load("Sounds/tetris_SpecialLineClearSingle") as AudioClip;

        ballBounce = gameObject.AddComponent<AudioSource>();
        ballBounce.clip = Resources.Load("Sounds/brick_ball_bounce") as AudioClip;

        brickHit = gameObject.AddComponent<AudioSource>();
        brickHit.clip = Resources.Load("Sounds/brick_hitball") as AudioClip;

        charDeadS = gameObject.AddComponent<AudioSource>();
        charDeadS.clip = Resources.Load("Sounds/DEAD") as AudioClip;
    }