Class Company¶
Represents a Player Company
Namespace: VoxelTycoon
Constructors¶
Company()¶
Creates new company with default values.
Declaration
Company(StateBinaryReader)¶
Creates new company from provided binary reader.
Declaration
Type | Name | Description |
---|---|---|
StateBinaryReader | reader | Reader with company values |
Properties¶
Cheater¶
Whether the player company has used cheats.
Declaration
Type | Description |
---|---|
bool | True if cheats were used |
Color¶
The company's color. Changing it will invoke the ColorChanged
action.
Declaration
Type | Description |
---|---|
Color | Company color |
ContrastColor¶
Get's color that's a contract to a company's color.
Declaration
Type | Description |
---|---|
Color | Contrasting color |
Current¶
Get's current company used in the game.
Declaration
Type | Description |
---|---|
Company | Current company |
CurrentBudgetPeriod¶
Gets company's current budget period.
Declaration
Type | Description |
---|---|
BudgetPeriod | Company's budget period |
Headquarters¶
Company's headquarters building.
Declaration
Type | Description |
---|---|
Headquarters | Company's headquarters, probably null if not built |
HeadquartersFlag¶
Probably indicates whether headquarters were built.
Declaration
Type | Description |
---|---|
bool | Whether headquarters are built (?) |
Id¶
Company Id.
Declaration
Type | Description |
---|---|
byte | Company's internal Id |
Loan¶
Company's current loan.
Declaration
Type | Description |
---|---|
double | Loan |
LoanCount¶
Amount of loans currently taken.
Declaration
Type | Description |
---|---|
int | Amount of loans |
LoanInterest¶
Current loan interest.
Declaration
Type | Description |
---|---|
double | Loan interest |
LoanStep¶
How much loan increases each time it's taken.
Declaration
Type | Description |
---|---|
double | Amount of money received when taking a loan |
MaxLoan¶
Maximum loan company can take.
Declaration
Type | Description |
---|---|
double | Max loan amount |
MaxLoanCount¶
Maximum amount of times company can take a loan.
Declaration
Type | Description |
---|---|
int | How much loans can company take |
Money¶
How much money a company has.
Declaration
Type | Description |
---|---|
double | Amount of money |
Name¶
Company name. Changing it will invoke the NameChanged
action.
Declaration
Type | Description |
---|---|
string | Company name |
PreviousBudgetPeriod¶
Company's previous budget period.
Declaration
Type | Description |
---|---|
BudgetPeriod | Previous budget period |
Value¶
Company's value.
Declaration
Type | Description |
---|---|
double | Company value |
Events¶
ColorChanged¶
Action on when company color changes.
Declaration
Type | Description |
---|---|
Action | ColorChanged event action |
MoneyChanged¶
Action on when company money changes.
Declaration
Type | Description |
---|---|
Action | MoneyChanged event action |
NameChanged¶
Action on when company name changes.
Declaration
Type | Description |
---|---|
Action | NameChanged event action |
Methods¶
AddMoney(double, BudgetItem, bool)¶
Adds money to the company.
If value
is negative takes money away from the company.
Declaration
Parameters
Type | Name | Description |
---|---|---|
double | value | How much money to add |
BudgetItem | budgetItem | Category of the income |
bool | important | (?) |
AddRunningCosts(double, BudgetItem)¶
Adds running costs to the specified category.
Declaration
Parameters
Type | Name | Description |
---|---|---|
double | value | How much money to add to the running costs |
BudgetItem | budgetItem | Category of the costs |
Borrow(int)¶
Takes a loan.
Declaration
Parameters
Type | Name | Description |
---|---|---|
int | count | Amount of loans to take |
CanBorrow(int)¶
Gets whether the company can take a loan.
Declaration
Parameters
Type | Name | Description |
---|---|---|
int | count | How many loans company wants to take |
Returns
Type | Description |
---|---|
bool | Whether the company can take that much loans |
CanRepay(int)¶
Gets whether the company can take a loan.
Declaration
Parameters
Type | Name | Description |
---|---|---|
int | count | How many loans company wants to return |
Returns
Type | Description |
---|---|
bool | Whether the company can repay that much loans |
HasEnoughMoney(double)¶
Gets whether the company can afford something.
Declaration
Parameters
Type | Name | Description |
---|---|---|
double | price | How much company wants to spend |
Returns
Type | Description |
---|---|
bool | Whether the company can spend that much money |
InitializeLoan(int, int, double, double)¶
Initializes loans for company.
Declaration
Parameters
Type | Name | Description |
---|---|---|
int | loanCount | Amount of loans |
int | extraLoanCount | Additional available loans |
double | loanStep | Money given/taken each step |
double | loanInterest | Interest of the loan |
Repay(int)¶
Repays loans.
Declaration
Parameters
Type | Name | Description |
---|---|---|
int | count | Amount of loans to repay |