// SuperTux - Unstable Tile
// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
// Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
+// Copyright (C) 2010 Florian Forster <supertux at octo.it>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
private:
enum State {
- STATE_NORMAL, /**< default state */
- STATE_CRUMBLING, /**< crumbling, still solid */
- STATE_DISINTEGRATING /**< disintegrating, no longer solid */
+ STATE_NORMAL, /**< default state */
+ STATE_SHAKE, /**< shaking, still solid */
+ STATE_DISSOLVE, /**< dissolving, will turn non-solid after this */
+ STATE_SLOWFALL, /**< slow fall phase (used when neither shaking nor dissolving exist */
+ STATE_FALL /**< falling down */
};
+ void startCrumbling();
+
private:
+ void shake (void);
+ void dissolve (void);
+ void fall_down (void);
+ void slow_fall (void);
+
Physic physic;
State state;
+ float slowfall_timer;
};
#endif