PageRenderTime 31ms CodeModel.GetById 19ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 7#include "stdafx.h"
 8#include "EntityR.h"
 9#include "Lua/LuaWrapper.h"
10#include "EntityLua.h"
11
12
13EntityR::EntityR()
14:EntityImp(Entity::ett_Role)
15{
16}
17
18bool
19EntityR::onLoad()
20{
21	EntityLua::push(Lua::instance()->state(), this);
22	return Lua::instance()->call("Entity", "onLoadR", 1, 0);
23}
24
25int		
26EntityR::getProps(const short& nIdx, int d)const
27{
28	if(nIdx < Entity::ATTR_EP_BEGIN && nIdx > Entity::ETT_ATTR_BEGIN)
29	{
30		return __super::getProps(nIdx, d);
31	}
32
33	LOG_INFO_V("Error idx when getprops in EntityR (%d),", nIdx);
34	return 0;
35}