/TGame/TCommon/Entity/EntityR.cpp

http://awoe.googlecode.com/ · C++ · 35 lines · 24 code · 6 blank · 5 comment · 2 complexity · 341509aa05d2d303fe363d8bf12ec35e MD5 · raw file

  1. ////////////////////////////////////////////////////////////////////////////////////////////////////
  2. // file: Entity/EntityPlayer.cpp
  3. //
  4. // summary: Implements the entity player class
  5. ////////////////////////////////////////////////////////////////////////////////////////////////////
  6. #include "stdafx.h"
  7. #include "EntityR.h"
  8. #include "Lua/LuaWrapper.h"
  9. #include "EntityLua.h"
  10. EntityR::EntityR()
  11. :EntityImp(Entity::ett_Role)
  12. {
  13. }
  14. bool
  15. EntityR::onLoad()
  16. {
  17. EntityLua::push(Lua::instance()->state(), this);
  18. return Lua::instance()->call("Entity", "onLoadR", 1, 0);
  19. }
  20. int
  21. EntityR::getProps(const short& nIdx, int d)const
  22. {
  23. if(nIdx < Entity::ATTR_EP_BEGIN && nIdx > Entity::ETT_ATTR_BEGIN)
  24. {
  25. return __super::getProps(nIdx, d);
  26. }
  27. LOG_INFO_V("Error idx when getprops in EntityR (%d),", nIdx);
  28. return 0;
  29. }