Modifica di update() per gestire moltiplicatore tempo

This commit is contained in:
2026-06-22 12:16:32 +02:00
parent f05db110ff
commit c6094c6a44
18 changed files with 35 additions and 25 deletions
@@ -13,7 +13,7 @@ struct collection{
class CollectionInterface{
public:
virtual collection create(ReferencePlane plane) = 0;
virtual void update(sf::Clock cl) = 0;
virtual void update(sf::Clock cl, float multiplier) = 0;
virtual bool setTransparency(float alpha) = 0;
virtual ~CollectionInterface(){};
};
+1 -1
View File
@@ -15,7 +15,7 @@ class Gamba : public CollectionInterface {
PieceInterface* getJointPiece();
void setDirection(Direction dir);
bool setTransparency(float alpha) override;
void update(sf::Clock cl)override {};
void update(sf::Clock cl, float multiplier)override {};
float getZ_Acc();
};
+1 -1
View File
@@ -33,7 +33,7 @@ protected:
public:
Lower_Body(rb::Vector3 pos, std::vector<gamba_data> data);
~Lower_Body();
void update(sf::Clock cl) override;
void update(sf::Clock cl, float multiplier) override;
void setVisibility(bool c);
bool setTransparency(float alpha) override;
collection create(ReferencePlane plane) override;
+1 -1
View File
@@ -76,7 +76,7 @@ bool Lower_Body::setTransparency(float alpha){
return true;
}
void Lower_Body::update(sf::Clock cl){
void Lower_Body::update(sf::Clock cl, float multiplier){
float sxAcc = sx->getZ_Acc() ;
float dxAcc = dx->getZ_Acc() ;