-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCreature_Species.cpp
More file actions
54 lines (44 loc) · 967 Bytes
/
Creature_Species.cpp
File metadata and controls
54 lines (44 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#ifndef WORLDSIM_CREATURE_SPECIES_CPP
#define WORLDSIM_CREATURE_SPECIES_CPP
/* WorldSim: Creature_Species
#include "Creature_Species.cpp"
Implementation of Creature_Species.hpp
*/
#include <Container/Table/TableInterface.hpp>
#include "Creature.hpp"
Creature_Species::Creature_Species(std::string _name, int _spawnWeight)
{
name = _name;
spawnWeight = _spawnWeight;
}
// return an instance of this species
Creature* Creature_Species::spawn()
{
Creature* c = new Creature;
c->species=this;
return c;
}
// TABLE INTERFACE
std::string Creature_Species::getColumn(std::string _column)
{
if ( _column=="name" )
{
return name;
}
return "?";
}
std::string Creature_Species::getColumnType(std::string _column)
{
return "string";
}
void Creature_Species::setBaseTexture(Texture* texture)
{
baseTexture = texture;
}
// HASTEXTURE
Texture* Creature_Species::currentTexture ()
{
return 0;
}
#endif