Esempio n. 1
0
        //Called on selection change
        protected override void AssignByIndex()
        {
            ModeDetails details = m_ModeList[m_CurrentIndex];

            m_ModeName.text    = details.modeName;
            m_Description.text = details.description;
        }
Esempio n. 2
0
        /// <summary>
        /// Sets up single player
        /// </summary>
        /// <param name="mapIndex">Map index.</param>
        /// <param name="modeDetails">Mode details.</param>
        public void SetupSinglePlayer(int mapIndex, ModeDetails modeDetails)
        {
            this.map      = m_SinglePlayerMapList[mapIndex];
            this.mapIndex = mapIndex;
            if (mapChanged != null)
            {
                mapChanged(map);
            }

            SetMode(modeDetails, -1);
        }
Esempio n. 3
0
        /// <summary>
        /// Sets up single player
        /// </summary>
        /// <param name="map">Map.</param>
        /// <param name="modeDetails">Mode details.</param>
        public void SetupSinglePlayer(MapDetails map, ModeDetails modeDetails)
        {
            this.map      = map;
            this.mapIndex = -1;
            if (mapChanged != null)
            {
                mapChanged(map);
            }

            SetMode(modeDetails, -1);
        }
Esempio n. 4
0
        /// <summary>
        /// Sets the mode.
        /// </summary>
        /// <param name="mode">Mode.</param>
        /// <param name="modeIndex">Mode index.</param>
        private void SetMode(ModeDetails mode, int modeIndex)
        {
            this.mode      = mode;
            this.modeIndex = modeIndex;
            if (modeChanged != null)
            {
                modeChanged(mode);
            }

            mode.rulesProcessor.GetColorProvider().Reset();
            scoreTarget = mode.rulesProcessor.scoreTarget;
        }
Esempio n. 5
0
 /// <summary>
 /// Uses provided mode data to populate game mode descriptions, etc. on this screen.
 /// </summary>
 /// <param name="mode">ModeDetails from which to draw data</param>
 public void UpdateModeDetails(ModeDetails mode)
 {
     if (m_ModeName != null)
     {
         m_ModeName.text = mode.modeName;
     }
     if (m_ModeDescription != null)
     {
         m_ModeDescription.text = mode.description;
     }
     EnableArrayOfGameObjects(m_ModeObjects, true);
     m_HasUpdateMode = true;
 }
Esempio n. 6
0
        /// ---------------------------------------------------------------------------------------------------------------
        /// <summary>
        /// Sets the mode.
        /// </summary>
        /// ---------------------------------------------------------------------------------------------------------------
        private void SetMode(ModeDetails mode, int modeIndex)
        {
            this.mode      = mode;
            this.modeIndex = modeIndex;
            if (modeChanged != null)
            {
                modeChanged(mode);
            }

            if (mode.rulesProcessor != null)
            {
                scoreTarget = mode.rulesProcessor.scoreTarget;
            }
        }
Esempio n. 7
0
    public ErrCode SaveMode(ModeDetails md, out int id)
    {
        ErrCode err = SiteProvider.CurrentProvider.SaveMode(md, out id);

        return err;
    }