Example #1
0
        //* ────________________________________*
        //* methods ───────────────────────────────-*

        //* -----------------------------------------------------------------------*
        /// <summary>
        /// <para>状態が開始された時に呼び出されます。</para>
        /// <para>このメソッドは、遷移元の<c>teardown</c>よりも後に呼び出されます。</para>
        /// </summary>
        ///
        /// <param name="entity">この状態を適用されたオブジェクト。</param>
        /// <param name="privateMembers">
        /// オブジェクトと状態クラスのみがアクセス可能なフィールド。
        /// </param>
        public override void setup(CEntity entity, CGame privateMembers)
        {
            CLogger.add(Resources.SCENE_INITIALIZE);
            entity.allowSameState = true;
            CGame.instance.Content.RootDirectory = Resources.DIR_CONTENT;
            CStateCapsXNA xnastate = CStateCapsXNA.instance;

            xnastate.nextState          = CAIInupt.instance;
            aiInitializer.nextState     = xnastate;
            aiInitializer.changedState += onInitializerChanged;
        }
Example #2
0
        //* ────________________________________*
        //* methods ───────────────────────────────-*

        //* -----------------------------------------------------------------------*
        /// <summary>ゲームを初期化します。</summary>
        protected override void Initialize()
        {
            CStateCapsXNA xnastate = CStateCapsXNA.instance;

            xnastate.nextState       = CStateInitialize.instance;
            CStarter.scene.nextState = xnastate;
#if !DEBUG
            CLogger.outFile = Resources.FILE_BOOTLOG;
            CLogger.add(xnastate.report);
#endif
            CStarter.startNineball(this, graphicDeviceManager);
            inputManager.ButtonsNum        = 1;
            inputManager.inputDevice       = EInputDevice.XBOX360 | EInputDevice.Keyboard;
            inputManager.keyboardAssign    = new Keys[] { Keys.Space };
            inputManager.xbox360Assign     = new Buttons[] { Buttons.A };
            inputManager.xbox360AxisAssign = EAxisXBOX360.DPad;
            new CGameComponent(this, inputManager, true);
            base.Initialize();
        }