#pragma once
#include "GameObject3D.h"
#include "Model.h"

//#define FILENAME_MODEL_PROJECTILE               L"airplane 2.x"
#define FILENAME_MODEL_PROJECTILE                 L"ball.x"

class Projectile :
    public GameObject3D
{
public:
    ~Projectile(void);
    Projectile();
    Projectile(LPCTSTR file, LPCTSTR path, float calibrationAngleX, float calibrationAngleY, float calibrationAngleZ);
    Projectile(const Model &model);

    void Initialize();
    void Cycle(float deltaMs);
    void CheckTimeToLive(float deltaMs);
    void Fire(GameObject3D& shootingObj, float speed);
    void Destroy();

    static const Model& GetStandardModel(bool forceLoad = false);

    int m_DamagePoints;                 // Schadenspunkte, die das Projectile beim Treffer verursacht


	static const float CALIBRATION_ANGLE_X;         // grund-rotation des models
	static const float CALIBRATION_ANGLE_Y;         // grund-rotation des models
	static const float CALIBRATION_ANGLE_Z;         // grund-rotation des models
	static const unsigned int TIME_TO_LIVE;
	static const float SCALE_FACTOR;
    float timeTraveledMs;							// the current number of milliseconds passed after the p has been fired 

protected: 
    float m_MaxSpeed;
	unsigned int timeToLive;		// remaining milliseconds before the projectile will be set inactive

    GameObject3D* m_pShootingObj;       // nur zu testzwecken, eigentlich nicht notwenig
    static Model s_Model;         // das Standard-Model
};