Exemplo n.º 1
0
 public void RemoveStrategy(PageStrategy strategy)
 {
     if (this.mStrategies.ContainsKey(strategy.Name))
     {
         this.mStrategies.Remove(strategy.Name);
     }
 }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
        public PagedWorldSection CreateSection(PageStrategy strategy, SceneManager sceneMgr, string sectionName)
        {
            PagedWorldSection ret = CreateSection(sceneMgr, "General", sectionName);

            ret.Strategy = strategy;
            return(ret);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 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;
        }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 public PagedWorldSection CreateSection(PageStrategy strategy, SceneManager sceneMgr)
 {
     return(CreateSection(strategy, sceneMgr, string.Empty));
 }
Exemplo n.º 9
0
		public void RemoveStrategy( PageStrategy strategy )
		{
			if ( this.mStrategies.ContainsKey( strategy.Name ) )
			{
				this.mStrategies.Remove( strategy.Name );
			}
		}
Exemplo n.º 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 );
		}
Exemplo n.º 11
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="strategy"></param>
 public void RemoveStrategy(PageStrategy strategy)
 {
     mStrategies.Remove(strategy.Name);
 }
Exemplo n.º 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);
 }
Exemplo n.º 13
0
		public PagedWorldSection CreateSection( PageStrategy strategy, SceneManager sceneMgr, string sectionName )
		{
			PagedWorldSection ret = CreateSection( sceneMgr, "General", sectionName );
			ret.Strategy = strategy;
			return ret;
		}