1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/Interfaces.h
Halofreak1990 40c4811c04 Got everything to compile again.
Began transforming of current API to represent XNA 4.0, which is cleaner.
Dictionary<TKey, TValue> should now work (sort of-- need to implement resizing and enumerating)
Currently hunting down GraphicsDevice initialization
Up next: (hopefully successful) rendering of primitives
2012-09-28 20:36:02 +00:00

70 lines
1.6 KiB
C++

/********************************************************
* Interfaces.h *
* *
* XFX interfaces definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _XFX_INTERFACES_
#define _XFX_INTERFACES_
#include <System/Types.h>
#include <System/Event.h>
using namespace System;
namespace XFX
{
class GameTime;
// Defines the interface for a drawable game component.
interface IDrawable
{
public:
virtual int getDrawOrder() const =0;
virtual bool getVisible() const =0;
virtual void Draw(GameTime gameTime)=0;
virtual ~IDrawable() {}
EventHandler DrawOrderChanged;
EventHandler VisibleChanged;
};
// Defines an interface for game components.
interface IGameComponent
{
public:
virtual void Initialize()=0;
virtual ~IGameComponent() {}
};
// Defines the interface for an object that manages a Graphics.GraphicsDevice.
interface IGraphicsDeviceManager : virtual Object
{
public:
virtual bool BeginDraw()=0;
virtual void CreateDevice()=0;
virtual void EndDraw()=0;
virtual ~IGraphicsDeviceManager() {}
};
// Defines an interface for a game component that should be updated in Game.Update.
interface IUpdateable
{
public:
virtual bool getEnabled() const =0;
virtual void setEnabled(int value)=0;
virtual int getUpdateOrder() const =0;
virtual void setUpdateOrder(int value)=0;
virtual ~IUpdateable() {}
virtual void Update(GameTime gameTime)=0;
EventHandler EnabledChanged;
EventHandler UpdateOrderChanged;
};
}
#endif //_XFX_INTERFACES_