2020-11-01 16:45:29 +01:00
|
|
|
#pragma once
|
2020-11-28 13:59:42 +01:00
|
|
|
#include "TCollisionComponent.h"
|
2020-11-01 16:45:29 +01:00
|
|
|
|
|
|
|
class TPlunger :
|
2022-09-06 15:57:56 +02:00
|
|
|
public TCollisionComponent
|
2020-11-01 16:45:29 +01:00
|
|
|
{
|
|
|
|
public:
|
2021-01-07 17:00:38 +01:00
|
|
|
TPlunger(TPinballTable* table, int groupIndex);
|
2021-01-08 16:50:12 +01:00
|
|
|
~TPlunger() override = default;
|
2022-05-20 10:51:00 +02:00
|
|
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
2021-01-07 17:00:38 +01:00
|
|
|
TEdgeSegment* edge) override;
|
2022-09-06 15:57:56 +02:00
|
|
|
int Message(MessageCode code, float value) override;
|
2021-01-07 17:00:38 +01:00
|
|
|
|
|
|
|
static void BallFeedTimer(int timerId, void* caller);
|
|
|
|
static void PullbackTimer(int timerId, void* caller);
|
2022-08-25 16:09:17 +02:00
|
|
|
static void ReleasedTimer(int timerId, void* caller);
|
2021-01-07 17:00:38 +01:00
|
|
|
|
|
|
|
int PullbackTimer_;
|
|
|
|
int BallFeedTimer_;
|
2022-08-25 16:09:17 +02:00
|
|
|
float MaxPullback;
|
|
|
|
float PullbackIncrement;
|
|
|
|
float PullbackDelay;
|
2021-01-07 17:00:38 +01:00
|
|
|
int SoundIndexP1;
|
|
|
|
int SoundIndexP2;
|
2022-08-25 16:09:17 +02:00
|
|
|
bool PullbackStartedFlag{};
|
|
|
|
int SomeCounter{};
|
2020-11-01 16:45:29 +01:00
|
|
|
};
|