22 #ifndef QDENGINE_MINIGAMES_ADV_M_TRIANGLES_H 23 #define QDENGINE_MINIGAMES_ADV_M_TRIANGLES_H 25 #include "qdengine/minigames/adv/common.h" 26 #include "qdengine/minigames/adv/MinigameInterface.h" 27 #include "qdengine/minigames/adv/ObjectContainer.h" 31 MinigameInterface *createMinigameTriangleGame();
48 Node(
int number = -1,
int rot = -1);
51 void debugInfo()
const;
54 return _isBack ? _back : _face[_flip];
69 static const char *getFaceStateName(
int angle,
bool selected,
bool animated,
bool instantaneous);
70 static const char *getBackStateName(
bool selected,
bool animated,
bool instantaneous);
71 static const char *getBorderStateName(
bool selected);
81 GameType _gameType = TRIANGLE;
94 AnimationState _animationState = NO_ANIMATION;
95 int animatedNodes_[2] = { 0 };
96 float _animationTime = 0.0;
97 float _animationTimer = 0.0;
100 void releaseNodeBack(Node &node);
102 void updateNode(Node &node,
int position,
int flip = 0,
bool quick =
false);
104 void highlight(
int idx,
bool hl);
107 void swapNodes(
int pos1,
int pos2,
bool quick);
109 void beginSwapNodes(
int pos1,
int pos2);
111 bool animate(
float dt);
113 void endSwapNodes(
int pos1,
int pos2);
116 int rowByNum(
int num)
const;
118 int rowBegin(
int row)
const;
120 int orientation(
int num)
const;
122 bool compatible(
int num1,
int num2)
const;
124 int getRotate(
int num1,
int num2)
const;
126 int destination(
int num1,
int num2)
const;
128 mgVect3f slotCoord(
int pos,
int angle = 0)
const;
133 #endif // QDENGINE_MINIGAMES_ADV_M_TRIANGLES_H
Definition: MinigameInterface.h:27
Базовый класс для игровых ресурсов.
Definition: console.h:28
Definition: m_triangles.h:33
Definition: ObjectContainer.h:27