master
Zachary Epps 5 years ago
commit 191532999c

1
.gitignore vendored

@ -0,0 +1 @@
.import/*

@ -0,0 +1,28 @@
extends Node2D
onready var TapLabel = $UI/Label
onready var TimeLabel = $UI/Timer
onready var PlusParticles = $Emitter
export var time_limit = 5
var current_time = 0
var can_tap = true
var taps = 0
func _process(delta):
if current_time < time_limit and can_tap:
current_time = stepify(current_time + delta, 0.01)
TimeLabel.set_text(str(time_limit - current_time))
else:
can_tap = false
func _on_Area2D_input_event(viewport, event, shape_idx):
if can_tap and event is InputEventMouseButton and event.is_pressed():
taps += 1
PlusParticles.emit()
update_labels()
func update_labels():
if can_tap:
TapLabel.set_text(str(taps))

@ -0,0 +1,133 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Game.gd" type="Script" id=1]
[ext_resource path="res://scenes/Emitter.tscn" type="PackedScene" id=2]
[ext_resource path="res://textures/one_plus.png" type="Texture" id=3]
[sub_resource type="RectangleShape2D" id=1]
custom_solver_bias = 0.0
extents = Vector2( 34.3957, 22.6778 )
[node name="Game" type="Node2D" index="0"]
script = ExtResource( 1 )
__meta__ = {
"_edit_horizontal_guides_": [ 659.892, 919.302 ],
"_edit_vertical_guides_": [ 70.6318, 556.276 ]
}
time_limit = 5
[node name="UI" type="Control" parent="." index="0"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 600.0
margin_bottom = 360.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
_sections_unfolded = [ "Visibility" ]
[node name="Label" type="Label" parent="UI" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 300.0
margin_top = 190.0
margin_right = 308.0
margin_bottom = 204.0
rect_scale = Vector2( 3, 3 )
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
text = "0"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Rect" ]
[node name="Timer" type="Label" parent="UI" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 280.0
margin_top = 60.0
margin_right = 300.0
margin_bottom = 74.0
rect_scale = Vector2( 3, 3 )
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
text = "0.0"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="ColorRect" type="ColorRect" parent="UI" index="2"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 70.0
margin_top = 440.0
margin_right = 530.0
margin_bottom = 680.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 2
size_flags_horizontal = 1
size_flags_vertical = 1
color = Color( 1, 1, 1, 1 )
_sections_unfolded = [ "Mouse" ]
[node name="Area2D" type="Area2D" parent="." index="1"]
editor/display_folded = true
position = Vector2( 310, 560 )
scale = Vector2( 7.58819, 4.05328 )
input_pickable = true
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
audio_bus_override = false
audio_bus_name = "Master"
__meta__ = {
"_edit_group_": true
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" index="0"]
position = Vector2( -0.710571, 0.829765 )
scale = Vector2( 0.887838, 1.31668 )
shape = SubResource( 1 )
[node name="Emitter" parent="." index="2" instance=ExtResource( 2 )]
position = Vector2( 315, 266 )
scale = Vector2( 8.59375, 2.6875 )
_sections_unfolded = [ "Transform" ]
ParticleTexture = ExtResource( 3 )
[connection signal="input_event" from="Area2D" to="." method="_on_Area2D_input_event"]

Binary file not shown.

Binary file not shown.

@ -0,0 +1,101 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
radiance_size = 4
sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 )
sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 )
sky_curve = 0.25
sky_energy = 1.0
ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 )
ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 )
ground_curve = 0.01
ground_energy = 1.0
sun_color = Color( 1, 1, 1, 1 )
sun_latitude = 35.0
sun_longitude = 0.0
sun_angle_min = 1.0
sun_angle_max = 100.0
sun_curve = 0.05
sun_energy = 16.0
texture_size = 2
[resource]
background_mode = 2
background_sky = SubResource( 1 )
background_sky_custom_fov = 0.0
background_color = Color( 0, 0, 0, 1 )
background_energy = 1.0
background_canvas_max_layer = 0
ambient_light_color = Color( 0, 0, 0, 1 )
ambient_light_energy = 1.0
ambient_light_sky_contribution = 1.0
fog_enabled = false
fog_color = Color( 0.5, 0.6, 0.7, 1 )
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
fog_sun_amount = 0.0
fog_depth_enabled = true
fog_depth_begin = 10.0
fog_depth_curve = 1.0
fog_transmit_enabled = false
fog_transmit_curve = 1.0
fog_height_enabled = false
fog_height_min = 0.0
fog_height_max = 100.0
fog_height_curve = 1.0
tonemap_mode = 0
tonemap_exposure = 1.0
tonemap_white = 1.0
auto_exposure_enabled = false
auto_exposure_scale = 0.4
auto_exposure_min_luma = 0.05
auto_exposure_max_luma = 8.0
auto_exposure_speed = 0.5
ss_reflections_enabled = false
ss_reflections_max_steps = 64
ss_reflections_fade_in = 0.15
ss_reflections_fade_out = 2.0
ss_reflections_depth_tolerance = 0.2
ss_reflections_roughness = true
ssao_enabled = false
ssao_radius = 1.0
ssao_intensity = 1.0
ssao_radius2 = 0.0
ssao_intensity2 = 1.0
ssao_bias = 0.01
ssao_light_affect = 0.0
ssao_color = Color( 0, 0, 0, 1 )
ssao_quality = 0
ssao_blur = 3
ssao_edge_sharpness = 4.0
dof_blur_far_enabled = false
dof_blur_far_distance = 10.0
dof_blur_far_transition = 5.0
dof_blur_far_amount = 0.1
dof_blur_far_quality = 1
dof_blur_near_enabled = false
dof_blur_near_distance = 2.0
dof_blur_near_transition = 1.0
dof_blur_near_amount = 0.1
dof_blur_near_quality = 1
glow_enabled = false
glow_levels/1 = false
glow_levels/2 = false
glow_levels/3 = true
glow_levels/4 = false
glow_levels/5 = true
glow_levels/6 = false
glow_levels/7 = false
glow_intensity = 0.8
glow_strength = 1.0
glow_bloom = 0.0
glow_blend_mode = 2
glow_hdr_threshold = 1.0
glow_hdr_scale = 2.0
glow_bicubic_upscale = false
adjustment_enabled = false
adjustment_brightness = 1.0
adjustment_contrast = 1.0
adjustment_saturation = 1.0

@ -0,0 +1,27 @@
[preset.0]
name="Windows Desktop"
platform="Windows Desktop"
runnable=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
patch_list=PoolStringArray( )
[preset.0.options]
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/64_bits=true
custom_template/release=""
custom_template/debug=""
application/icon=""
application/file_version=""
application/product_version=""
application/company_name="CybreCorn"
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -0,0 +1,29 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

@ -0,0 +1,29 @@
; 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=3
[application]
config/name="Karate Tapper"
run/main_scene="res://Game.tscn"
config/icon="res://icon.png"
[display]
window/size/width=600
window/size/height=800
window/size/resizable=false
window/dpi/allow_hidpi=true
window/handheld/orientation="portrait"
window/stretch/mode="2d"
window/stretch/aspect="keep_height"
[rendering]
environment/default_environment="res://default_env.tres"

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
viewBox="0 0 16.933333 16.933334"
version="1.1"
id="svg8"
inkscape:export-filename="/home/ztepps/Documents/GodotProjects/Karate Tapper/textures/one_plus.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="0.92.2 2405546, 2018-03-11"
sodipodi:docname="one_plus.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="47.399259"
inkscape:cy="37.297123"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="712"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-280.06665)">
<g
aria-label="+1"
transform="matrix(0.25522419,0,0,0.25522419,0.08065795,282.68161)"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:#1563ff;stroke-width:1.23736358;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="flowRoot4518">
<path
d="m 10.357422,35.427734 v -10 H 0.35742188 v -5 H 10.357422 v -10 h 10 v 10 h 10 v 5 h -10 v 10 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'C64 Pro';-inkscape-font-specification:'C64 Pro';stroke:#1563ff;stroke-width:1.23736358;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4534"
inkscape:connector-curvature="0" />
<path
d="m 35.357422,40.427734 v -5 h 10 v -15 h -5 v -5 h 5 V 5.4277344 h 10 V 35.427734 h 10 v 5 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'C64 Pro';-inkscape-font-specification:'C64 Pro';stroke:#1563ff;stroke-width:1.23736358;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4536"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1,29 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/one_plus.svg-8ab032697c85f98bb0575b24fef65f83.stex"
[deps]
source_file="res://raw_assets/one_plus.svg"
dest_files=[ "res://.import/one_plus.svg-8ab032697c85f98bb0575b24fef65f83.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

@ -0,0 +1,24 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scripts/ParticleEmitter.gd" type="Script" id=1]
[node name="Emitter" type="Node2D"]
script = ExtResource( 1 )
ParticleTexture = null
ParticleLifetime = 1
InitialColor = Color( 1, 1, 1, 1 )
FinalColor = Color( 1, 1, 1, 0 )
[node name="Tween" type="Tween" parent="." index="0"]
repeat = false
playback_process_mode = 1
playback_speed = 1.0
playback/active = false
playback/repeat = false
playback/speed = 1.0
[connection signal="tween_completed" from="Tween" to="." method="_on_tween_completed"]

@ -0,0 +1,27 @@
extends Node2D
onready var EmitterTween = $Tween
export(Texture) var ParticleTexture
export(int) var ParticleLifetime = 1
export(Color) var InitialColor = Color(1,1,1,1)
export(Color) var FinalColor = Color(1, 1, 1, 0)
func emit():
var s = Sprite.new()
s.scale = Vector2(1 / scale.x, 1 / scale.y)
var m = scale * 7
randomize()
s.position += Vector2((randi() % int(m.x)) - m.x / 2,
(randi() % int(m.y)) - m.y / 2)
s.set_texture(ParticleTexture)
EmitterTween.interpolate_property(s, "position", s.position, s.position - Vector2(0, 10),
ParticleLifetime, Tween.TRANS_QUAD,Tween.EASE_OUT)
EmitterTween.interpolate_property(s, "self_modulate", Color(1,1,1,1), FinalColor,
ParticleLifetime, Tween.TRANS_LINEAR, Tween.EASE_OUT)
add_child(s)
EmitterTween.start()
func _on_tween_completed(object, key):
remove_child(object)

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

@ -0,0 +1,29 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/one_plus.png-9a3479725ec6b4db8459d57d1265681e.stex"
[deps]
source_file="res://textures/one_plus.png"
dest_files=[ "res://.import/one_plus.png-9a3479725ec6b4db8459d57d1265681e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Loading…
Cancel
Save