Exemplo n.º 1
0
 public static void Right(SpriteForTouchDictionary spriteForTouches, float px)
 {
     foreach (string keyTemp in spriteForTouches.Sprites.Keys) {
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.T.X += px;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Stretch the specified spriteForTouches, x and y.
 /// 拡大縮小。引数値だけ+=;
 /// </summary>
 /// <param name='spriteForTouches'>
 /// Sprite for touches.
 /// </param>
 /// <param name='x'>
 /// X.
 /// </param>
 /// <param name='y'>
 /// Y.
 /// </param>
 public static void Stretch(SpriteForTouchDictionary spriteForTouches, float x, float y)
 {
     foreach (string keyTemp in spriteForTouches.Sprites.Keys) {
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.S.X += x;
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.S.Y += y;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the sprite positon grid y.
 /// 左上を0、下をプラスとしてY軸を作った時にグリッドの番号で
 /// sprite.Quad.T.Yに適切な値を返すメソッド
 /// </summary>
 /// <param name='spriteForTouches'>
 /// Sprite for touches.
 /// </param>
 /// <param name='grindNum'>
 /// Grind number.
 /// </param>
 public static void SetPositonGridY(SpriteForTouchDictionary spriteForTouches, float grindNum)
 {
     foreach (string keyTemp in spriteForTouches.Sprites.Keys) {
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.T.Y =
             (Const.GRID_SIZE*((float)System.Math.Floor(Const.GRID_NUM_Y)-grindNum) + Const.GRID_Y_REST)
                 - spriteForTouches.Sprites[keyTemp].Sprite.Quad.S.Y;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Sets the scale.
 /// 画像のサイズをセットする。
 /// </summary>
 /// <param name='spriteForTouches'>
 /// Sprite for touches.
 /// </param>
 /// <param name='width'>
 /// Width.
 /// </param>
 /// <param name='height'>
 /// Height.
 /// </param>
 public static void SetScale(SpriteForTouchDictionary spriteForTouches, float width, float height)
 {
     foreach (string keyTemp in spriteForTouches.Sprites.Keys) {
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.S.X = width;
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.S.Y = height;
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Sets the sprite positon grid x.
 /// 左上を0、下をプラスとしてX軸を作った時にグリッドの番号で
 /// sprite.Quad.T.Xに適切な値を返すメソッド
 /// </summary>
 /// <param name='spriteForTouches'>
 /// Sprite for touches.
 /// </param>
 /// <param name='grindNum'>
 /// Grind number.
 /// </param>
 public static void SetPositonGridX(SpriteForTouchDictionary spriteForTouches, float grindNum)
 {
     foreach (string keyTemp in spriteForTouches.Sprites.Keys) {
         spriteForTouches.Sprites[keyTemp].Sprite.Quad.T.X = Const.GRID_SIZE*grindNum;
     }
 }