edited destructionLayer, changed includes

This commit is contained in:
Raphael Maenle
2017-12-20 23:01:04 +01:00
parent e641199ce4
commit 37eed7ef88
7 changed files with 27 additions and 25 deletions

View File

@ -9,7 +9,6 @@
#define DESTRUCTION_COUNT 1
#include "../AbstraktionLayer_Base.h"
#include "DestructionPower_Properties.h"
#include <vector>
#include <iostream>
#include <bitset>

View File

@ -5,8 +5,6 @@
#ifndef SOURCE_DESTRUCTIONPOWER_PROPERTIES_H
#define SOURCE_DESTRUCTIONPOWER_PROPERTIES_H
#include <stdint.h>
#include "DestructionPower.h"
@ -15,21 +13,35 @@ class DestructionPower_Properties
public:
DestructionPower_Properties()
{
for(int i=0;i<DestructionArray.size();i++)
DestructionArray[i]=(map[i]*DESTRUCTION_INIT);
for(int i=0;i<sizeof(DestructionArray);i++)
DestructionArray[i]=(SpeedTable[i]*DESTRUCTION_INIT);
setSpeedTable();
}
map<int,float> getSpeedTable()
{
return SpeedTable;
}
void setSpeedTable()
{ SpeedTable=create_SpeedTable();}
private:
static map<int,float> create_SpeedTable();
static map<int,float> SpeedTable;
float DestructionArray[DESTRUCTION_COUNT];
static map<int,float> SpeedTable = create_SpeedTable;
friend class DestructionPower;
static map<int,float> create_SpeedTable(){
map<int, float> m;
m[1] = 0.001;
return m;
}
};
map<int,float> DestructionPower_Properties::create_SpeedTable()
{
map<int, float> m;
m[1] = 0.001;
return m;
}
#endif //SOURCE_ABSTRACTIONLAYER_1_PROPERTIES_H