Ejemplo n.º 1
0
 static public String toString( WallName name )
 {
     switch(name)
     {
     case WallName.Bed: return "床";
     case WallName.Door: return "門";
     case WallName.Clock: return "時鐘";
     case WallName.Number: return "數字牆";
     }
     return "Error Wall Name";
 }
Ejemplo n.º 2
0
 public WallName getRelDirWall( WallName name , CondDir dir )
 {
     int idx = getWallIndex(name);
     idx = getRelDirWallIndex(idx, dir);
     return wall[idx].name;
 }
Ejemplo n.º 3
0
 public bool checkVaild( WallName a , WallName b , CondDir dir )
 {
     int idxA = getWallIndex(a);
     int idxB = getWallIndex(b);
     return getRelDirWallIndex(idxA, dir) == idxB;
 }
Ejemplo n.º 4
0
 public int getWallIndex(WallName name)
 {
     for(int i=0;i<4;++i)
     {
         if (wall[i].name == name)
             return i;
     }
     return -1;
 }
Ejemplo n.º 5
0
 public bool isTopFireLighting( WallName nearWallName , CondDir dir , bool bFaceWall )
 {
     int idx = getWallIndex(nearWallName);
     return bTopFireLighting[ getRelDirIndex( idx , dir , bFaceWall ) ];
 }