#pragma once

struct Obj
{
	int Type;
	float x,y;
};


class PLAY
{
public:

	HSAMPLE sample;	/* дескриптор сэмпла */
	HCHANNEL ch; 	/* дескриптор канала */
	DIRECTX		*Direct;

	PLAYER			*Player;
	WALL			*Res;

	BONUS			*Exit;

	BANG			*Bang;
	BONUS			*ResBon;
	IMAGE			*ResBreak;

	BREAK			*ptrBreak;

	int				Level;

	IMAGE			*Screen;
	IDirect3DSurface9	*ScreenS,*BackBuffer;

	DWORD			TimeReleas;

	IMAGE			*BangWave;
	vector<IMAGE>	BangWaves;

	IMAGE			*BackRes;
	INPUT_DX		*Input;

	vector<IMAGE>	Back;

	vector<WALL>	Map;
	vector<BOMB>	Bombs;
	vector<ENEMY*>	Enemies;
	vector<Obj>		LMap;
	vector<BONUS>	Bonuse;
	vector<BREAK>	Breaks;

	ENEMYCREAT	*EnemyC;

	BOMB	*Bomb;

	PLAY(INPUT_DX *Input,DIRECTX *Direct);

	void	LoadMap(char Level);
	void	Draw(void);
	void	Flip(void);
	void	Camera(void);
	void	VisibleBonus(void);
	void	Wave(void);
	void	KeyDown(void);
	int		FuncWave(D3DXVECTOR2 Pos,int Lenght,int Rot);
	void	Detonation(void);
	~PLAY(void);
};

