2020-11-21 16:14:40 +01:00
|
|
|
#pragma once
|
2020-11-28 12:39:12 +01:00
|
|
|
#include "TPinballComponent.h"
|
|
|
|
|
2021-01-07 17:00:38 +01:00
|
|
|
struct vector_type;
|
2021-01-06 15:06:13 +01:00
|
|
|
class TEdgeSegment;
|
|
|
|
class TBall;
|
|
|
|
|
2020-11-28 12:39:12 +01:00
|
|
|
class TCollisionComponent : public TPinballComponent
|
2020-11-21 16:14:40 +01:00
|
|
|
{
|
2020-11-28 12:39:12 +01:00
|
|
|
public:
|
2021-01-30 12:19:25 +01:00
|
|
|
objlist_class<TEdgeSegment>* EdgeList;
|
2021-01-23 11:33:30 +01:00
|
|
|
float Elasticity;
|
|
|
|
float Smoothness;
|
|
|
|
float Boost;
|
|
|
|
float Threshold;
|
|
|
|
int SoftHitSoundId;
|
|
|
|
int HardHitSoundId;
|
2020-11-21 16:14:40 +01:00
|
|
|
|
2020-11-28 13:59:42 +01:00
|
|
|
TCollisionComponent(TPinballTable* table, int groupIndex, bool createWall);
|
2021-01-08 16:50:12 +01:00
|
|
|
~TCollisionComponent() override;
|
2020-11-29 16:50:49 +01:00
|
|
|
void port_draw() override;
|
2021-01-07 17:00:38 +01:00
|
|
|
virtual void Collision(TBall* ball, vector_type* nextPosition, vector_type* direction, float coef,
|
2021-01-06 15:06:13 +01:00
|
|
|
TEdgeSegment* edge);
|
2021-01-07 17:00:38 +01:00
|
|
|
virtual int FieldEffect(TBall* ball, vector_type* vecDst);
|
|
|
|
int DefaultCollision(TBall* ball, vector_type* nextPosition, vector_type* direction);
|
2020-11-28 12:39:12 +01:00
|
|
|
};
|