mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
Use "not" instead of the exclamation mark in GDScript files
Also add String casts
This commit is contained in:
@@ -53,7 +53,7 @@ func _on_connected():
|
||||
var query = payment.queryPurchases("inapp") # Use "subs" for subscriptions.
|
||||
if query.status == OK:
|
||||
for purchase in query.purchases:
|
||||
if !purchase.is_acknowledged:
|
||||
if not purchase.is_acknowledged:
|
||||
print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
|
||||
payment.acknowledgePurchase(purchase.purchase_token)
|
||||
else:
|
||||
@@ -70,7 +70,7 @@ func _on_purchases_updated(purchases):
|
||||
|
||||
# See _on_connected
|
||||
for purchase in purchases:
|
||||
if !purchase.is_acknowledged:
|
||||
if not purchase.is_acknowledged:
|
||||
print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
|
||||
payment.acknowledgePurchase(purchase.purchase_token)
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ func _ready():
|
||||
|
||||
func _gui_input(event):
|
||||
# We must start touching inside, but we can drag or unpress outside.
|
||||
# if !(event is InputEventScreenDrag or
|
||||
# (event is InputEventScreenTouch and (!event.pressed or get_global_rect().has_point(event.position)))):
|
||||
# if not (event is InputEventScreenDrag or
|
||||
# (event is InputEventScreenTouch and (not event.pressed or get_global_rect().has_point(event.position)))):
|
||||
# return
|
||||
|
||||
var finger_count = base_state.size()
|
||||
@@ -75,7 +75,7 @@ func _gui_input(event):
|
||||
# Two fingers => To pinch-zoom and rotate around Z.
|
||||
# Accept unpress or drag.
|
||||
if event is InputEventScreenTouch:
|
||||
if !event.pressed and base_state.has(event.index):
|
||||
if not event.pressed and base_state.has(event.index):
|
||||
# Some known touching finger released.
|
||||
|
||||
# Remove released finger from the base state.
|
||||
|
||||
Reference in New Issue
Block a user