Example #1
0
        private void HandleLifecycleChangeState([NotNull, ValidatedNotNull] IClientPluginContext context,
                                                [NotNull, ValidatedNotNull] LifecycleChangeStateArgs lifecycleChangeStateArgs)
        {
            Debug.Assert(mButtonTexture != null, nameof(mButtonTexture) + " != null");

            var activeInterface = context.Lifecycle.Interface;

            if (activeInterface == null)
            {
                return;
            }

            switch (lifecycleChangeStateArgs.State)
            {
            case GameStates.Menu:
                AddButtonToMainMenu(context, activeInterface);
                break;
            }
        }
Example #2
0
        /// <inheritdoc />
        public void OnLifecycleChangeState(GameStates state)
        {
            var lifecycleChangeStateArgs = new LifecycleChangeStateArgs(state);

            LifecycleChangeState?.Invoke(Context, lifecycleChangeStateArgs);
        }