예제 #1
0
 public void Insert(int index, NPCObject value)
 {
     if (index < NPCObjects.Count)
     {
         NPCObjects.Insert(index, value);
     }
     else
     {
         NPCObjects.Add(value);
     }
 }
예제 #2
0
        public void Insert(int index, Point p)
        {
            var e = new NPCObject();

            e.X = (byte)p.X;
            e.Y = (byte)p.Y;
            if (index < NPCObjects.Count)
            {
                NPCObjects.Insert(index, e);
            }
            else
            {
                NPCObjects.Add(e);
            }
        }