From 1da4be10e39c23b918ee5fa9e2f44271a59b426f Mon Sep 17 00:00:00 2001 From: funto66 Date: Thu, 27 Dec 2012 16:09:11 +0000 Subject: [PATCH] Added code to export goal lines git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/christmas@12309 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- sources.cmake | 1 + src/tracks/check_goal.hpp | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/tracks/check_goal.hpp diff --git a/sources.cmake b/sources.cmake index 4c30c0e5c..6af9a6067 100644 --- a/sources.cmake +++ b/sources.cmake @@ -213,6 +213,7 @@ src/tinygettext/tinygettext.cpp src/tracks/ambient_light_sphere.cpp src/tracks/bezier_curve.cpp src/tracks/check_cannon.cpp +src/tracks/check_goal.cpp src/tracks/check_lap.cpp src/tracks/check_line.cpp src/tracks/check_manager.cpp diff --git a/src/tracks/check_goal.hpp b/src/tracks/check_goal.hpp new file mode 100644 index 000000000..8ca89bffd --- /dev/null +++ b/src/tracks/check_goal.hpp @@ -0,0 +1,42 @@ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2012 Joerg Henrichs +// +// 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 the Free Software Foundation; either version 3 +// 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. + +#ifndef HEADER_CHECK_GOAL_HPP +#define HEADER_CHECK_GOAL_HPP + +#include "animations/animation_base.hpp" +#include "tracks/check_line.hpp" + +class CheckManager; +class XMLNode; + +/** + * \brief Implements a simple checkline that will score a point when the + * soccer ball crosses it. + * + * \ingroup tracks + */ +class CheckGoal : public CheckLine +{ +public: + CheckGoal(const XMLNode &node, unsigned int index); + virtual ~CheckGoal() {} + virtual void trigger(unsigned int kart_index); +}; // CheckLine + +#endif