예제 #1
0
    static public String toString( CondDir dir )
    {
        switch( dir )
        {
        case CondDir.Top: return "上";
        case CondDir.Left: return "左";
        case CondDir.Right: return "右";
        case CondDir.Bottom: return "下";
        case CondDir.Front: return "前";
        case CondDir.Back: return "後";
        }

        return "Error dir";
    }
예제 #2
0
 public WallName getRelDirWall( WallName name , CondDir dir )
 {
     int idx = getWallIndex(name);
     idx = getRelDirWallIndex(idx, dir);
     return wall[idx].name;
 }
예제 #3
0
 public bool checkVaild( WallName a , WallName b , CondDir dir )
 {
     int idxA = getWallIndex(a);
     int idxB = getWallIndex(b);
     return getRelDirWallIndex(idxA, dir) == idxB;
 }
예제 #4
0
 public int getRelDirWallIndex( int idx , CondDir dir )
 {
     return getRelDirIndex(idx, dir, false);
 }
예제 #5
0
 public bool isTopFireLighting( WallName nearWallName , CondDir dir , bool bFaceWall )
 {
     int idx = getWallIndex(nearWallName);
     return bTopFireLighting[ getRelDirIndex( idx , dir , bFaceWall ) ];
 }
예제 #6
0
 public int getRelDirIndex( int index , CondDir dir , bool bFaceWall )
 {
     int result = index + (int)dir;
     if ( bFaceWall == false )
         result += 2;
     return result % 4;
 }