Fader.FadeIn C# (CSharp) Метод

FadeIn() публичный статический Метод

public static FadeIn ( float time = 2f ) : void
time float
Результат void
	public static void FadeIn( float time = 2f){
		Screen.CrossFadeAlpha (1f, time, false);
		Screen.GetComponent<Fader>().Invoke ("Enable", time);
	}

Usage Example

Пример #1
0
    //-------------------------------------------------------------------------
    //                        CLASS METHOD DEFINITIONS
    //-------------------------------------------------------------------------
    void Awake()
    {
        // position the again button
        AgainButton.SetScale(0.25f);
        ExitButton.SetScale(0.25f);

        float off = 50;

        Vector2 pos = new Vector2();
        pos.x = Screen.width/2.0f - (AgainButton.GetWidth() + ExitButton.GetWidth() + 50)/2.0f;
        pos.y = 40.0f;

        AgainButton.SetPosition(pos);

        // position the exit button

        pos.x = Screen.width/2.0f + (ExitButton.GetWidth())/2.0f;
        pos.y = 40.0f;

        ExitButton.SetPosition(pos);

        // set the fading parameters for the beginning fade in of the game
        // over screen
        fader_ = new Fader(0.0f, 3.0f, 3.0f);
        fader_.FadeIn();

        // set the initial update state to fade in
        update_ = fadeIn;
    }
All Usage Examples Of Fader::FadeIn