| 1 |
{ |
| 2 |
Copyright 2014-2023 Michalis Kamburelis. |
| 3 |
|
| 4 |
This file is part of "Castle Game Engine". |
| 5 |
|
| 6 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 7 |
included in this distribution, for details about the copyright. |
| 8 |
|
| 9 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 |
|
| 13 |
---------------------------------------------------------------------------- |
| 14 |
} |
| 15 |
|
| 16 |
{ Unique identifiers for achievements and leaderboards. } |
| 17 |
unit GameIds; |
| 18 |
|
| 19 |
interface |
| 20 |
|
| 21 |
uses CastleGameService; |
| 22 |
|
| 23 |
const |
| 24 |
{ Achievement ids. |
| 25 |
For Android: these are generated by creating achievements in Google Developer Console. |
| 26 |
For iOS: these are set by you in iTunes Connect. } |
| 27 |
AchievementMove = {$ifdef ANDROID} 'CgkI3pHW2dgJEAIQAA' {$else} 'move' {$endif}; |
| 28 |
AchievementClickFollow = {$ifdef ANDROID} 'CgkI3pHW2dgJEAIQAQ' {$else} 'click_follow' {$endif}; |
| 29 |
AchievementSeeLeft = {$ifdef ANDROID} 'CgkI3pHW2dgJEAIQAg' {$else} 'see_left' {$endif}; |
| 30 |
AchievementSeeRight = {$ifdef ANDROID} 'CgkI3pHW2dgJEAIQAw' {$else} 'see_right' {$endif}; |
| 31 |
|
| 32 |
{ Leaderboard ids. |
| 33 |
For Android: these are generated by creating leaderboards in Google Developer Console. |
| 34 |
For iOS: these are set by you in iTunes Connect. } |
| 35 |
LeaderboardRandomScores = {$ifdef ANDROID} 'CgkI3pHW2dgJEAIQBA' {$else} 'random_scores' {$endif}; |
| 36 |
LeaderboardTimes = {$ifdef ANDROID} 'CgkI3pHW2dgJEAIQBQ' {$else} 'times' {$endif}; |
| 37 |
|
| 38 |
var |
| 39 |
GameService: TGameService; |
| 40 |
|
| 41 |
{ For achievements that can be detected *very* often (e.g. AchievementSeeLeft |
| 42 |
would be submitted 60x per second, if the dragon is on the left side of the world) |
| 43 |
you can use a flag to not send GameService.Achievement multiple times with the same value. |
| 44 |
|
| 45 |
This is only an optimization, to not overwhelm the GameService with useless calls. |
| 46 |
Sending the same achievement many times would be ignored anyway. } |
| 47 |
AchievementSeeLeftSubmitted, AchievementSeeRightSubmitted: boolean; |
| 48 |
|
| 49 |
implementation |
| 50 |
|
| 51 |
end. |