Beispiel #1
0
 public void RemoveStrategy(PageStrategy strategy)
 {
     if (this.mStrategies.ContainsKey(strategy.Name))
     {
         this.mStrategies.Remove(strategy.Name);
     }
 }
Beispiel #2
0
        public PagedWorldSection CreateSection(string strategyName, SceneManager sceneMgr, string sectionName)
        {
            // get the strategy
            PageStrategy strategy = this.mManager.GetStrategy(strategyName);

            return(CreateSection(strategy, sceneMgr, sectionName));
        }
Beispiel #3
0
        public PagedWorldSection CreateSection(PageStrategy strategy, SceneManager sceneMgr, string sectionName)
        {
            PagedWorldSection ret = CreateSection(sceneMgr, "General", sectionName);

            ret.Strategy = strategy;
            return(ret);
        }
Beispiel #4
0
        public void AddStrategy(PageStrategy strategy)
        {
            // note - deliberately allowing overriding
            if (this.mStrategies.ContainsKey(strategy.Name))
            {
                this.mStrategies[strategy.Name] = strategy;
                return;
            }

            this.mStrategies.Add(strategy.Name, strategy);
        }
Beispiel #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="name"></param>
 /// <param name="parent"></param>
 /// <param name="strategy"></param>
 public PagedWorldSection(string name, PageWorld parent, PageStrategy strategy,
     SceneManager sm)
 {
     mName = name;
     mParent = parent;
     Strategy = strategy;
     mSceneMgr = sm;
 }
Beispiel #6
0
        /// <summary>
        /// Create a new section of the world.
        /// </summary>
        /// <param name="strategyName"></param>
        /// <param name="sceneMgr"></param>
        /// <param name="sectionName"></param>
        /// <returns></returns>
        PagedWorldSection CreateSection(PageStrategy strategy, SceneManager sceneMgr,
            string sectionName)
        {
            string theName = sectionName;
            if (theName == string.Empty)
            {
                do
                {
                    theName = mSectionNameGenerator.GetNextUniqueName();
                }
                while (!mSections.ContainsKey(theName));
            }
            else if (mSections.ContainsKey(theName))
            {
                throw new Exception("World section named '" + theName + "' allready exists!" + 
                "[PageWorld.CreateSection]");
            }

            PagedWorldSection ret = new PagedWorldSection(theName, this, strategy, sceneMgr);
            mSections.Add(theName, ret);
            return ret;
        }
Beispiel #7
0
 /// <summary>
 /// Create a new section of the world.
 /// </summary>
 /// <param name="strategyName"></param>
 /// <param name="sceneMgr"></param>
 /// <returns></returns>
 PagedWorldSection CreateSection(PageStrategy strategy, SceneManager sceneMgr)
 {
     return CreateSection(strategy, sceneMgr, string.Empty);
 }
Beispiel #8
0
 public PagedWorldSection CreateSection(PageStrategy strategy, SceneManager sceneMgr)
 {
     return(CreateSection(strategy, sceneMgr, string.Empty));
 }
Beispiel #9
0
		public void RemoveStrategy( PageStrategy strategy )
		{
			if ( this.mStrategies.ContainsKey( strategy.Name ) )
			{
				this.mStrategies.Remove( strategy.Name );
			}
		}
Beispiel #10
0
		public void AddStrategy( PageStrategy strategy )
		{
			// note - deliberately allowing overriding
			if ( this.mStrategies.ContainsKey( strategy.Name ) )
			{
				this.mStrategies[ strategy.Name ] = strategy;
				return;
			}

			this.mStrategies.Add( strategy.Name, strategy );
		}
Beispiel #11
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="strategy"></param>
 public void RemoveStrategy(PageStrategy strategy)
 {
     mStrategies.Remove(strategy.Name);
 }
Beispiel #12
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="strategy"></param>
 public void AddStrategy(PageStrategy strategy)
 {
     // note - deliberately allowing overriding
     if (mStrategies.ContainsKey(strategy.Name))
     {
         mStrategies.Remove(strategy.Name);
     }
     mStrategies.Add(strategy.Name, strategy);
 }
Beispiel #13
0
		public PagedWorldSection CreateSection( PageStrategy strategy, SceneManager sceneMgr, string sectionName )
		{
			PagedWorldSection ret = CreateSection( sceneMgr, "General", sectionName );
			ret.Strategy = strategy;
			return ret;
		}