Esempio n. 1
0
 /// <summary>
 /// Set Texture path
 /// </summary>
 /// <param name="_path"> Texture Path</param>
 public virtual void setVars(string _path, IContent_Manager _cm)
 {
     mTexturename          = _path;
     mContentManager       = _cm;
     mTexture              = mContentManager.ApplyTexture(mTexturename);
     mCurrentTextureHeight = mTexture.Height;
     mCurrentTextureWidth  = mTexture.Width;
 }
Esempio n. 2
0
 /// <summary>
 /// Main Constructor
 /// </summary>
 /// <param name="_sl">Reference to Service Locator</param>
 /// <param name="_cm">Reference to Content Manager</param>
 public Entity_Manager(IServiceLocator _sl, IContent_Manager _cm)
 {
     // Set UID counter to 0 for first object
     UID = 1;
     // Initialise Deletion List
     mDeletions      = new Dictionary <int, IEntity>();
     mServiceLocator = _sl;
     mContentManager = _cm;
 }
Esempio n. 3
0
 /// <summary>
 /// Allows the Menu to initialize itself
 /// Sets up references to the managers and camera
 /// </summary>
 /// <param name="_sl">Reference to the service locator</param>
 /// <param name="_cam">Reference to the 2D Camera</param>
 public virtual void Initialize(IServiceLocator _sl, Camera2D _cam)
 {
     mServiceLocator    = _sl;
     mInputManager      = mServiceLocator.GetService <IInput_Manager>();
     mBackgroundManager = mServiceLocator.GetService <IBackground_Manager>();
     mEntityManager     = mServiceLocator.GetService <IEntity_Manager>();
     mContentManager    = mServiceLocator.GetService <IContent_Manager>();
     mLevelManger       = mServiceLocator.GetService <ILevel_Manager>();
     mCam = _cam;
     //Subscribe();
 }
Esempio n. 4
0
        /// <summary>
        /// Main Constructor
        /// </summary>
        /// <param name="_sl">Reference to Service Locator</param>
        /// <param name="_lines">Lines to display</param>
        /// <param name="_path">Character art path</param>
        /// <param name="_pos">Character art position</param>
        /// <param name="_speaker">Reference to the speaker</param>
        public DialogueDisplay(IServiceLocator _sl, string[] _lines, string _path, ISpeaker _speaker)
        {
            mLines = _lines;

            mInterval       = 3000f;
            mTimer          = 0f;
            mDialogueBox    = new DialogueBox(_sl);
            mInputManager   = _sl.GetService <IInput_Manager>();
            mContentManager = _sl.GetService <IContent_Manager>();
            mArtpath        = _path;
            mSpeaker        = _speaker;
        }
Esempio n. 5
0
 /// <summary>
 /// Set Core Variables
 /// </summary>
 /// <param name="_path">Path to the Texture</param>
 /// <param name="_cm">Reference to the Content Manager</param>
 public override void setVars(string _path, IContent_Manager _cm)
 {
     base.setVars(_path, _cm);
     if (_path == "Characters/Player/standR")
     {
         mFacingDirection = "standR";
     }
     else if (_path == "Characters/Player/standL")
     {
         mFacingDirection = "standL";
     }
 }
Esempio n. 6
0
 public override void setVars(string _path, IContent_Manager _cm)
 {
     base.setVars(_path, _cm);
     if (_path == "Characters/Nurse1/standR")
     {
         mCurrDir = GMTB.Entities.FacingDirection.Right;
     }
     else if (_path == "Characters/Nurse1/standL")
     {
         mCurrDir = GMTB.Entities.FacingDirection.Left;
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Set Variables override
 /// </summary>
 /// <param name="_path">Texture Path</param>
 /// <param name="_cm">Content Manager Refence</param>
 public override void setVars(string _path, IContent_Manager cm)
 {
     base.setVars(_path, cm);
     mRectangle = new Rectangle((int)mPosition.X, (int)mPosition.Y, mTexture.Width, mTexture.Height);
 }
Esempio n. 8
0
 /// <summary>
 /// Main Constructor
 /// </summary>
 /// <param name="_sl">Reference to Service Locator</param>
 /// <param name="_pos">Position to render text</param>
 public DialogueBox(IServiceLocator _sl)
 {
     mContentManager = _sl.GetService <IContent_Manager>();
     mFont           = mContentManager.LoadFont("Text");
 }
Esempio n. 9
0
        ///// Accessor for Texture
        //public Texture2D Texture
        //{
        //    set { mBackground = value; }
        //}
        #endregion

        #region Constructor
        /// <summary>
        /// Main Constructor
        /// </summary>
        /// <param name="_cm">Reference to the Content Manger</param>
        public Background_Manager(IContent_Manager _cm)
        {
            mContentManager = _cm;
            mXPos           = 0;
            mYPos           = 75;
        }