Beispiel #1
0
 public override void setPosition(GTile tile, Vector2 offset)
 {
     removeFromTile ();
     if (placeAtPoint (tile.getCenter (offset))) {
         addToTile (tile);
     }
 }
Beispiel #2
0
 /*
  *	Sets the position of this GStructure to the center of <tile>, offset by <offset>
  */
 public override void setPosition(GTile tile, Vector2 offset)
 {
     removeFromTile();
     if (placeAtPoint(tile.getCenter(offset)))
     {
         addToTile(tile);
         if (dimensions.size == StructureSizes.Small)
         {
             reflist_index.subdivision = GameData.GData.getSubdivisionFromPoint(getPosition());
         }
     }
     else
     {
         Debug.LogError("Failed to place GStructure at " + tile.getCenter(offset));
     }
 }
Beispiel #3
0
 public override void setPosition(GTile tile, Vector2 offset)
 {
     removeFromTile();
     if (placeAtPoint(tile.getCenter(offset)))
     {
         addToTile(tile);
     }
 }
Beispiel #4
0
 /*
  *	Sets the position of this GStructure to the center of <tile>, at the specified <subdivision>
  */
 public void setPosition(GTile tile, TileSubdivisions subdivision)
 {
     if (dimensions.size == StructureSizes.Small)
     {
         removeFromTile();
         if (placeAtPoint(tile.getCenter(subdivision)))
         {
             addToTile(tile);
             reflist_index.subdivision = subdivision;
         }
         else
         {
             Debug.LogError("Failed to place GStructure at " + tile.getCenter());
         }
     }
     else
     {
         Debug.LogError("GStructure must be of size small.");
     }
 }
Beispiel #5
0
 /*
  *	Sets the position of this GStructure to the center of <tile>, at the specified <subdivision>
  */
 public void setPosition(GTile tile, TileSubdivisions subdivision)
 {
     if (dimensions.size == StructureSizes.Small) {
         removeFromTile ();
         if (placeAtPoint (tile.getCenter (subdivision))) {
             addToTile (tile);
             reflist_index.subdivision = subdivision;
         } else {
             Debug.LogError ("Failed to place GStructure at " + tile.getCenter ());
         }
     } else {
         Debug.LogError ("GStructure must be of size small.");
     }
 }
Beispiel #6
0
 /*
  *	Sets the position of this GStructure to the center of <tile>, offset by <offset>
  */
 public override void setPosition(GTile tile, Vector2 offset)
 {
     removeFromTile ();
     if (placeAtPoint (tile.getCenter (offset))) {
         addToTile (tile);
         if(dimensions.size == StructureSizes.Small) {
             reflist_index.subdivision = GameData.GData.getSubdivisionFromPoint(getPosition());
         }
     }
     else {
         Debug.LogError("Failed to place GStructure at "+tile.getCenter (offset));
     }
 }