Exemple #1
0
    public List <WorldObject> placeWorldObject(WorldObject.ObjectType objType, Vector2 pos)
    {
        List <WorldObject> objList = new List <WorldObject>();

        if (!isValidPosition(pos))
        {
            return(objList);
        }

        WorldObject tempObject;

        tempObject          = new WorldObject(objType);
        tempObject.Location = pos;

        worldObjects.Add(tempObject);
        objList.Add(tempObject);

        return(objList);
    }
Exemple #2
0
 public List <WorldObject> placeWorldObject(WorldObject.ObjectType objType)
 {
     // TODO: Create a different function for computing valid places for a given object type
     return(placeWorldObject(objType, getValidAgentPosition()));
 }