本文整理汇总了C#中Tile.getY方法的典型用法代码示例。如果您正苦于以下问题:C# Tile.getY方法的具体用法?C# Tile.getY怎么用?C# Tile.getY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tile
的用法示例。
在下文中一共展示了Tile.getY方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToolMap
public ToolMap(int x, int y, Texture2D pixel, Tool[][] tooltextures, SpriteFont font)
{
this.pixel = pixel;
this.font = font;
/*Color[] colors = new Color[]{Color.White, Color.Red, Color.Goldenrod,
Color.Green, Color.Blue, Color.Chocolate, Color.Orange, Color.DarkGray,
Color.Purple, Color.Black};
*/
xmin = x;
ymin = y;
int[] col = {x,x+90};
xmax = col[1] + 32;
int yinterval = 44;
ymax = y + 3 * yinterval + 32;
xcolwidth = (xmax - xmin) / 2;
yrowheight = (ymax - ymin) / 4;
tools = new Tile[2][];
for(int j = 0; j < col.Length; j++)
{
tools[j] = new Tile[4];
for (int i = 0; i < 4; i++)
{
tools[j][i] = new Tile(j, i, col[j] + 1, 1 + y + yinterval * i, 32, tooltextures[j][i]);
}
}
selected = tools[0][0];
selectedtop = new Rectangle(-40,-40,36,2);
selectedbottom = new Rectangle(-40,-40,36,2);
selectedleft = new Rectangle(-40,-40,2,36);
selectedright = new Rectangle(-40,-40,2,36);
updateSelected(selected.getX(), selected.getY(), selected.getLength(), selected.getLength());
astarbutton = new Rectangle(xmin, ymax + 40, 122, 30);
playbutton = new Rectangle(xmin, ymax + 90, 122, 30);
}
示例2: addToBestPath
private Tile addToBestPath(List<Tile> bestpath, Tile toadd, Tile prev)
{
int x = toadd.getX();
int y = toadd.getY();
int mapx = toadd.getMapX();
int mapy = toadd.getMapY();
int len = toadd.getLength();
if(DEBUG)
Console.WriteLine("Adding tile at (" + mapx + "," + mapy + ") to bestpath! Cost is " + toadd.getTotalCost());
Tile newadd = new Tile(mapx, mapy, x, y, len, astarwaypoint, Color.White);
newadd.setPrevious(prev);
bestpath.Add(newadd);
return newadd;
}
示例3: setPlayerLocation
public void setPlayerLocation(Tile newloc)
{
if (playertile != null)
{
playertile.setMapX(newloc.getMapX());
playertile.setMapY(newloc.getMapY());
playertile.setX(newloc.getX());
playertile.setY(newloc.getY());
}
else
Console.WriteLine("Player is null!!");
}
示例4: setMonsterLocation
public void setMonsterLocation(Tile newloc)
{
if (monstertile != null)
{
monstertile.setMapX(newloc.getMapX());
monstertile.setMapY(newloc.getMapY());
monstertile.setX(newloc.getX());
monstertile.setY(newloc.getY());
}
else
Console.WriteLine("Monster is null!!");
}