Ignore:
Timestamp:
Mar 7, 2013, 4:24:52 PM (8 years ago)
Author:
sam
Message:

lua: add support for lua/init.lua in a global World object and give
it a try in MrPigeon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world.h

    r2216 r2565  
    1717#define __LOL_WORLD_H__
    1818
    19 #include "entity.h"
    20 
    2119namespace lol
    2220{
    2321
    24 class WorldData;
    25 
    26 class World : public Entity
     22class World
    2723{
    2824public:
     25    bool ExecLua(String const &lua);
     26    double GetLuaNumber(String const &var);
     27
     28//private:
    2929    World();
    30     virtual ~World();
     30    ~World();
     31};
    3132
    32 protected:
    33     /* Inherited from Entity */
    34     virtual char const *GetName();
    35     virtual void TickGame(float seconds);
    36     virtual void TickDraw(float seconds);
    37 
    38 public:
    39     /* New methods */
    40     int GetWidth();
    41     int GetHeight();
    42 
    43 private:
    44     WorldData *data;
    45 };
     33extern World g_world;
    4634
    4735} /* namespace lol */
Note: See TracChangeset for help on using the changeset viewer.