This repository has been archived on 2022-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
irreligious/src/model/resource/Passive.ts

32 lines
877 B
TypeScript
Raw Normal View History

2021-08-21 12:45:58 -05:00
/// <reference path="./IResource.ts" />
2021-08-21 19:02:57 -05:00
abstract class Passive implements IResource {
2021-09-05 14:45:37 -05:00
public readonly resourceType: ResourceType = ResourceType.passive;
public readonly valueInWholeNumbers: boolean = false;
2021-08-21 12:45:58 -05:00
public readonly clickText: null = null;
public readonly clickDescription: null = null;
2021-09-04 22:21:14 -05:00
public value = 0;
2021-08-21 12:45:58 -05:00
public readonly cost: null = null;
2021-08-21 12:45:58 -05:00
public readonly clickAction: null = null;
2021-09-05 14:45:37 -05:00
public max: ((state: GameState) => number) | null = null;
public inc: ((state: GameState) => number) | null = null;
public advanceAction: ((time: number, state: GameState) => void) | null = null;
2021-08-21 12:45:58 -05:00
constructor (
public readonly name: string,
public readonly description: string
) { }
2021-08-21 12:45:58 -05:00
2021-09-05 14:45:37 -05:00
public addValue (amount: number, _state: GameState): void {
this.value += amount;
2021-08-21 12:45:58 -05:00
}
2021-09-05 14:45:37 -05:00
public isUnlocked (_state: GameState): boolean {
2021-08-21 12:45:58 -05:00
return true;
}
2021-08-21 17:06:51 -05:00
2021-08-21 12:45:58 -05:00
}