00001 /* 00002 SagaEngine library 00003 Copyright (c) 2002-2006 Skalden Studio AS 00004 00005 This software is provided 'as-is', without any express or implied 00006 warranty. In no event will the authors be held liable for any 00007 damages arising from the use of this software. 00008 00009 Permission is granted to distribute the library under the terms of the 00010 Q Public License version 1.0. Be sure to read and understand the license 00011 before using the library. It should be included here, or you may read it 00012 at http://www.trolltech.com/products/qt/licenses/licensing/qpl 00013 00014 The original version of this library can be located at: 00015 http://www.sagaengine.com/ 00016 00017 Rune Myrland 00018 rune@skalden.com 00019 */ 00020 00021 00022 #ifndef SpawnAreaComponent_hpp 00023 #define SpawnAreaComponent_hpp 00024 00025 #include "sim/sim.hpp" 00026 #include "sim/pos/sim_pos.hpp" 00027 #include "comp/Composite.hpp" 00028 #include "comp/node/RootChildComponent.hpp" 00029 #include "comp/list/CompositeList.hpp" 00030 #include "util/vecmath/Vector3.hpp" 00031 #include "util/vecmath/ViewPoint.hpp" 00032 00033 00034 namespace se_core { 00035 class _SeCoreExport SpawnAreaComponent : public RootChildComponent { 00036 public: 00037 typedef ComponentPtr<SpawnAreaComponent, sct_SPAWN> Ptr; 00038 00041 SpawnAreaComponent(Composite* owner, const ComponentFactory* factory = 0); 00042 ~SpawnAreaComponent(); 00043 void setActive(bool state); 00044 void flipSpawns(void); 00045 Composite* spawn(const char* thingName, const ViewPoint& vp, PosComponent* parent = 0); 00046 00052 void setSpawnPoints(int count, const ViewPoint* const* spawnPoints); 00053 00058 const ViewPoint* spawnPoint(short id) const; 00059 int spawnPointCount() const { 00060 return spawnPointCount_; 00061 } 00062 00063 00064 const char* name() const { return "SpawnArea"; } 00065 00066 protected: 00067 friend class SpawnAreaComponentFactory; 00068 00070 CompositeList newSpawns_; 00071 00073 int spawnPointCount_; 00074 00076 const ViewPoint* const* spawnPoints_; 00077 }; 00078 } 00079 00080 #endif
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:12 2007 by Doxygen version 1.3.9.1.