/*
  Copyright (C) 2003  Taiga Yonekura, taiga@col.hi-ho.ne.jp

  For more information about this appliation please look at:
   http://www.pat.hi-ho.ne.jp/kyonekura

  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 2
  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 CNET_H
#define CNET_H

#include "sprite.h"
#include "HitArea.h"

class Cnet : public CSprite  
{
public:
	void drawDamageBar(PAINTER *paint,int x,int y,int width,int colorheight);
	void init(int,int,int);
	void setdamage(int dmg);
	int getdamage(void);
	bool isInWater(void);
	void setinwater(bool status);
	bool minusdamage();
	bool minusdamage(int damage);
	void draw(PAINTER* painter);
	Cnet(PIXMAP *img, int damage);
	virtual ~Cnet();
	CHitArea GetHitArea();
	void setPos(int x,int y);
private:
	CHitArea* m_HitArea;
	PIXMAP *m_pnetBMP;
	PIXMAP *m_pnetInWaterBMP;
	PIXMAP *m_pnetBreakBMP;
	int m_damage;	 // net damage
	int m_damagemax; // inital damage value
	bool m_inwater;	 // TRUE: net is under water



};

#endif

