public override void Construct(MultiformTransmissionData args)
        {
            if (args.SenderName == LevelMultiform.MultiformName)
            {
                LevelNameInfo = args.GetAttr<LevelNameInfo>("LevelNameInfo");
            }
            else
            {
                throw new MultiformException(
                    String.Format("Unknown multiform layout: '{0}' -> '{1}'.", args.SenderName, MultiformName)
                    );
            }

            Construct_Text();
            Construct_Buttons();

            RegisterForm(new ClickParticleSpawnerForm());

            FadeIn(20, Color.White, Update_Main, Render_Main);
        }
        public override void Construct(MultiformTransmissionData args)
        {
            // Reinitialize variables that may have been carried over from the last
            // time the multiform was loaded.
            TimeOfMessagesCopied = -1;
            ResetTime();
            WarningMessages.Clear();
            RegisteredTextForms.Clear();

            LevelNameInfo = args.GetAttr<LevelNameInfo>("LevelNameInfo");
            LevelInfo = new LevelInfo(LevelNameInfo.LevelName);

            FatalError = LevelInfo.Exception != null;
            if (FatalError)
            {
                ErrorMessage = LevelInfo.Exception.Message;
            }

            if (LevelInfo != null && LevelInfo.WarningMessages.Count > 0)
            {
                WarningMessages.AddRange(LevelInfo.WarningMessages);
            }

            TransmissionData = new MultiformTransmissionData(MultiformName);
            TransmissionData.SetAttr<LevelNameInfo>("LevelNameInfo", LevelNameInfo);
            TransmissionData.SetAttr<LevelInfo>("LevelInfo", LevelInfo);

            ConstructMessageForms();

            SetUpdater(Update_Main);
            SetRenderer(Render_Main);
        }
        public override void Construct(MultiformTransmissionData args)
        {
            LevelNameInfo = args == null ? new LevelNameInfo(0) : args.GetAttr<LevelNameInfo>("LevelNameInfo");
            LevelInfo = args.GetAttr<LevelInfo>("LevelInfo");

            RegisterForm(BoardFormName, new BoardForm(LevelInfo));
            RegisterForm(InventoryFormName, new InventoryForm(LevelInfo));
            RegisterForm(BackButtonFormName, new GUIButton(
                BackButtonInfo, BackButtonBottomLeft, PositionType.BottomLeft));

            HasTutorialForm = LevelInfo.TutorialNumber.HasValue;
            if (HasTutorialForm)
            {
                var num = LevelInfo.TutorialNumber.Value;
                RegisterForm(TutorialFormName, TutorialManager.GetTutorial(num));
            }

            FadeIn(20, Color.White, Update_Main, Render_Main);
        }
        public override void Construct(MultiformTransmissionData args)
        {
            LevelNameInfo = args == null ? new LevelNameInfo(0) : args.GetAttr<LevelNameInfo>("LevelNameInfo");
            LevelInfo = args.GetAttr<LevelInfo>("LevelInfo");

            RegisterForm(BoardFormName, new BoardForm(LevelInfo));
            RegisterForm(InventoryFormName, new InventoryForm(LevelInfo));
            RegisterForm(BackButtonFormName, new GUIButton(
                BackButtonInfo, BackButtonBottomLeft, PositionType.BottomLeft));

            FadeIn(20, Color.White, Update_Main, Render_Main);
        }