Exemplo n.º 1
0
 public ItemAnim(Loc2D startLoc, Loc2D endLoc, int sprite, ItemAnimType action)
 {
     StartLoc = startLoc;
     EndLoc = endLoc;
     Sprite = sprite;
     Action = action;
     Loc2D diffLoc = startLoc - endLoc;
     TotalDistance = (int)(TextureManager.TILE_SIZE * Math.Sqrt(Math.Pow(diffLoc.X, 2) + Math.Pow(diffLoc.Y, 2)));
 }
Exemplo n.º 2
0
        public ItemAnim(Loc2D startLoc, Loc2D endLoc, int sprite, ItemAnimType action)
        {
            StartLoc = startLoc;
            EndLoc   = endLoc;
            Sprite   = sprite;
            Action   = action;
            Loc2D diffLoc = startLoc - endLoc;

            TotalDistance = (int)(TextureManager.TILE_SIZE * Math.Sqrt(Math.Pow(diffLoc.X, 2) + Math.Pow(diffLoc.Y, 2)));
        }