当前位置: 首页>>代码示例>>C#>>正文


C# Room.ToString方法代码示例

本文整理汇总了C#中Room.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Room.ToString方法的具体用法?C# Room.ToString怎么用?C# Room.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Room的用法示例。


在下文中一共展示了Room.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PlaceRoomOnPosition

    void PlaceRoomOnPosition(float x, float y, Room.Type roomType)
    {
        Vector3 pos = new Vector3(20*x+10,20*y+10,0);
        GameObject room = roomList[0].room;

        switch (roomType)
        {
            case Room.Type._1x2:
                {
                    room = roomList[1].room;
                    break;
                }
            case Room.Type._2x1:
                {
                    room = roomList[2].room;
                    break;
                }
            case Room.Type._2x2:
                {
                    room = roomList[3].room;
                    break;
                }
        }
        GameObject tile = Instantiate(room, pos, transform.rotation) as GameObject;
        tile.transform.parent = RoomContainer.transform;
        tile.transform.name = roomType.ToString() + "_" + x + "," + y;
    }
开发者ID:UniPotatoes,项目名称:EndOfTheRainbow,代码行数:27,代码来源:MapDigger.cs

示例2: findConnectedRooms

 public List<Room> findConnectedRooms(Room room, bool logger = false)
 {
     Debug.logger.logEnabled = logger;
     List<Room> ret = new List<Room>();
     ret.Add(room);
     var visited = new List<Pathway>();
     var searchlist = new List<Pathway>(room.ConnectingPathways);
     Debug.logger.Log("Search Start",string.Format("{0} {1}",room.ToString(),room.ConnectingPathways.Length));
     while (searchlist.Count != 0) {
         var current = searchlist[0];
         Debug.logger.Log("Current", current.ToString());
         visited.Add(current);
         if (current.ConnectingRooms.Length != 0) {
             var find =  Array.FindAll(current.ConnectingRooms, r => !ret.Contains(r));
             foreach (Room r in find) {
                 Debug.logger.Log("Room", r.ToString());
                 searchlist.AddRange(Array.FindAll(r.ConnectingPathways, p => !visited.Contains(p)&&!searchlist.Contains(p)));
             }
             ret.AddRange(find);
         }
         searchlist.AddRange(current.ConnectingPathways);
         searchlist.RemoveAll(p=> visited.Contains(p));
     }
     Debug.logger.logEnabled = true;
     return ret;
 }
开发者ID:sgmtjp,项目名称:Git-SODATERUTOWER,代码行数:26,代码来源:Floor.cs

示例3: DeleteRoom

 public bool DeleteRoom(Room room)
 {
     if (room == null) return false;
     return DeleteRoom(room.ToString());
 }
开发者ID:Hikari9,项目名称:ScheduleMaster,代码行数:5,代码来源:Classes.cs


注:本文中的Room.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。