1#include "ObjectItemboxPress.hh"
3#include "game/field/obj/ObjectPress.hh"
9 : ObjectCollidable(params) {}
12ObjectItemboxPress::~ObjectItemboxPress() =
default;
15void ObjectItemboxPress::calc() {
27void ObjectItemboxPress::startPress() {
29 m_railInterpolator->init(0.0f, 0);
30 m_railInterpolator->setPerPointVelocities(
true);
34void ObjectItemboxPress::calcPosition() {
35 constexpr f32 HEIGHT_OFFSET = 180.0f;
37 auto result = m_railInterpolator->calc();
39 if (result == RailInterpolator::Status::SegmentEnd) {
40 if (m_railInterpolator->curPoint().setting[1] == 1) {
41 m_senko->setWindup(
true);
43 }
else if (result == RailInterpolator::Status::ChangingDirection) {
47 m_pos = m_railInterpolator->curPos();
48 m_pos.y = HEIGHT_OFFSET + m_pos.y;
49 m_flags.setBit(eFlags::Position);