Aggiunta selezione trasparenza pezzi

This commit is contained in:
2026-06-20 09:42:32 +02:00
parent a2eee90e10
commit 83f132a1c4
5 changed files with 14 additions and 11 deletions
+5
View File
@@ -36,6 +36,7 @@ class PieceInterface{
rb::Vector3 globalPos;
rb::rigidbody body;
sf::Color color;
float transparency = 1.0; //canale alpha del pezzo
virtual void update(sf::Clock cl) = 0;
virtual sf::Shape* draw(ReferencePlane plane) = 0;
@@ -43,6 +44,10 @@ class PieceInterface{
virtual void setDirection(Direction dir){
direction = dir;
}
virtual bool setTransparency(float alpha){
if (alpha < 0 || alpha > 1) return false;
transparency = alpha;
}
};