Thrive
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
thrive::CompoundCloudComponent Class Reference

Compound clouds that flow in the environment. More...

#include <compound_cloud_system.h>

Inheritance diagram for thrive::CompoundCloudComponent:
thrive::Component

Public Member Functions

void initialize (CompoundId Id, float red, float green, float blue)
 
void load (const StorageContainer &storage) override
 Loads the component. More...
 
StorageContainer storage () const override
 Serializes the component. More...
 
void addCloud (float density, int x, int y)
 
int takeCompound (int x, int y, float rate)
 Rate should be less than one.
 
int amountAvailable (int x, int y, float rate)
 Rate should be less than one.
 
- Public Member Functions inherited from thrive::Component
virtual ~Component ()=0
 Destructor.
 
bool isVolatile () const
 A volatile component is not serialized during a save. More...
 
EntityId owner () const
 The entity this component belongs to. More...
 
void setVolatile (bool isVolatile)
 Sets the volatile flag. More...
 
void setOwner (EntityId owner)
 Sets the component's owner. More...
 
virtual ComponentTypeId typeId () const =0
 The component's type id.
 
virtual std::string typeName () const =0
 The component's type name.
 

Static Public Member Functions

static luabind::scope luaBindings ()
 Lua bindings. More...
 
- Static Public Member Functions inherited from thrive::Component
static luabind::scope luaBindings ()
 Lua bindings. More...
 

Public Attributes

int width
 The size of the compound cloud grid.
 
int height
 
int offsetX
 
int offsetY
 
float gridSize
 
std::vector< std::vector< float > > density
 The 2D array that contains the current compound clouds and those from last frame.
 
std::vector< std::vector< float > > oldDens
 
Ogre::ColourValue color
 The 3x3 grid of density tiles around the player for seamless movement. More...
 
CompoundId m_compoundId = NULL_COMPOUND
 The compound id.
 

Detailed Description

Compound clouds that flow in the environment.

Member Function Documentation

void CompoundCloudComponent::load ( const StorageContainer &  storage)
overridevirtual

Loads the component.

Parameters
storage

Implements thrive::Component.

luabind::scope CompoundCloudComponent::luaBindings ( )
static

Lua bindings.

Exposes:

  • CompoundCloudComponent()
Returns
StorageContainer CompoundCloudComponent::storage ( ) const
overridevirtual

Serializes the component.

Returns

Implements thrive::Component.

Member Data Documentation

Ogre::ColourValue thrive::CompoundCloudComponent::color

The 3x3 grid of density tiles around the player for seamless movement.

The color of the compound cloud.


The documentation for this class was generated from the following files: