Basic arena working that lets me work on the boss fight system quicker.
This commit is contained in:
parent
7f10c5b3d7
commit
a578c49a77
11 changed files with 110 additions and 217 deletions
|
|
@ -36,11 +36,14 @@ namespace components {
|
|||
|
||||
if(playing && current < frames) {
|
||||
float tick = twitching();
|
||||
scale_out.x = std::lerp(scale_out.x, scale_out.x + scale, tick);
|
||||
scale_out.y = std::lerp(scale_out.y, scale_out.y + scale, tick);
|
||||
|
||||
if(stationary) {
|
||||
scale_out.x = std::lerp(scale, max_scale, tick);
|
||||
scale_out.y = std::lerp(scale, max_scale, tick);
|
||||
pos_out.y = pos_out.y - (pos_out.y * scale_out.y - pos_out.y);
|
||||
} else {
|
||||
scale_out.x = std::lerp(scale_out.x * scale, scale_out.x * max_scale, tick);
|
||||
scale_out.y = std::lerp(scale_out.y * scale, scale_out.y * max_scale, tick);
|
||||
}
|
||||
|
||||
if(!simple) {
|
||||
|
|
@ -58,6 +61,8 @@ namespace components {
|
|||
rect_out.position.x += current * frame_width;
|
||||
}
|
||||
} else {
|
||||
scale_out.x = scale;
|
||||
scale_out.y = scale;
|
||||
playing = false;
|
||||
current = 0;
|
||||
subframe = 0.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue