Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        // Get Reference to Init Script
        //StartCoroutine(BuildUp());
        noteBoard = GameObject.Find("NoteBoard").GetComponent <NoteBoard>();

        tavern = GameObject.Find("Tavern").GetComponent <taverne>();
        tavern.Subscribe(this);

        col = GameObject.Find("Collision").GetComponent <Collision>();
        col.Subscribe(this);

        init = GameObject.Find("Init").GetComponent <Init>();
        init.Subscribe(this);

        // null
        keyPressed = 0;

        notes        = noteBoard.notes;
        mode         = 0;
        jumping      = null;
        usingGuitar  = false;
        handsInit    = false;
        allowPlaying = false;

        steps = new AudioClip[3];

        // Audio from Asset Store -> Universal Sound FX by imphenzia
        walking        = gameObject.AddComponent <AudioSource>();
        steps[0]       = Resources.Load <AudioClip>("Universal Sound FX/HUMAN/Footsteps/Leather_Wood_Hollow_Jog/FOOTSTEP_Leather_Wood_Hollow_Jog_RR3_mono");
        steps[1]       = Resources.Load <AudioClip>("Universal Sound FX/HUMAN/Footsteps/Leather_Wood_Hollow_Jog/FOOTSTEP_Leather_Wood_Hollow_Jog_RR5_mono");
        steps[2]       = Resources.Load <AudioClip>("Universal Sound FX/HUMAN/Footsteps/Leather_Wood_Hollow_Jog/FOOTSTEP_Leather_Wood_Hollow_Jog_RR6_mono");
        walking.volume = 0.40f;
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        //StartCoroutine(WaitForStage());
        taverne = GameObject.Find("Tavern").GetComponent <taverne>();
        taverne.Subscribe(this);

        init = GameObject.Find("Init").GetComponent <Init>();
        init.Subscribe(this);

        noteBoard = GameObject.Find("NoteBoard").GetComponent <NoteBoard>();
        noteBoard.Subscribe(this);

        control = GameObject.Find("Control").GetComponent <Control>();
        control.Subscribe(this);
    }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        tavern = GameObject.Find("Tavern").GetComponent <taverne>();
        tavern.Subscribe(this);

        initialized         = false;
        height              = 2f;
        particleSystems     = new ParticleSystem[numberOfCandles];
        candles             = new GameObject[numberOfCandles];
        wicks               = new GameObject[numberOfCandles];
        candleHolders       = new GameObject[numberOfCandles];
        candleMeshs         = new Mesh[numberOfCandles];
        newVertices         = new Vector3[numberOfCandles][];
        lastLayerIndexStart = new int[numberOfCandles];
        isLit               = new bool[numberOfCandles];
        lights              = new Light[numberOfCandles];
    }
Beispiel #4
0
    void Start()
    {
        control = GameObject.Find("Control").GetComponent <Control>();

        tavern = GameObject.Find("Tavern").GetComponent <taverne>();
        tavern.Subscribe(this);

        board = GameObject.Find("NoteBoard").GetComponent <NoteBoard>();

        //StartCoroutine(WaitForTavern());

        // Audio from Asset Store -> Universal Sound FX by imphenzia
        start        = gameObject.AddComponent <AudioSource>();
        start.clip   = Resources.Load <AudioClip>("Universal Sound FX/Voices/Exclamations/EXCLAMATION_Male_B_Horray_01_mono");
        start.volume = 0.2f;

        mode = control.GetMode();
    }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        //JOERG REFERENCE
        noteReader = GameObject.Find("NoteReader").GetComponent <NoteReader>();

        control = GameObject.Find("Control").GetComponent <Control>();

        tavern = GameObject.Find("Tavern").GetComponent <taverne>();
        tavern.Subscribe(this);

        cc = GameObject.Find("Main Camera").GetComponent <CameraControl>();

        despawningNotes = new GameObject[noteArrSize];

        music = GetComponent <AudioSource>();

        bad            = 0;
        good           = 0;
        great          = 0;
        scoreCRrunning = false;
        fpsToLow       = false;
        initNoteBound  = true;
        finished       = false;
        lastScoreCR    = null;
        curNotePos     = 0;
        curNoteEndPos  = 0;
        fpsCap         = 60;
        fadeTimeMusic  = 3;

        murmur        = gameObject.AddComponent <AudioSource>();
        murmur.clip   = Resources.Load <AudioClip>("Universal Sound FX/AMBIENCES/Crowds/AMBIENCE_Public_Hall_Chatter_01_loop_stereo");
        murmur.loop   = true;
        murmur.volume = 0.05f;
        murmur.Play();

        // Correct fading
        fadeTime     = fadeBaseTime * moveAlongScreenBase / moveAlongScreen;
        fadeInterval = fadeBaseInterval * moveAlongScreenBase / moveAlongScreen;
        fadeInDelay  = fadeInBaseDelay * moveAlongScreenBase / moveAlongScreen;
        acceptance   = baseAcceptance * moveAlongScreenBase / moveAlongScreen;
        scoreTime    = baseScoreTime * moveAlongScreenBase / moveAlongScreen;
    }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        NoteBoard = GameObject.Find("NoteBoard").GetComponent <NoteBoard>();
        NoteBoard.Subscribe(this);

        Taverne = GameObject.Find("Tavern").GetComponent <taverne>();
        Taverne.Subscribe(this);

        mpty        = new GameObject();
        empty       = new GameObject[] { mpty };
        tavernReady = false;
        //creating Audience
        //StartCoroutine(WaitForTavern());

        //audio stuff
        prevJam         = 0;
        differentVoices = new AudioClip[4];
        badPlayed       = false;
        goodPlayed      = false;
        greatPlayed     = false;

        // Audio from Asset Store -> Universal Sound FX by imphenzia
        voices = gameObject.AddComponent <AudioSource>();
        // Bad
        differentVoices[0] = Resources.Load <AudioClip>("Universal Sound FX/AUDIENCES/Medieval_Jousting_Tournament/AUDIENCE_Bhoos_01_stereo");
        // Good
        differentVoices[1] = Resources.Load <AudioClip>("Universal Sound FX/AUDIENCES/Medieval_Jousting_Tournament/AUDIENCE_Claps_and_Cheers_02_stereo");
        // Great
        differentVoices[2] = Resources.Load <AudioClip>("Universal Sound FX/AUDIENCES/Medieval_Jousting_Tournament/AUDIENCE_Claps_and_Cheers_05_stereo");
        // Great to Good
        differentVoices[3] = Resources.Load <AudioClip>("Universal Sound FX/AUDIENCES/Medieval_Jousting_Tournament/AUDIENCE_Claps_and_Bhoos_01_stereo");
        voices.volume      = 0.30f;

        //inital grades
        great = 0;
        good  = 0;
        bad   = 0;

        //measure jam after each beat
        //StartCoroutine(WaitForNoteBoard());
    }