Initial commit
This commit is contained in:
commit
e766662dce
12 changed files with 527 additions and 0 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Normalize EOL for all files that Git considers text files.
|
||||||
|
* text=auto eol=lf
|
||||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
||||||
|
/android/
|
||||||
BIN
Super_Credit.png
Normal file
BIN
Super_Credit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 546 B |
34
Super_Credit.png.import
Normal file
34
Super_Credit.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bj3lyq5g2q3un"
|
||||||
|
path="res://.godot/imported/Super_Credit.png-0e66d9238e6778215a4d8b0b3baf4ed3.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Super_Credit.png"
|
||||||
|
dest_files=["res://.godot/imported/Super_Credit.png-0e66d9238e6778215a4d8b0b3baf4ed3.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
80
Super_Credit.svg
Normal file
80
Super_Credit.svg
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="28.01741mm"
|
||||||
|
height="31.789618mm"
|
||||||
|
viewBox="0 0 28.01741 31.789618"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
||||||
|
sodipodi:docname="Currencies.svg"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#838383"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="true"
|
||||||
|
inkscape:deskcolor="#868686"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:zoom="2"
|
||||||
|
inkscape:cx="429"
|
||||||
|
inkscape:cy="83.25"
|
||||||
|
inkscape:window-width="2560"
|
||||||
|
inkscape:window-height="1377"
|
||||||
|
inkscape:window-x="1912"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="g610"
|
||||||
|
inkscape:export-bgcolor="#95959500"
|
||||||
|
showguides="true"
|
||||||
|
showgrid="true"><inkscape:grid
|
||||||
|
id="grid7"
|
||||||
|
units="mm"
|
||||||
|
originx="-89.972806"
|
||||||
|
originy="-14.982548"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
empcolor="#e5001d"
|
||||||
|
empopacity="0.30196078"
|
||||||
|
color="#e5002e"
|
||||||
|
opacity="0.14901961"
|
||||||
|
empspacing="5"
|
||||||
|
dotted="false"
|
||||||
|
gridanglex="30"
|
||||||
|
gridanglez="30"
|
||||||
|
visible="true" /></sodipodi:namedview><defs
|
||||||
|
id="defs1" /><g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-89.972803,-14.982547)"><g
|
||||||
|
id="g609"
|
||||||
|
inkscape:label="Super Credit"><image
|
||||||
|
width="45.072479"
|
||||||
|
height="42.06765"
|
||||||
|
preserveAspectRatio="none"
|
||||||
|
xlink:href="data:image/png;base64,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 45vKxpVhAAAAAElFTkSuQmCC "
|
||||||
|
id="image1-5"
|
||||||
|
x="80.966827"
|
||||||
|
y="9.9569864"
|
||||||
|
style="display:none;opacity:0.5;image-rendering:pixelated" /><rect
|
||||||
|
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect609"
|
||||||
|
width="26.000002"
|
||||||
|
height="26"
|
||||||
|
x="91"
|
||||||
|
y="15.999999" /><path
|
||||||
|
id="path604"
|
||||||
|
style="display:inline;fill:#4fcaf8;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="M 89.972803,14.982548 V 42.999959 H 117.99021 V 14.982548 Z m 11.526947,2.546615 h 7.00009 v 7.000089 h -5.99964 v 6.000151 h -7.000086 v -7.00009 z m 3.93619,9.940995 7.00009,0.02997 v 7.00009 l -6.00015,5.999634 h -7.000089 v -7.00009 h 6.000149 z" /><path
|
||||||
|
style="fill:#4fcaf8;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 89.972945,44.690805 h 28.017245 v 2.08136 H 90.000001 Z"
|
||||||
|
id="path609" /></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 5.4 KiB |
37
Super_Credit.svg.import
Normal file
37
Super_Credit.svg.import
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bskgme2radxb1"
|
||||||
|
path="res://.godot/imported/Super_Credit.svg-2e8260a2ec2a158ff5f8a990ad84e7a8.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Super_Credit.svg"
|
||||||
|
dest_files=["res://.godot/imported/Super_Credit.svg-2e8260a2ec2a158ff5f8a990ad84e7a8.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
64
export_presets.cfg
Normal file
64
export_presets.cfg
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="Windows Desktop"
|
||||||
|
platform="Windows Desktop"
|
||||||
|
runnable=true
|
||||||
|
advanced_options=false
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="../meow/supercredits.exe"
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
script_export_mode=2
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=true
|
||||||
|
texture_format/s3tc_bptc=true
|
||||||
|
texture_format/etc2_astc=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
|
codesign/enable=false
|
||||||
|
codesign/timestamp=true
|
||||||
|
codesign/timestamp_server_url=""
|
||||||
|
codesign/digest_algorithm=1
|
||||||
|
codesign/description=""
|
||||||
|
codesign/custom_options=PackedStringArray()
|
||||||
|
application/modify_resources=true
|
||||||
|
application/icon=""
|
||||||
|
application/console_wrapper_icon=""
|
||||||
|
application/icon_interpolation=4
|
||||||
|
application/file_version=""
|
||||||
|
application/product_version=""
|
||||||
|
application/company_name=""
|
||||||
|
application/product_name=""
|
||||||
|
application/file_description=""
|
||||||
|
application/copyright=""
|
||||||
|
application/trademarks=""
|
||||||
|
application/export_angle=0
|
||||||
|
application/export_d3d12=0
|
||||||
|
application/d3d12_agility_sdk_multiarch=true
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
||||||
|
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
||||||
|
$settings = New-ScheduledTaskSettingsSet
|
||||||
|
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
||||||
|
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
||||||
|
Start-ScheduledTask -TaskName godot_remote_debug
|
||||||
|
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
||||||
|
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||||
|
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||||
1
icon.svg
Normal file
1
icon.svg
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 994 B |
37
icon.svg.import
Normal file
37
icon.svg.import
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dfxl27c3opct6"
|
||||||
|
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.svg"
|
||||||
|
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
96
logic.gd
Normal file
96
logic.gd
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var pickups : Array[int]
|
||||||
|
var timer : float = 0
|
||||||
|
var running : bool = false
|
||||||
|
var super_credits : int = 0
|
||||||
|
@export_group("Node References")
|
||||||
|
|
||||||
|
@export var timer_label : Label
|
||||||
|
@export var play_button : Button
|
||||||
|
@export var pause_button : Button
|
||||||
|
@export var reset_button : Button
|
||||||
|
@export var add10_button : Button
|
||||||
|
@export var add100_button : Button
|
||||||
|
@export var undo_button : Button
|
||||||
|
@export var credits_label : Label
|
||||||
|
@export var pickups_label : Label
|
||||||
|
@export var warbond_label : Label
|
||||||
|
@export var current_sc_label : Label
|
||||||
|
@export var sc_entry : LineEdit
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
if running:
|
||||||
|
timer += delta
|
||||||
|
|
||||||
|
play_button.disabled = running
|
||||||
|
pause_button.disabled = !running
|
||||||
|
add10_button.disabled = !running
|
||||||
|
add100_button.disabled = !running
|
||||||
|
reset_button.disabled = not pickups.size() > 0
|
||||||
|
undo_button.disabled = not pickups.size() > 0
|
||||||
|
|
||||||
|
current_sc_label.text = str(super_credits)
|
||||||
|
timer_label.text = get_time()
|
||||||
|
pickups_label.text = str(pickups.size()) + " Pickups - " + str(round(pickups.size()*(3600/timer))) + " /h (" + str(round((pickups.size()*10)*(3600/timer))) + " SC/hr)"
|
||||||
|
credits_label.text = str(get_total_credits()) + " Super Credits - " + str(round(get_total_credits()*(3600/timer))) + " /h"
|
||||||
|
warbond_label.text = "Next warbond in: " + str(get_next_warbond()) + "m"
|
||||||
|
|
||||||
|
#returns the amount of minutes until 1000 sc reached
|
||||||
|
func get_next_warbond() -> int:
|
||||||
|
var next_warbond_needed : float = 1000 - super_credits
|
||||||
|
if next_warbond_needed <= 0:
|
||||||
|
return 0
|
||||||
|
var sc_per_hour_min : float = round((pickups.size()*10)*(3600/timer))
|
||||||
|
return (next_warbond_needed/sc_per_hour_min)*60
|
||||||
|
|
||||||
|
func get_total_credits() -> int:
|
||||||
|
var total : int
|
||||||
|
for pickup in pickups:
|
||||||
|
total += pickup
|
||||||
|
return total
|
||||||
|
|
||||||
|
func get_time() -> String:
|
||||||
|
var hours : int = floori(timer/3600)
|
||||||
|
var minutes : int = floori(timer/60) - hours*60
|
||||||
|
var seconds : int = roundi(timer) - minutes*60 - hours*3600
|
||||||
|
return str(hours).pad_zeros(2) + ":" + str(minutes).pad_zeros(2) + ":" + str(seconds).pad_zeros(2)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_play_button_pressed():
|
||||||
|
running = true
|
||||||
|
|
||||||
|
|
||||||
|
func _on_pause_button_pressed():
|
||||||
|
running = false
|
||||||
|
|
||||||
|
|
||||||
|
func _on_reset_button_pressed():
|
||||||
|
pickups.clear()
|
||||||
|
running = false
|
||||||
|
timer = 0
|
||||||
|
|
||||||
|
|
||||||
|
func _on_add_10_pressed():
|
||||||
|
pickups.append(10)
|
||||||
|
super_credits += 10
|
||||||
|
|
||||||
|
|
||||||
|
func _on_add_100_pressed():
|
||||||
|
pickups.append(100)
|
||||||
|
super_credits += 100
|
||||||
|
|
||||||
|
|
||||||
|
func _on_undo_pressed():
|
||||||
|
super_credits -= pickups.pop_back()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_set_sc_button_pressed():
|
||||||
|
super_credits = sc_entry.text.to_int()
|
||||||
|
sc_entry.clear()
|
||||||
148
main.tscn
Normal file
148
main.tscn
Normal file
|
|
@ -0,0 +1,148 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cpa3y5pkkf0dw"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://logic.gd" id="1_oa7ox"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bskgme2radxb1" path="res://Super_Credit.svg" id="2_k60xb"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_8sxj1"]
|
||||||
|
font_size = 20
|
||||||
|
font_color = Color(0, 1, 1, 1)
|
||||||
|
|
||||||
|
[node name="Main" type="Control" node_paths=PackedStringArray("timer_label", "play_button", "pause_button", "reset_button", "add10_button", "add100_button", "undo_button", "credits_label", "pickups_label", "warbond_label", "current_sc_label", "sc_entry")]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_oa7ox")
|
||||||
|
timer_label = NodePath("VBoxContainer/Timer")
|
||||||
|
play_button = NodePath("VBoxContainer/HBoxContainer/PlayButton")
|
||||||
|
pause_button = NodePath("VBoxContainer/HBoxContainer/PauseButton")
|
||||||
|
reset_button = NodePath("VBoxContainer/HBoxContainer/ResetButton")
|
||||||
|
add10_button = NodePath("VBoxContainer/HBoxContainer2/Add10")
|
||||||
|
add100_button = NodePath("VBoxContainer/HBoxContainer2/Add100")
|
||||||
|
undo_button = NodePath("VBoxContainer/HBoxContainer2/Undo")
|
||||||
|
credits_label = NodePath("VBoxContainer/SuperCreditsDisplay")
|
||||||
|
pickups_label = NodePath("VBoxContainer/PickupsDisplay")
|
||||||
|
warbond_label = NodePath("VBoxContainer/NextWarbond")
|
||||||
|
current_sc_label = NodePath("VBoxContainer/HBoxContainer3/Credits")
|
||||||
|
sc_entry = NodePath("VBoxContainer/HBoxContainer3/SCEntry")
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
text = "Tabby's Super Credit Calculator"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PlayButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Play"
|
||||||
|
|
||||||
|
[node name="PauseButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Pause"
|
||||||
|
|
||||||
|
[node name="ResetButton" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Reset"
|
||||||
|
|
||||||
|
[node name="Timer" type="Label" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "01:23:45"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Add10" type="Button" parent="VBoxContainer/HBoxContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "+10"
|
||||||
|
icon = ExtResource("2_k60xb")
|
||||||
|
expand_icon = true
|
||||||
|
|
||||||
|
[node name="Add100" type="Button" parent="VBoxContainer/HBoxContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "+100"
|
||||||
|
icon = ExtResource("2_k60xb")
|
||||||
|
expand_icon = true
|
||||||
|
|
||||||
|
[node name="Undo" type="Button" parent="VBoxContainer/HBoxContainer2"]
|
||||||
|
modulate = Color(1, 0, 0, 1)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Undo"
|
||||||
|
icon = ExtResource("2_k60xb")
|
||||||
|
expand_icon = true
|
||||||
|
|
||||||
|
[node name="SuperCreditsDisplay" type="Label" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "300 Super Credits - 134 /h"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="PickupsDisplay" type="Label" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "12 Pickups - 3.2 /h"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="HSeparator2" type="HSeparator" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
texture = ExtResource("2_k60xb")
|
||||||
|
expand_mode = 2
|
||||||
|
|
||||||
|
[node name="Credits" type="Label" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
custom_minimum_size = Vector2(50, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "1200"
|
||||||
|
label_settings = SubResource("LabelSettings_8sxj1")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="SCEntry" type="LineEdit" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
placeholder_text = "New SC"
|
||||||
|
|
||||||
|
[node name="SetSCButton" type="Button" parent="VBoxContainer/HBoxContainer3"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Set"
|
||||||
|
|
||||||
|
[node name="NextWarbond" type="Label" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Next Warbond in: 12m"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
clip_text = true
|
||||||
|
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/PlayButton" to="." method="_on_play_button_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/PauseButton" to="." method="_on_pause_button_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/ResetButton" to="." method="_on_reset_button_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Add10" to="." method="_on_add_10_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Add100" to="." method="_on_add_100_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Undo" to="." method="_on_undo_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer3/SetSCButton" to="." method="_on_set_sc_button_pressed"]
|
||||||
25
project.godot
Normal file
25
project.godot
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=5
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="SuperCreditFarm"
|
||||||
|
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||||
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=300
|
||||||
|
window/size/viewport_height=300
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
renderer/rendering_method="gl_compatibility"
|
||||||
|
renderer/rendering_method.mobile="gl_compatibility"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue