예제 #1
0
파일: Circle.cs 프로젝트: temik911/audio
 internal override VisibleObject Copy(VisibleObject parent)
 {
     Marker marker = new Circle(Cell);
     marker.Parent = (EntityCollection)parent;
     return marker;
 }
예제 #2
0
 internal Marker ReadMarker(GameField field)
 {
     String str = sr.ReadLine();
     Marker marker = null;
     while (!str.Contains("End marker"))
     {
         String type = str;
         str = sr.ReadLine();
         switch (type)
         {
             case "Aim":
                 marker = new Aim(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                 break;
             case "Circle":
                 marker = new Circle(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                 break;
             case "Check":
                 marker = new Check(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                 break;
             case "Flag":
                 marker = new Flag(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                 break;
             case "XMark":
                 marker = new XMark(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]);
                 break;
         }
         str = sr.ReadLine();
     }
     return marker;
 }