Beispiel #1
0
	// tool func to get aoe affect pool
	public List < iVec2 > GetAOEPool( int nX , int nY , int nAoe )
	{
		iVec2 st = new iVec2 ( nX , nY );
		Dictionary< string , iVec2 > tmp = new Dictionary< string , iVec2 >();
		tmp.Add ( st.GetKey() , st );
		//			pool.Add ( st );
		
		AOE aoe = ConstDataManager.Instance.GetRow<AOE> ( nAoe ) ;
		if (aoe != null) {
			// add extra first
			cTextArray TA = new cTextArray();
			TA.SetText ( aoe.s_EXTRA );
			for( int i = 0 ; i < TA.GetMaxCol(); i++ )
			{
				CTextLine line  = TA.GetTextLine( i );
				for( int j = 0 ; j < line.GetRowNum() ; j++ )
				{
					string s = line.m_kTextPool[ j ];
					
					string [] arg = s.Split( ",".ToCharArray() );
					if( arg.Length < 2 )
						continue;
					if( arg[0] != null && arg[1] != null )
					{
						int x = int.Parse( arg[0] );
						int y = int.Parse( arg[1] );
						iVec2 v = st.MoveXY( x , y );

						if( Grids.Contain( v ) == false )
							continue;

						string key = v.GetKey();
						if( tmp.ContainsKey( key ) == false ){
							tmp.Add( key , v );
						}
					}
				}
			}
			// get range pool	
			List<iVec2> r = Grids.GetRangePool( st , aoe.n_MAX , aoe.n_MIN );
			
			
			
		}
		
		List < iVec2 > pool = new List < iVec2 > ();
		return pool;
	}