Esempio n. 1
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 public FloorProgress(Dungeon.Floor floorMaster)
 {
     mSize   = new Vector2 <int>();
     mSize.x = floorMaster.Width;
     mSize.y = floorMaster.Height;
     mCells  = new CellProgress[mSize.x * mSize.y];
     for (int i = 0; i < mCells.Length; i++)
     {
         mCells[i] = new CellProgress();
     }
 }
Esempio n. 2
0
    //-------------------------------------------------------------------------
    //	private メソッド
    //-------------------------------------------------------------------------
    /// <summary>
    /// フロアから階段の位置を取得
    /// </summary>
    private Vector2 <int> FindFloorSteps(Dungeon.Floor floor, Dungeon.Cell.EStepsValue stepValue)
    {
        Dungeon.Cell[] cells = floor.Cells;

        for (int i = 0; i < cells.Length; i++)
        {
            if (cells[i].CellType == Dungeon.Cell.ECellType.Steps && cells[i].Values[0] == (int)stepValue)
            {
                var result = new Vector2 <int>();
                result.Set(i % floor.Width, (int)(i / floor.Width));
                return(result);
            }
        }
        return(null);
    }