PageRenderTime 28ms CodeModel.GetById 16ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/TGame/TCommon/Scene/SceneB.cpp

http://awoe.googlecode.com/
C++ | 158 lines | 115 code | 15 blank | 28 comment | 2 complexity | 79a9155e4d6c0d774b91faec9ac1e961 MD5 | raw file
  1#include "stdafx.h"
  2#include "SceneB.h"
  3#include "SceneLua.h"
  4#include "Lua/LuaWrapper.h"
  5
  6
  7
  8bool
  9SceneB::onLoad()
 10{
 11	SceneLua::push(Lua::instance()->state(), this);
 12	return Lua::instance()->call("Scene", "onLoad", 1, 0);
 13}
 14
 15//	
 16//	ID
 17//	This is an instance id generate when scene id add into scene manager
 18//
 19//
 20void
 21SceneB::setID(int nID)
 22{
 23	m_nID = nID;
 24}
 25int
 26SceneB::getID()const
 27{
 28	return m_nID;
 29}
 30
 31//
 32//	Global ID
 33//	Session ID
 34//
 35void
 36SceneB::setGlobalID(int nID)
 37{
 38}
 39int
 40SceneB::getGlobalID()const
 41{
 42	return 0;
 43}
 44
 45void
 46SceneB::setStaticID(int val)
 47{
 48	m_nStaticID = val;
 49}
 50int
 51SceneB::getStaticID()const
 52{
 53	return m_nStaticID;
 54}
 55
 56//	
 57//	Static ID
 58//	ID for static data
 59//
 60void
 61SceneB::setLevel(int v)
 62{
 63}
 64int
 65SceneB::getLevel()const
 66{
 67	return 0;
 68}
 69
 70//
 71//		Scene Global State
 72//
 73void
 74SceneB::setGState(const short& st)
 75{
 76}
 77short
 78SceneB::getGState()const
 79{
 80	return 0;
 81}
 82
 83
 84//
 85//		Scene Combat State
 86//
 87void
 88SceneB::setCombatState(const short& st)
 89{
 90}
 91short
 92SceneB::getCombatState()const
 93{
 94	return 0;
 95}
 96
 97//
 98//		Scene Extension Properties
 99//
100int
101SceneB::getProps(const short& nIdx)const
102{
103	PropsMap::const_iterator it = m_theProps.find(nIdx);
104	if (it==m_theProps.end())
105	{
106		return 0;
107	}
108	else
109	{
110		return it->second;
111	}
112}
113void
114SceneB::setProps(const short& nIdx, int v)
115{
116	m_theProps[nIdx] = v;
117}
118
119//
120//		Scene Flags
121//
122void
123SceneB::setFlg(const short& nIdx)
124{
125}
126void
127SceneB::clrFlg(const short& nIdx)
128{
129}
130bool
131SceneB::hasFlg(const short& nIdx)
132{
133	return false;
134}
135
136
137//
138//		Static Scene Data
139//
140IDataEx*
141SceneB::getStaticSceneData()
142{
143	return NULL;
144}
145void
146SceneB::setStaticSceneData(IDataEx* pSED)
147{
148}
149
150void
151SceneB::forEach(IEntityVisitor& v)
152{
153	IEntityManager* pEttMgr = getEntityMgr();
154	if (pEttMgr)
155	{
156		pEttMgr->forEach(v);
157	}
158}