mirror of
https://github.com/Yadciel1/2048-Shooter.git
synced 2024-11-08 23:21:22 +01:00
double click vorbereitung
This commit is contained in:
parent
015c1ad0ae
commit
ef897f0b1f
@ -12,6 +12,7 @@ var life = 100
|
||||
var hover = null
|
||||
onready var start_panzer = 1
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var holding_time = 0
|
||||
|
||||
signal speed_shoot
|
||||
|
||||
@ -33,6 +34,8 @@ func _process(delta):
|
||||
if $Panel/Area2D/LifeBar.value == 0:
|
||||
save_score()
|
||||
get_tree().change_scene("res://Main Scenes/GameOver.tscn")
|
||||
if holding_item != null:
|
||||
holding_time += delta
|
||||
|
||||
func slot_gui_input(event: InputEvent, slot: SlotClass):
|
||||
# if OS.get_name() != "Android":
|
||||
@ -43,6 +46,13 @@ func slot_gui_input(event: InputEvent, slot: SlotClass):
|
||||
if event is InputEventScreenTouch:
|
||||
if event.pressed:
|
||||
_Panzer_Slot_handler_touch(event, slot)
|
||||
if holding_item != null and holding_time > 0.2:
|
||||
#double click action
|
||||
# holding_item.old_slot.putIntoSlot(holding_item)
|
||||
# holding_item.old_slot.upgradePanzerInSlot()
|
||||
# holding_item = null
|
||||
# holding_time = 0
|
||||
pass
|
||||
else:
|
||||
if holding_item != null and hover == null and holding_item.old_slot != null:
|
||||
holding_item.old_slot.putIntoSlot(holding_item)
|
||||
|
@ -90,7 +90,7 @@ tracks/0/keys = {
|
||||
}
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 12, 12 )
|
||||
extents = Vector2( 18, 19.625 )
|
||||
|
||||
[node name="ShooterObject" type="Node2D"]
|
||||
position = Vector2( 64, 64 )
|
||||
@ -125,6 +125,7 @@ anims/Shoot = SubResource( 3 )
|
||||
[node name="panzerArea" type="Area2D" parent="." groups=["Panzer"]]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="panzerArea"]
|
||||
position = Vector2( 0, 1.375 )
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[connection signal="animation_finished" from="Shoot/AnimationPlayer" to="." method="_on_AnimationPlayer_shoot_finished"]
|
||||
|
@ -31,7 +31,7 @@ config={
|
||||
"is_test_europe_user_consent": false
|
||||
},
|
||||
"general": {
|
||||
"is_enabled": true,
|
||||
"is_enabled": false,
|
||||
"is_for_child_directed_treatment": false,
|
||||
"max_ad_content_rating": "G"
|
||||
},
|
||||
@ -73,10 +73,6 @@ config/name="2048 shooter"
|
||||
run/main_scene="res://Main Scenes/MainMenu.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
MobileAds="*res://addons/admob/src/singletons/MobileAds.gd"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=576
|
||||
@ -86,10 +82,6 @@ window/size/test_height=900
|
||||
window/handheld/orientation="portrait"
|
||||
window/stretch/mode="2d"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PoolStringArray( "res://addons/admob/plugin.cfg" )
|
||||
|
||||
[gui]
|
||||
|
||||
common/drop_mouse_on_gui_input_disabled=true
|
||||
|
Loading…
Reference in New Issue
Block a user