2020-11-01 16:45:29 +01:00
|
|
|
#pragma once
|
2020-11-28 13:59:42 +01:00
|
|
|
#include "TCollisionComponent.h"
|
|
|
|
|
2021-01-16 15:45:29 +01:00
|
|
|
struct TBumper_player_backup
|
|
|
|
{
|
|
|
|
int MessageField;
|
|
|
|
int BmpIndex;
|
|
|
|
};
|
|
|
|
|
2020-11-01 16:45:29 +01:00
|
|
|
class TBumper :
|
2020-11-28 13:59:42 +01:00
|
|
|
public TCollisionComponent
|
2020-11-01 16:45:29 +01:00
|
|
|
{
|
|
|
|
public:
|
2021-01-16 15:45:29 +01:00
|
|
|
TBumper(TPinballTable* table, int groupIndex);
|
|
|
|
~TBumper() override = default;
|
|
|
|
int Message(int code, float value) override;
|
|
|
|
void Collision(TBall* ball, vector_type* nextPosition, vector_type* direction, float coef,
|
|
|
|
TEdgeSegment* edge) override;
|
|
|
|
void put_scoring(int index, int score) override;
|
|
|
|
int get_scoring(int index) override;
|
|
|
|
void Fire();
|
|
|
|
|
|
|
|
static void TimerExpired(int timerId, void* caller);
|
|
|
|
|
|
|
|
int BmpIndex;
|
|
|
|
int Timer;
|
|
|
|
float TimerTime;
|
2021-01-23 11:33:30 +01:00
|
|
|
float OriginalThreshold;
|
2021-01-16 15:45:29 +01:00
|
|
|
int SoundIndex4;
|
|
|
|
int SoundIndex3;
|
2021-10-02 17:58:54 +02:00
|
|
|
int Scores[4]{};
|
|
|
|
TBumper_player_backup PlayerData[4]{};
|
2020-11-01 16:45:29 +01:00
|
|
|
};
|