} //END Shrink //-------------------------------// public virtual void OnLookAt() //-------------------------------// { //Figure out how much time is remaining to fill in the fill circle (it doesn't reset to zero when a player exits the collider, we continue where we left off) float enterColliderSpeed = float_EnterColliderSpeed; if( image_IconFill != null ) { enterColliderSpeed = float_EnterColliderSpeed - image_IconFill.fillAmount; } //Increase the size of the block's icon only, not the collider Grow(); //Tween the fill circle if( image_IconFill != null ) { image_IconFill.Kill(); image_IconFill.fillAmount = 0f; image_IconFill.ImageFill( 1f, enterColliderSpeed, EaseCurve.Linear ); } //Play the fill sfx FadeOutFillSFX(); if( audioSourceFillImage != null && audioSourceFillImage.clip != null ) { audioSourceFillImage.volume = 1f; audioSourceFillImage.loop = true; audioSourceFillImage.Play(); audioSourceFillImage.AudioPitch( 1.25f, enterColliderSpeed, EaseCurve.Linear ); } //Set a boolean to keep track of when we're loading and not loading the pin tryingToActivateButton = true; //Set a timer to go off, when it does we'll fade out the fill sfx handle_FadeOutFillSFX = Timer.instance.In( enterColliderSpeed - .15f, FadeOutFillSFX, gameObject ); //Set a timer to go off, when it finishes we'll call OnSelect handle_StartEnterTimer = Timer.instance.In( enterColliderSpeed + .01f, OnSelect, gameObject ); } //END OnLookAt