XG Proyect

UpdatesLibrary extends XGPCore
in package

UpdatesLibrary Class

Table of Contents

$lang  : mixed
$objects  : mixed
$updatesModel  : UpdatesLibrary
Contains the model
__construct()  : void
Constructor
setFirstElement()  : void
Set the next element in the queue to be the first
updateBuildingsQueue()  : void
updateBuildingsQueue
updatePlanetResources()  : void
Update the planet resources
loadLang()  : void
Load a language file using CI Library
checkBuildingQueue()  : bool
Check the current queue, remove the first element and update the planet with what was just completed
cleanUp()  : void
cleanUp
createBackup()  : void
createBackup
setObjectsClass()  : void
setObjectsClass
updateFleets()  : void
updateFleets
updateHangarQueue()  : int
Update the hangar queue, ships and defenses that were on queue
updateStatistics()  : void
updateStatistics

Properties

$objects

protected static mixed $objects

Methods

__construct()

Constructor

public __construct() : void
Return values
void

setFirstElement()

Set the next element in the queue to be the first

public static setFirstElement(array<string|int, mixed> &$current_planet, array<string|int, mixed> $current_user) : void
Parameters
$current_planet : array<string|int, mixed>
$current_user : array<string|int, mixed>
Return values
void

updateBuildingsQueue()

updateBuildingsQueue

public static updateBuildingsQueue(array<string|int, mixed> &$current_planet, array<string|int, mixed> &$current_user) : void
Parameters
$current_planet : array<string|int, mixed>

Current planet

$current_user : array<string|int, mixed>

Current user

Return values
void

updatePlanetResources()

Update the planet resources

public static updatePlanetResources(array<string|int, mixed> &$current_user, array<string|int, mixed> &$current_planet, int $UpdateTime[, bool $Simul = false ]) : void
Parameters
$current_user : array<string|int, mixed>

Current user

$current_planet : array<string|int, mixed>

Current planet

$UpdateTime : int

Update time

$Simul : bool = false

Simulation

Return values
void

loadLang()

Load a language file using CI Library

protected loadLang(string|array<string|int, mixed> $language_file) : void
Parameters
$language_file : string|array<string|int, mixed>
Return values
void

checkBuildingQueue()

Check the current queue, remove the first element and update the planet with what was just completed

private static checkBuildingQueue(array<string|int, mixed> &$current_planet, array<string|int, mixed> &$current_user) : bool
Parameters
$current_planet : array<string|int, mixed>
$current_user : array<string|int, mixed>
Return values
bool

cleanUp()

cleanUp

private cleanUp() : void
Return values
void

createBackup()

createBackup

private createBackup() : void
Return values
void

setObjectsClass()

setObjectsClass

private setObjectsClass() : void
Return values
void

updateFleets()

updateFleets

private updateFleets() : void
Return values
void

updateHangarQueue()

Update the hangar queue, ships and defenses that were on queue

private static updateHangarQueue(array<string|int, mixed> $current_user, array<string|int, mixed> &$current_planet, int $ProductionTime) : int
Parameters
$current_user : array<string|int, mixed>

Current user

$current_planet : array<string|int, mixed>

Current planet

$ProductionTime : int

Production time

Return values
int

updateStatistics()

updateStatistics

private updateStatistics() : void
Return values
void

Search results