//PongGamePlayScene.h

#pragma once

#include "Pong.h"
#include "Scene.h"
#include "GameObject.h"
#include "Texty.h"

class PongGamePlayScene : public GE161::Scene
{
public:
	PongGamePlayScene(Pong* theGame);
	~PongGamePlayScene();

	bool setup();
	int draw();

	// Override EventListener method.  /// hw 6
	void onEvent(GE161::Event& ev);


private:
	Pong* theGame;
	GE161::GameObject* ball;
	GE161::GameObject* paddle;		/// hw 6
	int paddleFrame;				/// hw 6
	int score;						/// hw 6
	int frameWidth_;
	int frameHeight_;
	int paddleWidth;
	int paddleHeight;
	int bounceCount_;
	GE161::Texty* scoreText;

	/// hw8
	int ballHitsPaddleEventType;
	GE161::GameObject* explosion;
	int explosionFramesRemaining;
	GE161::GameObject* leftGoal;
	GE161::GameObject* rightGoal;
	bool leftGoalGoingDown;
	bool rightGoalGoingDown;
	int hitLeftGoalEventType;
	int hitRightGoalEventType;
	GE161::GameObject* snitch[3];  // array of three GO pointers
	int snitchX[3];
	int snitchY[3];
	int snitchEventType;

	int x_delta, y_delta;
};

