public MainStateDemo() { GodSelectionState godSelectionState = new GodSelectionState { fromSide = SlidingSide.Right }; GodSelectionState godSelectionState2 = godSelectionState; godSelectionState2.onGodSelected = (Action <God>)Delegate.Combine(godSelectionState2.onGodSelected, new Action <God>(OnChildStateOnGodSelected)); this.SetChildState(godSelectionState, 0); }
private void GotoSubState(SubState state, SlidingSide fromSide, bool tween = true) { InactivityHandler.UpdateActivity(); if (state == SubState.GodSelection) { GodSelectionState godSelectionState = new GodSelectionState(); godSelectionState.onGodSelected = (Action <God>)Delegate.Combine(godSelectionState.onGodSelected, new Action <God>(OnGodSelected)); m_ui.SetStateIndex(0, tween); BaseFightSelectionState baseFightSelectionState = godSelectionState; m_ui.returnButton.set_interactable(false); baseFightSelectionState.fromSide = fromSide; baseFightSelectionState.onUIOpeningFinished = OnChildUIOpeningFinished; this.SetChildState(baseFightSelectionState, 0); return; } throw new ArgumentOutOfRangeException("state", state, null); }