예제 #1
0
        public virtual MoveObject AddMoveObject(float x, float y, float w, float h,
                                                Animation a)
        {
            MoveObject o = null;

            if (indexTile != null)
            {
                o = new MoveObject(x, y, w, h, a, indexTile);
            }
            else if (tiles.Count > 0)
            {
                o = new MoveObject(x, y, w, h, a, tiles[0]);
            }
            else
            {
                return(null);
            }
            Add(o);
            return(o);
        }
예제 #2
0
 public virtual MoveObject AddMoveObject(float x, float y, float w, float h,
         Animation a)
 {
     MoveObject o = null;
     if (indexTile != null)
     {
         o = new MoveObject(x, y, w, h, a, indexTile);
     }
     else if (tiles.Count > 0)
     {
         o = new MoveObject(x, y, w, h, a, tiles[0]);
     }
     else
     {
         return null;
     }
     Add(o);
     return o;
 }