public void Update() { State.Transit(); if (Input.GetKey(KeyCode.UpArrow)) { State = new FaderOutState(this, Duration, FollowUpScene); } }
public void GeneralSetup(AFaderStates state, float duration) { isTransitioning = true; Duration = duration; Transition = (state.GetType() == typeof(FaderInState)) ? 1 : 0; }
public void Start() { Instance = this; State = new FaderInState(this, Duration); //FaderInState is always used, when the scene starts. }