#pragma once
#include <stdlib.h>
class Text{
public:
	enum TEXT_COORDINATES { SCREEN, WORLD };
    enum TEXT_EFFECT { NONE, GRAVITY };

    Text(void);
    Text(int x, int y, char* string, int textureId, int lifeSpan, TEXT_COORDINATES newCoords);
    Text(int x, int y, char* string, int textureId, int lifeSpan, float scale, TEXT_COORDINATES newCoords);
    Text(int x, int y, char* string, int textureId, int lifeSpan, float scaleX, float scaleY, TEXT_COORDINATES newCoords);
    Text(int x, int y, char* string, int textureId, int lifeSpan, TEXT_COORDINATES newCoords, TEXT_EFFECT newEffect );
    ~Text(void);

    void init(int newX, int newY, char* newString, int newTextureId, int newLifeSpan, float newScaleX, float newScaleY, TEXT_COORDINATES newCoords, TEXT_EFFECT newEffect);

    // setter getter for string
    void  setString(char* newString);
    char* getString();
    // setter getter for life span
    void  setLifeSpan(int newLifeSpan);
    int   getLifeSpan();
    // setter getter for alphabet texture
    void  setTextureId(int newTexture);
    int   getTextureId();
    // setter getter for x position
    void  setX(int newX);
    int   getX();
    // setter getter for y position
    void  setY(int newY);
    int   getY();
    // setter getter for scaleY
    void  setScaleX(float newScaleX);
    float getScaleX();
    // setter getter for scaleX
    void  setScaleY(float newScaleY);
    float getScaleY();
	// gets where we're rendering this text
	Text::TEXT_COORDINATES getTextCoordinates();
    //get text effect
    Text::TEXT_EFFECT getTextEffect();

    void gravityEffect();

    // tick method
    void tick();
    bool dead();

private:
    int xInitial;
    int yInitial;
    int numTicks;

    char* string;    // text to be rendered
    int   x;         // x position
    int   y;         // y position
    float scaleX;    // scale of text in x
    float scaleY;    // scale of text in y
    int   lifeSpan;  // how many times should this be rendered
    int   textureId; // alphabet texture to use
	TEXT_COORDINATES textCoords;
    TEXT_EFFECT      effect;
};

