Some Changes to Deck Editor and Others

Some Deck Editor changes
This commit is contained in:
Anthony Calosa
2016-07-19 04:33:09 +08:00
parent dc84c50ea8
commit b6eea6fe2e
13 changed files with 121 additions and 39 deletions

View File

@@ -1,6 +1,6 @@
#include "CarouselDeckView.h"
const float CarouselDeckView::max_scale = 0.96f;
const float CarouselDeckView::max_scale = 0.82f;
const float CarouselDeckView::x_center = 180;
const float CarouselDeckView::right_border = SCREEN_WIDTH + 180;
const float CarouselDeckView::slide_animation_duration = 0.6f;
@@ -70,7 +70,7 @@ void CarouselDeckView::UpdateCardPosition(int index)
rep.x = x_center + cos((rotation) * M_PI / 12) * (right_border - x_center);
rep.scale = max_scale / 1.12f * cos((rep.x - x_center) * 1.5f / (right_border - x_center)) + 0.2f * max_scale * cos(
cos((rep.x - x_center) * 0.15f / (right_border - x_center)));
rep.y = (SCREEN_HEIGHT_F) / 2.0f + SCREEN_HEIGHT_F * mSlideOffset * (rep.scale + 0.2f);
rep.y = (SCREEN_HEIGHT_F) / 2.1f + SCREEN_HEIGHT_F * mSlideOffset * (rep.scale + 0.2f);
}
void CarouselDeckView::Reset()