#pragma once

#include <windows.h>
#include "LDTypes.h"



struct IDirect3DDevice8;

class Level;

class Unit
{

  public:

    LD::Point           Position;
    LD::PointF          FractPos;
    LD::PointF          Speed;

    LD::TextureTypes    TexSection;

    LD::GameObjectType  Type;

    bool                RemoveMe;
    float               LifeTime;
    unsigned int        Color;
    int                 Size;
    int                 HP;

    


    Unit();
    virtual ~Unit();


    virtual void Display( IDirect3DDevice8* pDevice );
    virtual void UpdateFixedTimeStep( Level& theLevel );
    virtual void Update( Level& theLevel, float ElapsedTime );

    void AdjustFractPos( bool BounceOffBorder = false );

    LD::Point TilePos();


};
