commit
191532999c
@ -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=""
|
@ -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"
|
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)
|
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…
Reference in new issue