diff options
author | Roman Gräf <romangraef@gmail.com> | 2020-04-20 12:36:14 +0200 |
---|---|---|
committer | Roman Gräf <romangraef@gmail.com> | 2020-04-20 12:36:14 +0200 |
commit | fcda851214b0b018b559277a4544119b82ad817a (patch) | |
tree | f92d65288df1d51dbe2be1bb6321dd4c06c6b2c8 /buildings | |
parent | b995a56e091e65e4069b9d463d230209488883bf (diff) | |
download | LDJam46-fcda851214b0b018b559277a4544119b82ad817a.tar.gz LDJam46-fcda851214b0b018b559277a4544119b82ad817a.tar.bz2 LDJam46-fcda851214b0b018b559277a4544119b82ad817a.zip |
sunglasses
Diffstat (limited to 'buildings')
-rw-r--r-- | buildings/buildings.tscn | 9 | ||||
-rw-r--r-- | buildings/dev.gd | 3 | ||||
-rw-r--r-- | buildings/glasses.gd | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/buildings/buildings.tscn b/buildings/buildings.tscn index f2c80ef..574dedb 100644 --- a/buildings/buildings.tscn +++ b/buildings/buildings.tscn @@ -1,10 +1,12 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://buildings/intern.gd" type="Script" id=1] [ext_resource path="res://assets/intern.png" type="Texture" id=2] [ext_resource path="res://assets/hire.png" type="Texture" id=3] [ext_resource path="res://lib/base_buyable.gd" type="Script" id=4] [ext_resource path="res://buildings/dev.gd" type="Script" id=5] +[ext_resource path="res://assets/glasses.png" type="Texture" id=6] +[ext_resource path="res://buildings/glasses.gd" type="Script" id=7] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 86.5173, 127.028 ) @@ -63,3 +65,8 @@ margin_bottom = 106.0 __meta__ = { "_edit_use_anchors_": false } + +[node name="glasses" type="Sprite" parent="."] +position = Vector2( 175.565, 41.7443 ) +texture = ExtResource( 6 ) +script = ExtResource( 7 ) diff --git a/buildings/dev.gd b/buildings/dev.gd index fababd7..abc1d77 100644 --- a/buildings/dev.gd +++ b/buildings/dev.gd @@ -10,7 +10,8 @@ func _tick() -> void: invoke_riot() SaveState.coffee = 0 else: - SaveState.gain_bitcoin(get_amount()) + SaveState.gain_bitcoin(int(pow(get_amount(), + 1 + SaveState.upgrades['sunglasses'] / 10.0))) else: SaveState.riot_cooldown -= 1 diff --git a/buildings/glasses.gd b/buildings/glasses.gd new file mode 100644 index 0000000..89b68cb --- /dev/null +++ b/buildings/glasses.gd @@ -0,0 +1,7 @@ +extends Sprite + +func _process(delta): + if SaveState.has_upgrade("sunglasses"): + show() + else: + hide() |