コード例 #1
0
        public Transition(string iDescription, string iHashKey, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            this.m_HashKey     = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles    = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File        = null;
            this.m_Description = iDescription;
            this.m_HashKey.AddHashKey(iHashKey);

            IEnumerator enumerator = iMapTiles.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    MapTile value = (MapTile)enumerator.Current;
                    this.m_MapTiles.Add(value);
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    ((IDisposable)enumerator).Dispose();
                }
            }

            IEnumerator enumerator2 = iStaticTiles.GetEnumerator();

            try
            {
                while (enumerator2.MoveNext())
                {
                    StaticTile value2 = (StaticTile)enumerator2.Current;
                    this.m_StaticTiles.Add(value2);
                }
            }
            finally
            {
                if (enumerator2 is IDisposable)
                {
                    ((IDisposable)enumerator2).Dispose();
                }
            }
        }
コード例 #2
0
        public Transition(string iDescription, string iHashKey, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            this.m_HashKey = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File = null;
            this.m_Description = iDescription;
            this.m_HashKey.AddHashKey(iHashKey);

            IEnumerator enumerator = iMapTiles.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    MapTile value = (MapTile)enumerator.Current;
                    this.m_MapTiles.Add(value);
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    ((IDisposable)enumerator).Dispose();
                }
            }

            IEnumerator enumerator2 = iStaticTiles.GetEnumerator();

            try
            {
                while (enumerator2.MoveNext())
                {
                    StaticTile value2 = (StaticTile)enumerator2.Current;
                    this.m_StaticTiles.Add(value2);
                }
            }
            finally
            {
                if (enumerator2 is IDisposable)
                {
                    ((IDisposable)enumerator2).Dispose();
                }
            }
        }
コード例 #3
0
        public Transition(string iDescription, string iHashKey, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            IEnumerator enumerator  = null;
            IEnumerator enumerator1 = null;

            this.m_HashKey     = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles    = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File        = null;
            this.m_Description = iDescription;
            this.m_HashKey.AddHashKey(iHashKey);
            try
            {
                enumerator1 = iMapTiles.GetEnumerator();
                while (enumerator1.MoveNext())
                {
                    MapTile current = (MapTile)enumerator1.Current;
                    this.m_MapTiles.Add(current);
                }
            }
            finally
            {
                if (enumerator1 is IDisposable)
                {
                    ((IDisposable)enumerator1).Dispose();
                }
            }
            try
            {
                enumerator = iStaticTiles.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    Transition.StaticTile staticTile = (Transition.StaticTile)enumerator.Current;
                    this.m_StaticTiles.Add(staticTile);
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    ((IDisposable)enumerator).Dispose();
                }
            }
        }
コード例 #4
0
        public Transition(string iDescription, string iHashKey, ClsTerrain iGroupA, ClsTerrain iGroupB, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            IEnumerator enumerator  = null;
            IEnumerator enumerator1 = null;

            this.m_HashKey     = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles    = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File        = null;
            this.m_Description = iDescription;
            byte num = 0;

            do
            {
                string str = Strings.Mid(iHashKey, checked (num + 1), 1);
                if (StringType.StrCmp(str, "A", false) == 0)
                {
                    this.m_HashKey.Add(new Transition.HashKey(iGroupA.GroupID));
                }
                else if (StringType.StrCmp(str, "B", false) == 0)
                {
                    this.m_HashKey.Add(new Transition.HashKey(iGroupB.GroupID));
                }
                num = checked ((byte)(num + 1));
            }while (num <= 8);
            if (iMapTiles != null)
            {
                try
                {
                    enumerator1 = iMapTiles.GetEnumerator();
                    while (enumerator1.MoveNext())
                    {
                        MapTile current = (MapTile)enumerator1.Current;
                        this.m_MapTiles.Add(current);
                    }
                }
                finally
                {
                    if (enumerator1 is IDisposable)
                    {
                        ((IDisposable)enumerator1).Dispose();
                    }
                }
            }
            if (iStaticTiles != null)
            {
                try
                {
                    enumerator = iStaticTiles.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        Transition.StaticTile staticTile = (Transition.StaticTile)enumerator.Current;
                        this.m_StaticTiles.Add(staticTile);
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        ((IDisposable)enumerator).Dispose();
                    }
                }
            }
        }
コード例 #5
0
        public Transition(string iDescription, string iHashKey, ClsTerrain iGroupA, ClsTerrain iGroupB, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            this.m_HashKey     = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles    = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File        = null;
            this.m_Description = iDescription;
            byte b = 0;

            do
            {
                string sLeft = Strings.Mid(iHashKey, (int)checked (b + 1), 1);
                if (StringType.StrCmp(sLeft, "A", false) == 0)
                {
                    this.m_HashKey.Add(new HashKey(iGroupA.GroupID));
                }
                else
                {
                    if (StringType.StrCmp(sLeft, "B", false) == 0)
                    {
                        this.m_HashKey.Add(new HashKey(iGroupB.GroupID));
                    }
                }
                b += 1;
            }while (b <= 8);
            if (iMapTiles != null)
            {
                IEnumerator enumerator = iMapTiles.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        MapTile value = (MapTile)enumerator.Current;
                        this.m_MapTiles.Add(value);
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        ((IDisposable)enumerator).Dispose();
                    }
                }
            }
            if (iStaticTiles != null)
            {
                IEnumerator enumerator2 = iStaticTiles.GetEnumerator();

                try
                {
                    while (enumerator2.MoveNext())
                    {
                        StaticTile value2 = (StaticTile)enumerator2.Current;
                        this.m_StaticTiles.Add(value2);
                    }
                }
                finally
                {
                    if (enumerator2 is IDisposable)
                    {
                        ((IDisposable)enumerator2).Dispose();
                    }
                }
            }
        }
コード例 #6
0
        public Transition(string iDescription, string iHashKey, ClsTerrain iGroupA, ClsTerrain iGroupB, MapTileCollection iMapTiles, StaticTileCollection iStaticTiles)
        {
            this.m_HashKey = new HashKeyCollection();
            this.m_StaticTiles = new StaticTileCollection();
            this.m_MapTiles = new MapTileCollection();
            this.m_RandomTiles = null;
            this.m_File = null;
            this.m_Description = iDescription;
            byte b = 0;
            do
            {
                string sLeft = Strings.Mid(iHashKey, (int)checked(b + 1), 1);
                if (StringType.StrCmp(sLeft, "A", false) == 0)
                {
                    this.m_HashKey.Add(new HashKey(iGroupA.GroupID));
                }
                else
                {
                    if (StringType.StrCmp(sLeft, "B", false) == 0)
                    {
                        this.m_HashKey.Add(new HashKey(iGroupB.GroupID));
                    }
                }
                b += 1;
            }
            while (b <= 8);
            if (iMapTiles != null)
            {
                IEnumerator enumerator = iMapTiles.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        MapTile value = (MapTile)enumerator.Current;
                        this.m_MapTiles.Add(value);
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        ((IDisposable)enumerator).Dispose();
                    }
                }
            }
            if (iStaticTiles != null)
            {
                IEnumerator enumerator2 = iStaticTiles.GetEnumerator();

                try
                {
                    while (enumerator2.MoveNext())
                    {
                        StaticTile value2 = (StaticTile)enumerator2.Current;
                        this.m_StaticTiles.Add(value2);
                    }
                }
                finally
                {
                    if (enumerator2 is IDisposable)
                    {
                        ((IDisposable)enumerator2).Dispose();
                    }
                }
            }
        }