Quantum Engineering
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
PowerSource Class Reference
Inheritance diagram for PowerSource:
Machine

Public Member Functions

void Start ()
 Called by unity engine on start up to initialize variables. More...
 
override void UpdateMachine ()
 Called by MachineManager update coroutine. More...
 
void OnDestroy ()
 Used to notify power receivers when the power source is destroyed. More...
 

Public Attributes

string ID = "unassigned"
 
Material lineMat
 
string creationMethod
 
GameObject inputObject
 
GameObject outputObject
 
string inputID
 
string outputID
 
int address
 
int powerAmount
 
string type
 
string fuelType
 
int fuelAmount
 
int connectionAttempts
 
bool connectionFailed
 
bool blocked
 
bool outOfFuel
 
bool noReactor
 
Texture2D generatorOffTexture
 
Texture2D generatorOnTexture
 

Private Member Functions

void AttemptConnection (GameObject obj)
 Connects the power source to a power receiver. More...
 
void DistributePower ()
 Determines the type of power source and calls the appropriate power distribution method. More...
 
void DistributeAsSolarPanel ()
 Distributes power to power receivers as a solar panel. More...
 
void DistributeAsGenerator ()
 Distributes power to power receivers as a generator. More...
 
void DistributeAsReactorTurbine ()
 Distributes power to power receivers as reactor turbine. More...
 

Private Attributes

LineRenderer connectionLine
 
int fuelConsumptionTimer
 
GameObject builtObjects
 
StateManager stateManager
 

Member Function Documentation

◆ AttemptConnection()

void PowerSource.AttemptConnection ( GameObject  obj)
inlineprivate

Connects the power source to a power receiver.

◆ DistributeAsGenerator()

void PowerSource.DistributeAsGenerator ( )
inlineprivate

Distributes power to power receivers as a generator.

◆ DistributeAsReactorTurbine()

void PowerSource.DistributeAsReactorTurbine ( )
inlineprivate

Distributes power to power receivers as reactor turbine.

◆ DistributeAsSolarPanel()

void PowerSource.DistributeAsSolarPanel ( )
inlineprivate

Distributes power to power receivers as a solar panel.

◆ DistributePower()

void PowerSource.DistributePower ( )
inlineprivate

Determines the type of power source and calls the appropriate power distribution method.

◆ OnDestroy()

void PowerSource.OnDestroy ( )
inline

Used to notify power receivers when the power source is destroyed.

◆ Start()

void PowerSource.Start ( )
inline

Called by unity engine on start up to initialize variables.

◆ UpdateMachine()

override void PowerSource.UpdateMachine ( )
inlinevirtual

Called by MachineManager update coroutine.

Reimplemented from Machine.

Member Data Documentation

◆ address

int PowerSource.address

◆ blocked

bool PowerSource.blocked

◆ builtObjects

GameObject PowerSource.builtObjects
private

◆ connectionAttempts

int PowerSource.connectionAttempts

◆ connectionFailed

bool PowerSource.connectionFailed

◆ connectionLine

LineRenderer PowerSource.connectionLine
private

◆ creationMethod

string PowerSource.creationMethod

◆ fuelAmount

int PowerSource.fuelAmount

◆ fuelConsumptionTimer

int PowerSource.fuelConsumptionTimer
private

◆ fuelType

string PowerSource.fuelType

◆ generatorOffTexture

Texture2D PowerSource.generatorOffTexture

◆ generatorOnTexture

Texture2D PowerSource.generatorOnTexture

◆ ID

string PowerSource.ID = "unassigned"

◆ inputID

string PowerSource.inputID

◆ inputObject

GameObject PowerSource.inputObject

◆ lineMat

Material PowerSource.lineMat

◆ noReactor

bool PowerSource.noReactor

◆ outOfFuel

bool PowerSource.outOfFuel

◆ outputID

string PowerSource.outputID

◆ outputObject

GameObject PowerSource.outputObject

◆ powerAmount

int PowerSource.powerAmount

◆ stateManager

StateManager PowerSource.stateManager
private

◆ type

string PowerSource.type

The documentation for this class was generated from the following file: