Class Funds
GameStateProperty that tracks the funds available to the player.
Inheritance
Implements
Inherited Members
Namespace: GDA.GameStateProperties
Assembly: Assembly-CSharp.dll
Syntax
public class Funds : GameStateProperty, IEndOfLevelHandler
Fields
fundsTopup
Funds to be added at the end of each level.
Declaration
public int fundsTopup
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
GameOverText
The text that is incorporated into NPC dialogue when a GameStateProperty reaches max severity and results in a gameover.
Declaration
public override string GameOverText { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
hideValue
Whether to hide the _value attribute in the Unity Editor. Usually for when a Child class overrides the value property.
Declaration
protected override bool hideValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
NegativeEvaluation
The text that is incorporated into NPC dialogue when a product is worse than another with regards to a GameStateProperty.
Declaration
public override string NegativeEvaluation { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
PositiveEvaluation
The text that is incorporated into NPC dialogue when a product is better than another with regards to a GameStateProperty.
Declaration
public override string PositiveEvaluation { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
value
The value of the GameStateProperty
Declaration
public override float value { get; protected set; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
Methods
CalculateEffect(Product)
Calculates the effect of a single product on the GameStateProperty.
Declaration
public override float CalculateEffect(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | Product to use for calculation |
Returns
Type | Description |
---|---|
System.Single | The effect of the product on the GameStateProperty |
Overrides
CalculateEffect(Proposal)
Calculates the effect of a (processed) Proposal on the GameStateProperty.
Calculation may take into account considerations from the whole proposal (required quantity, user group etc.)
and not solely from the products, and thus is substantially different from CalculateEffect(Product)
Declaration
public override float CalculateEffect(Proposal proposal)
Parameters
Type | Name | Description |
---|---|---|
Proposal | proposal | The processed proposal to make the calculation with |
Returns
Type | Description |
---|---|
System.Single | The effect of the proposal on the GameStateProperty |
Overrides
GetBetterProduct(Proposal)
Takes a proposal, and returns the product that would be more beneficial/less detrimental to the GameStateProperty.
Declaration
public override Product GetBetterProduct(Proposal proposal)
Parameters
Type | Name | Description |
---|---|---|
Proposal | proposal | Proposal to check |
Returns
Type | Description |
---|---|
Product |
Overrides
OnEndOfLevel()
Implementation of IEndOfLevelHandler. Adds additional funds at the end of the level.
Declaration
public void OnEndOfLevel()