mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-09-02 12:33:39 +00:00
Units move using the new pathfinding system
Minor refactoring
This commit is contained in:
+2
-1
@@ -31,6 +31,7 @@ namespace battleship{
|
||||
speed = new float[numUnits];
|
||||
destinationOffset = new float[numUnits];
|
||||
unitType = new UnitType[numUnits];
|
||||
unitClass = new UnitClass[numUnits];
|
||||
anglePrecision = new float[numUnits];
|
||||
cost = new int[numUnits];
|
||||
maxTurnAngle = new float[numUnits];
|
||||
@@ -46,7 +47,7 @@ namespace battleship{
|
||||
for(int i = 0; i < numUnits; i++){
|
||||
health[i] = luaManager->getIntFromTable("health", vector<Index>{Index(to_string(i + 1), false)});
|
||||
speed[i] = luaManager->getFloatFromTable("speed", vector<Index>{Index(to_string(i + 1), false)});
|
||||
unitType[i] = (UnitType)luaManager->getIntFromTable("unitType", vector<Index>{Index(to_string(i + 1), false)});
|
||||
unitClass[i] = (UnitClass)luaManager->getIntFromTable("unitClass", vector<Index>{Index(to_string(i + 1), false)});
|
||||
destinationOffset[i] = luaManager->getFloatFromTable("destinationOffset", vector<Index>{Index(to_string(i + 1), false)});
|
||||
anglePrecision[i] = luaManager->getFloatFromTable("anglePrecision", vector<Index>{Index(to_string(i + 1), false)});
|
||||
cost[i] = luaManager->getIntFromTable("cost", vector<Index>{Index(to_string(i + 1), false)});
|
||||
|
||||
Reference in New Issue
Block a user