11extends Node
2-
3- var GameAnalytics
2+ var ga
43const GAME_KEYS = {
54 "Android" : "c6cfc80ff69d1e7316bf1e0c8194eda6" ,
6- "iOS" : "c6cfc80ff69d1e7316bf1e0c8194eda6 " ,
5+ "iOS" : "c6cfc 80ff69d1e7316bf1e0c8194eda6 " ,
76 "OSX" : "c6cfc80ff69d1e7316bf1e0c8194eda6" ,
7+ "macOS" : "c6cfc80ff69d1e7316bf1e0c8194eda6" ,
88 "Windows" : "c6cfc80ff69d1e7316bf1e0c8194eda6" ,
99 "X11" : "c6cfc80ff69d1e7316bf1e0c8194eda6" ,
1010 "HTML5" : "c6cfc80ff69d1e7316bf1e0c8194eda6"
@@ -13,7 +13,7 @@ const GAME_KEYS = {
1313const SECRET_KEYS = {
1414 "Android" : "e0ae4809f70e2fa96916c7060f417ae53895f18d" ,
1515 "iOS" : "e0ae4809f70e2fa96916c7060f417ae53895f18d" ,
16- "OSX" : "e0ae4809f70e2fa96916c7060f417ae53895f18d" ,
16+ "macOS" : "e0ae4809f70e2fa96916c7060f417ae53895f18d" ,
1717 "Windows" : "e0ae4809f70e2fa96916c7060f417ae53895f18d" ,
1818 "X11" : "e0ae4809f70e2fa96916c7060f417ae53895f18d" ,
1919 "HTML5" : "e0ae4809f70e2fa96916c7060f417ae53895f18d"
@@ -22,28 +22,28 @@ const SECRET_KEYS = {
2222var platform_os = OS .get_name ()
2323
2424func _notification (what ):
25- if what == MainLoop . NOTIFICATION_WM_QUIT_REQUEST :
26- GameAnalytics .onQuit ()
25+ if what == NOTIFICATION_WM_CLOSE_REQUEST :
26+ ga .onQuit ()
2727
2828func _ready ():
2929 if (Engine .has_singleton ("GameAnalytics" )):
30- GameAnalytics = Engine .get_singleton ("GameAnalytics" )
30+ ga = Engine .get_singleton ("GameAnalytics" )
3131
32- GameAnalytics .setEnabledInfoLog (true )
33- GameAnalytics .setEnabledVerboseLog (true )
32+ ga .setEnabledInfoLog (true )
33+ ga .setEnabledVerboseLog (true )
3434
35- GameAnalytics .configureAvailableCustomDimensions01 (["ninja" , "samurai" ])
36- GameAnalytics .configureAvailableCustomDimensions02 (["whale" , "dolphin" ])
37- GameAnalytics .configureAvailableCustomDimensions03 (["horde" , "alliance" ])
38- GameAnalytics .configureAvailableResourceCurrencies (["gold" , "gems" ])
39- GameAnalytics .configureAvailableResourceItemTypes (["boost" , "lives" ])
35+ ga .configureAvailableCustomDimensions01 (["ninja" , "samurai" ])
36+ ga .configureAvailableCustomDimensions02 (["whale" , "dolphin" ])
37+ ga .configureAvailableCustomDimensions03 (["horde" , "alliance" ])
38+ ga .configureAvailableResourceCurrencies (["gold" , "gems" ])
39+ ga .configureAvailableResourceItemTypes (["boost" , "lives" ])
4040
41- GameAnalytics .configureBuild ("0.1.0" )
42- GameAnalytics .configureAutoDetectAppVersion (true )
43- GameAnalytics .configureUserId ("my_custom_id" )
41+ ga .configureBuild ("0.1.0" )
42+ ga .configureAutoDetectAppVersion (true )
43+ ga .configureUserId ("my_custom_id" )
4444
45- GameAnalytics .init (GAME_KEYS [platform_os ], SECRET_KEYS [platform_os ])
46- get_node ("Button" ).connect ("pressed" , self , "_on_Button_pressed" )
45+ ga .init (GAME_KEYS [platform_os ], SECRET_KEYS [platform_os ])
46+ get_node ("Button" ).connect ("pressed" , Callable ( self , "_on_Button_pressed" ) )
4747
4848
4949func _on_Button_pressed ():
0 commit comments