SpaceCadetPinballPPC/SpaceCadetPinball/TCollisionComponent.h

27 lines
747 B
C
Raw Normal View History

2020-11-21 15:14:40 +00:00
#pragma once
#include "TPinballComponent.h"
2021-01-07 16:00:38 +00:00
struct vector_type;
class TEdgeSegment;
class TBall;
class TCollisionComponent : public TPinballComponent
2020-11-21 15:14:40 +00:00
{
public:
std::vector<TEdgeSegment*> EdgeList;
2021-01-23 10:33:30 +00:00
float Elasticity;
float Smoothness;
float Boost;
float Threshold;
int SoftHitSoundId;
int HardHitSoundId;
2020-11-21 15:14:40 +00:00
TCollisionComponent(TPinballTable* table, int groupIndex, bool createWall);
~TCollisionComponent() override;
void port_draw() override;
2021-01-07 16:00:38 +00:00
virtual void Collision(TBall* ball, vector_type* nextPosition, vector_type* direction, float coef,
TEdgeSegment* edge);
2021-01-07 16:00:38 +00:00
virtual int FieldEffect(TBall* ball, vector_type* vecDst);
int DefaultCollision(TBall* ball, vector_type* nextPosition, vector_type* direction);
};