2008-07-27 20:34:45 -04:00
|
|
|
// $Id: bowling.hpp 1284 2007-11-08 12:31:54Z hikerstk $
|
2007-12-08 08:22:05 -05:00
|
|
|
//
|
|
|
|
// SuperTuxKart - a fun racing game with go-kart
|
2008-07-27 20:34:45 -04:00
|
|
|
// Copyright (C) 2007 Joerg Henrichs, Marianne Gagnon
|
2007-12-08 08:22:05 -05:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-06-12 20:53:52 -04:00
|
|
|
// as published by the Free Software Foundation; either version 3
|
2007-12-08 08:22:05 -05:00
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
2009-03-11 20:57:00 -04:00
|
|
|
#ifndef HEADER_BOWLING_HPP
|
|
|
|
#define HEADER_BOWLING_HPP
|
|
|
|
|
|
|
|
#include "irrlicht.h"
|
|
|
|
using namespace irr;
|
2007-12-08 08:22:05 -05:00
|
|
|
|
2009-06-11 06:00:43 -04:00
|
|
|
#include "items/flyable.hpp"
|
2007-12-08 08:22:05 -05:00
|
|
|
|
2010-02-06 21:05:21 -05:00
|
|
|
class XMLNode;
|
|
|
|
|
2008-07-27 20:34:45 -04:00
|
|
|
class Bowling : public Flyable
|
2007-12-08 08:22:05 -05:00
|
|
|
{
|
|
|
|
private:
|
2008-07-27 20:34:45 -04:00
|
|
|
static float m_st_max_distance; // maximum distance for a bowling ball to be attracted
|
2008-08-05 20:53:40 -04:00
|
|
|
static float m_st_max_distance_squared;
|
2007-12-08 08:22:05 -05:00
|
|
|
static float m_st_force_to_target;
|
2008-08-05 20:53:40 -04:00
|
|
|
|
2007-12-08 08:22:05 -05:00
|
|
|
public:
|
2008-07-27 20:34:45 -04:00
|
|
|
Bowling(Kart* kart);
|
2010-02-06 21:05:21 -05:00
|
|
|
static void init(const XMLNode &node, scene::IMesh *bowling);
|
2007-12-08 08:22:05 -05:00
|
|
|
virtual void update(float dt);
|
|
|
|
|
2010-02-15 14:17:35 -05:00
|
|
|
const char* getExplosionSound() const { return "bowling_strike"; }
|
2009-12-17 19:36:35 -05:00
|
|
|
|
2008-07-27 20:34:45 -04:00
|
|
|
}; // Bowling
|
2007-12-08 08:22:05 -05:00
|
|
|
|
|
|
|
#endif
|