// ------------------------------------------------------------------------------------------- /// <summary> /// Creates the arena /// </summary> /// <param name="data"></param> public void Configure(object data) // ------------------------------------------------------------------------------------------- { _desc = data as MT_ArenaDescriptor; #if false _tiles = new MT_ArenaTile[(int)Dimensions.x, (int)Dimensions.y, (int)Dimensions.z]; this.Bounds.Center = FVec3.zero; this.Bounds.Size = Dimensions.ToFVec3(); MT_ArenaTile curTile = new MT_ArenaTile(); for (int x = 0; x < Dimensions.x; x++) { for (int y = 0; y < Dimensions.y; y++) { for (int z = 0; z < Dimensions.z; z++) { if (curTile == null) { curTile = new MT_ArenaTile(); } if (_desc.InitTileCallback(curTile)) { _tiles[x, y, z] = curTile; curTile = null; } } } } #endif Events.SendGlobal(new SetMapEvent() { Arena = this }); }
//public delegate bool TileInitCallback(MT_ArenaDescriptor desc,); //public TileInitCallback InitTileCallback; public virtual bool InitTileCallback(MT_ArenaTile tile) { // TODO: add stuff here return(true); }