mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
minor refactoring
corrected CPU player script
This commit is contained in:
@@ -83,7 +83,7 @@ function Player:issueBuildOrder()
|
||||
end
|
||||
|
||||
spawnPoint = self:getSpawnPoint()
|
||||
structure = GameObjectFactory.createUnit(self, 13, spawnPoint, Quaternion:new(1, 0, 0, 0), 0)
|
||||
structure = GameObjectFactory.createUnit(self, 14, spawnPoint, Quaternion:new(1, 0, 0, 0), 0)
|
||||
self:addUnit(structure)
|
||||
|
||||
self:issueOrder(1, Vector3:new(0, 0, 0), {Target:new(structure, Vector3:new(0, 0, 0))}, false)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "defConfigs.h"
|
||||
#include "player.h"
|
||||
#include "factory.h"
|
||||
#include "transport.h"
|
||||
#include "engineer.h"
|
||||
#include "pointDefense.h"
|
||||
#include "resourceDeposit.h"
|
||||
@@ -58,7 +57,6 @@ namespace battleship{
|
||||
"getUnitClass", &Unit::getUnitClass,
|
||||
"toEngineer", &Unit::toEngineer,
|
||||
"toPointDefense", &Unit::toPointDefense,
|
||||
"toTransport", &Unit::toTransport,
|
||||
"toFactory", &Unit::toFactory
|
||||
);
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "player.h"
|
||||
#include "factory.h"
|
||||
#include "engineer.h"
|
||||
#include "transport.h"
|
||||
#include "resourceRover.h"
|
||||
#include "projectile.h"
|
||||
#include "resourceDeposit.h"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#include "transport.h"
|
||||
#include "player.h"
|
||||
|
||||
#include <solUtil.h>
|
||||
|
||||
namespace battleship{
|
||||
using namespace vb01;
|
||||
using namespace gameBase;
|
||||
|
||||
Transport::Transport(Player *player, int id, Vector3 pos, Quaternion rot) : Vehicle(player, id, pos, rot){
|
||||
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
#ifndef TRANSPORT_H
|
||||
#define TRANSPORT_H
|
||||
|
||||
#include "vehicle.h"
|
||||
|
||||
namespace battleship{
|
||||
class Player;
|
||||
|
||||
class Transport : public Vehicle{
|
||||
public:
|
||||
Transport(Player*, int, vb01::Vector3, vb01::Quaternion);
|
||||
private:
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -30,7 +30,6 @@ namespace battleship{
|
||||
class Vehicle;
|
||||
class Factory;
|
||||
class Cruiser;
|
||||
class Transport;
|
||||
class PointDefense;
|
||||
class Engineer;
|
||||
|
||||
@@ -129,7 +128,6 @@ namespace battleship{
|
||||
virtual void reinit();
|
||||
bool canGarrison(Vehicle*);
|
||||
inline Engineer* toEngineer(){return (Engineer*)this;}
|
||||
inline Transport* toTransport(){return (Transport*)this;}
|
||||
inline Factory* toFactory(){return (Factory*)this;}
|
||||
inline Cruiser* toCruiser(){return (Cruiser*)this;}
|
||||
inline PointDefense* toPointDefense(){return (PointDefense*)this;}
|
||||
|
||||
Reference in New Issue
Block a user