Exemple #1
0
	void Awake () {
		jod = GetComponent<JamoDrum> ();
		jodkey = GetComponent<JamoDrumKeyVersion> ();
		launcher = GetComponent<SingleLauncher> ();
		platform = GameObject.Find("TracingPanel")
			.GetComponent<TracingPanel>();
		spawn = GameObject.FindGameObjectWithTag("SpawnController")
			.GetComponent<SpawnMarbles>();
		soundManager = GameObject.Find ("SoundManager")
			.GetComponent<SoundManagerScript>();

		if (launcher.key) {
			jodkey.AddHitEvent(HitHandler);
			jodkey.AddSpinEvent(SpinHandler);
		}
		else {
			jod.AddHitEvent(HitHandler);
			jod.AddSpinEvent(SpinHandler);
		}

		stateStartAction = () => {
			stateTimer = 0f;
			heroTapSum = 0;
			heroSpinSum = 0;
		};
	}
Exemple #2
0
    void Awake()
    {
        jod      = GetComponent <JamoDrum> ();
        jodkey   = GetComponent <JamoDrumKeyVersion> ();
        launcher = GetComponent <SingleLauncher> ();
        platform = GameObject.Find("TracingPanel")
                   .GetComponent <TracingPanel>();
        spawn = GameObject.FindGameObjectWithTag("SpawnController")
                .GetComponent <SpawnMarbles>();
        soundManager = GameObject.Find("SoundManager")
                       .GetComponent <SoundManagerScript>();

        if (launcher.key)
        {
            jodkey.AddHitEvent(HitHandler);
            jodkey.AddSpinEvent(SpinHandler);
        }
        else
        {
            jod.AddHitEvent(HitHandler);
            jod.AddSpinEvent(SpinHandler);
        }

        stateStartAction = () => {
            stateTimer  = 0f;
            heroTapSum  = 0;
            heroSpinSum = 0;
        };
    }