コード例 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //_mViewMgr
            _mViewMgr = new ViewportMgr();
            //_mInputMgr
            _mInputMgr = new InputMgr();

            //Add Dedicated listeners
            IDedicatedListener temporaryMgr = (IDedicatedListener)_mViewMgr;

            _mInputMgr.AddDedicatedListener(temporaryMgr);

            IDedicatedListener tempGame = (IDedicatedListener)this;

            _mInputMgr.AddDedicatedListener(tempGame);

            _mEntArray = _mLevel.Populate(_mEntityMgr);


            foreach (IEntity tempEnt in _mEntArray)
            {
                _mSceneMgr.Add(tempEnt);
                _mCollisionMgr.AddCollider(tempEnt);
                _mMindBuilder.BuildMind(tempEnt);
                _mInputMgr.AddInputListener(tempEnt);
                _mViewMgr.AddTarget(tempEnt);
            }
        }
コード例 #2
0
ファイル: InputMgr.cs プロジェクト: Finn-Gale/Project-Bright
 //AddDedicatedListener - This method is used to add dedicet listeners
 public void AddDedicatedListener(IDedicatedListener plisten)
 {
     _mDedListen.Add(plisten);
 }